Files
foxhunt/ml/trained_models/evaluation_report.json
jgrusewski 26b51a4f99 feat(ml): real validation, transaction costs, and data fixes for DQN/PPO pipeline
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>
2026-02-24 00:43:11 +01:00

41 lines
1.1 KiB
JSON

{
"folds": [
{
"fold": 0,
"model": "dqn",
"sharpe_ratio": 13.177256687157323,
"max_drawdown_pct": 4.532350632435176,
"win_rate_pct": 35.910224438902745,
"profit_factor": 3.6487762551668474,
"total_return_pct": 251.49434394669345,
"num_trades": 1604,
"test_start": "2025-06-01",
"test_end": "2025-08-31"
},
{
"fold": 1,
"model": "dqn",
"sharpe_ratio": 9.546067497582882,
"max_drawdown_pct": 10.308813242954853,
"win_rate_pct": 30.488445378151262,
"profit_factor": 1.9839555385250602,
"total_return_pct": 209.96815231087328,
"num_trades": 3808,
"test_start": "2025-09-01",
"test_end": "2025-11-30"
}
],
"aggregate": {
"dqn_avg_sharpe": 11.361662092370103,
"dqn_avg_drawdown": 7.420581937695015,
"dqn_avg_win_rate": 33.19933490852701,
"ppo_avg_sharpe": 0.0,
"ppo_avg_drawdown": 0.0,
"ppo_avg_win_rate": 0.0
},
"sanity_checks": {
"beats_random": true,
"action_diversity": true,
"fold_consistency": true
}
}