#!/bin/bash # Run all OpenClaw Trading examples set -e echo "================================" echo "OpenClaw Trading - All Examples" echo "================================" echo "" # Color codes for output GREEN='\033[0;32m' RED='\033[0;31m' NC='\033[0m' # No Color # Track success/failure declare -a results # Function to run an example run_example() { local script=$1 local name=$2 echo "Running: $name" echo "----------------------------------------" if python "$script"; then echo -e "${GREEN}✓ Success${NC}" results+=("✓ $name") else echo -e "${RED}✗ Failed${NC}" results+=("✗ $name") fi echo "" echo "Press Enter to continue..." read echo "" } # Main execution echo "Starting examples..." echo "" run_example "examples/01_quickstart.py" "01 - Quickstart (Economic Tracker)" run_example "examples/02_workflow_demo.py" "02 - Workflow Demo" run_example "examples/03_factor_market.py" "03 - Factor Market" run_example "examples/04_learning_system.py" "04 - Learning System" run_example "examples/05_work_trade_balance.py" "05 - Work-Trade Balance" run_example "examples/06_portfolio_risk.py" "06 - Portfolio Risk Management" echo "================================" echo "Summary" echo "================================" for result in "${results[@]}"; do echo "$result" done echo "" echo "All examples completed!"