Files
foxhunt/crates
jgrusewski ed753a6f17 feat: dynamic trade management — stop-loss, take-profit, regime-adaptive
Three critical fixes from H100 Trial 0 analysis:

1. REMOVE IDLE PENALTY — was making Flat the worst Q-value (Q=-19.4),
   forcing the model to trade on 95% of bars. Now Flat = reward 0.0.
   DSR already penalizes inaction through the Sharpe denominator.

2. TRADE COMPLETION SCALING — ×1000 clamped to ±1 made ALL trades look
   the same (can't distinguish 1-tick from 10-tick return). Now ×200
   with clamp ±2, plus sqrt(hold_time) bonus for holding longer.

3. DYNAMIC TRADE MANAGEMENT — model learns ENTRY quality, exits are
   managed by the system:
   - Stop loss: -0.3% × vol_mult (CUSUM-adaptive, up to -0.75%)
   - Take profit: +0.5% × vol_mult × trend_mult (up to +2.5% in trends)
   - Time stop: 100 bars × vol_mult (up to 250 in volatile markets)
   - Min hold: 5 bars before model can exit voluntarily
   - Auto-exit forces flat and computes trade_completion_reward

   Regime-adaptive via ADX (trend strength) and CUSUM (volatility)
   features already in the GPU memory.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 11:21:33 +01:00
..