Replace stub validation functions with real model inference (DQN greedy, PPO act()) so early stopping optimizes actual trading performance instead of market volatility. Add transaction costs (commission + bid-ask spread) to reward computation across train/hyperopt/evaluate examples. Key changes: - Symbol filtering (--symbol ES.FUT) prevents mixing futures contracts - BTreeMap timestamp dedup handles overlapping .FUT contract bars - Return clamping (--max-bar-return) filters contract roll boundaries - Warmup offset alignment fixes feature-to-bar index mismatch - Kelly sizing: 3 stubs replaced with real data-driven implementations - Adam optimizer: BUG #14 diagnostic logging demoted to trace - TFT: varmap_mut() accessor for checkpoint loading - PPO hyperopt: with_costs() builder for tx cost configuration DQN eval (ES.FUT, 2 folds): Sharpe=11.36, MaxDD=7.42%, WinRate=33.2% Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
11 KiB
11 KiB