Files
trading_bot_v4/cluster/run_v11_progressive_sweep.sh
copilot-swe-agent[bot] 5e21028c5e fix: Replace flip_threshold=0.5 with working values [0.3, 0.35, 0.4, 0.45]
- Updated PARAMETER_GRID in v11_test_worker.py
- Changed from 2 flip_threshold values to 4 values
- Total combinations: 1024 (4×4×2×2×2×2×2×2)
- Updated coordinator to create 4 chunks (256 combos each)
- Updated all documentation to reflect 1024 combinations
- All values below critical 0.5 threshold that produces 0 signals
- Expected signal counts: 0.3 (1400+), 0.35 (1200+), 0.4 (1100+), 0.45 (800+)
- Created FLIP_THRESHOLD_FIX.md with complete analysis

Co-authored-by: mindesbunister <32161838+mindesbunister@users.noreply.github.com>
2025-12-06 22:40:16 +00:00

97 lines
3.5 KiB
Bash
Executable File

#!/bin/bash
# V11 PROGRESSIVE Parameter Sweep Launch Script
# Stage 1: Ultra-permissive (start from 0 filters) to find baseline
set -e # Exit on error
echo "================================================================"
echo "V11 PROGRESSIVE PARAMETER SWEEP - STAGE 1 (FIXED)"
echo "================================================================"
echo ""
echo "Strategy: Start from 0 (filters disabled) and go upwards"
echo ""
echo "Progressive Grid (1024 combinations):"
echo " - flip_threshold: 0.3, 0.35, 0.4, 0.45 (all proven working)"
echo " - adx_min: 0, 5, 10, 15 (0 = disabled)"
echo " - long_pos_max: 95, 100 (very loose)"
echo " - short_pos_min: 0, 5 (0 = disabled)"
echo " - vol_min: 0.0, 0.5 (0 = disabled)"
echo " - entry_buffer_atr: 0.0, 0.10 (0 = disabled)"
echo " - rsi_long_min: 25, 30 (permissive)"
echo " - rsi_short_max: 75, 80 (permissive)"
echo ""
echo "Expected signal counts by flip_threshold:"
echo " - flip_threshold=0.3: 1,400-1,600 signals (very loose)"
echo " - flip_threshold=0.35: 1,200-1,400 signals"
echo " - flip_threshold=0.4: 1,096-1,186 signals (proven working)"
echo " - flip_threshold=0.45: 800-1,000 signals (tighter but viable)"
echo ""
echo "Expected outcomes by adx_min:"
echo " - adx_min=0 configs: 150-300 signals (almost no filtering)"
echo " - adx_min=5 configs: 80-150 signals (light filtering)"
echo " - adx_min=10 configs: 40-80 signals (moderate filtering)"
echo " - adx_min=15 configs: 10-40 signals (strict filtering)"
echo ""
echo "FIX APPLIED: Replaced flip_threshold=0.5 (0 signals) with working values"
echo ""
echo "================================================================"
echo ""
cd "$(dirname "$0")"
# Check if data file exists
if [ ! -f "data/solusdt_5m.csv" ]; then
echo "✗ Error: data/solusdt_5m.csv not found"
echo " Please ensure market data is available"
exit 1
fi
echo "✓ Market data found"
# Check if coordinator script exists
if [ ! -f "v11_test_coordinator.py" ]; then
echo "✗ Error: v11_test_coordinator.py not found"
exit 1
fi
echo "✓ Coordinator script found"
# Clear previous test data
echo ""
echo "🗑️ Clearing previous test data..."
rm -rf v11_test_results/*
if [ -f "exploration.db" ]; then
sqlite3 exploration.db "DELETE FROM v11_test_chunks;" 2>/dev/null || true
sqlite3 exploration.db "DELETE FROM v11_test_strategies;" 2>/dev/null || true
echo "✓ Database cleared"
fi
# Launch coordinator in background
echo ""
echo "🚀 Starting progressive sweep coordinator..."
nohup python3 v11_test_coordinator.py > coordinator_v11_progressive.log 2>&1 &
COORDINATOR_PID=$!
echo "✓ Coordinator started (PID: $COORDINATOR_PID)"
echo ""
echo "================================================================"
echo "MONITORING"
echo "================================================================"
echo "Live log: tail -f coordinator_v11_progressive.log"
echo "Database: sqlite3 exploration.db"
echo "Results: cluster/v11_test_results/*.csv"
echo ""
echo "Check status:"
echo " sqlite3 exploration.db \"SELECT * FROM v11_test_chunks\""
echo ""
echo "Analyze signal distribution by ADX:"
echo " sqlite3 exploration.db \\"
echo " \"SELECT json_extract(params, '$.adx_min') as adx_min, \\"
echo " AVG(total_trades) as avg_signals, COUNT(*) as configs \\"
echo " FROM v11_test_strategies \\"
echo " GROUP BY adx_min ORDER BY adx_min;\""
echo ""
echo "To stop sweep:"
echo " kill $COORDINATOR_PID"
echo "================================================================"