⚡ Polytrader
Dashboard
Processes
Configs
Accounts
Configs
/
optimizer/optimize_exit_params_xrp_hourly.toml
✔ Validate
💾 Save
# Exit Parameter Optimization for CryptoPrices (Hourly Events) # # Purpose: Optimize exit/risk-management parameters while keeping entry params # fixed at current XRP hourly production values. # # Rationale: Live session shows 100% directional accuracy but only 41.7% win rate # and breakeven P&L ($+0.02). Entry signal is working — exits need tuning. # # Entry params are FIXED (min == max) to current production values. # Exit params have optimization ranges centered around current production values. # # Note: hold_to_maturity_seconds is not optimizable via the optimizer (set manually # in the live config). It has been increased from 450s to 900s in production. replay_dir = "replay_data/hourly_live_recording_20260209_211006" # Use all hourly slugs to avoid overfitting exit params to XRP alone. # Exit parameters (trailing stops, stop loss) should generalize across assets. slugs = ["xrp-up-or-down-hourly"] strategy_type = "cryptoprices" # Joint mode: find exit params that work across all hourly assets independent = false [parameter_space.strategy] # === EXIT PARAMS (to optimize) === # Stop loss percentage — current production: 0.55 # Wider range since 100% directional accuracy means we should give positions more room stop_loss_pct = { min = 0.35, max = 0.70 } # === ENTRY PARAMS (fixed to production values) === # min_pricing_edge = 0.13 (production) min_pricing_edge = { min = 0.13, max = 0.13 } # uncertain_zone_min = 0.0 (production) uncertain_zone_min = { min = 0.00, max = 0.00 } # uncertain_zone_max = 0.70 (production) uncertain_zone_max = { min = 0.70, max = 0.70 } # trade_cooldown_ticks = 400 (production) trade_cooldown_ticks = { min = 400, max = 400 } # min_time_to_expiry_seconds = 500 (production) min_time_to_expiry_seconds = { min = 500, max = 500 } [parameter_space.global] # === ENTRY PARAMS (fixed to production values) === # abs_max_entry_price = 1.00 (production) — CRITICAL: default is 0.65 which blocks all ITM entries abs_max_entry_price = { min = 1.00, max = 1.00 } # === EXIT PARAMS (to optimize) === # Stop loss timeout — current production: 20s # How long to wait before forcing stop loss exit after trigger stop_loss_timeout = { min = 10, max = 60 } # Stop loss recovery buffer — current production: 0.04 # Price buffer below stop loss that allows recovery stop_loss_recovery_buffer = { min = 0.02, max = 0.08 } # Base trailing stop — current production: 0.85 # Lower = more room for price swings before trailing stop triggers base_trailing_pct = { min = 0.75, max = 0.92 } # Medium profit trailing stop — current production: 0.92 # Tighter trailing when position reaches medium profit threshold adaptive_medium_trailing_pct = { min = 0.85, max = 0.96 } # High profit trailing stop — current production: 0.95 # Tightest trailing when position reaches high profit threshold adaptive_high_trailing_pct = { min = 0.90, max = 0.98 } # Medium profit threshold — current production: 0.15 (15% profit) # When to switch from base to medium trailing stop adaptive_medium_profit_threshold = { min = 0.05, max = 0.25 } # High profit threshold — current production: 0.10 (10% profit) # When to switch from medium to high trailing stop # Previous run hit the lower bound (0.10) — expanded down to 0.03 adaptive_high_profit_threshold = { min = 0.03, max = 0.30 } [objective] # Sharpe ratio for risk-adjusted returns — better than raw profit for exit tuning function = "sharpe_ratio" [pso] swarm_size = 20 max_iterations = 50 inertia_weight = 0.729 cognitive_coefficient = 1.49445 social_coefficient = 1.49445