From 95d9fdb0348ecbe683c18864bb2c53bada5f6397 Mon Sep 17 00:00:00 2001 From: jgrusewski Date: Sun, 22 Mar 2026 23:45:41 +0100 Subject: [PATCH] =?UTF-8?q?config:=20set=20q=5Fgap=5Fthreshold=3D0.1=20as?= =?UTF-8?q?=20default=20=E2=80=94=20force=20trade=20selectivity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Q-gap was 0.0 (disabled) meaning the model traded on every bar regardless of conviction. With 0.1, the model must have Q(best) - Q(flat) > 0.1 before entering a position. Local test showed 21% fewer trades. Co-Authored-By: Claude Opus 4.6 (1M context) --- config/training/dqn-hyperopt.toml | 4 ++-- config/training/dqn-production.toml | 2 +- config/training/dqn-smoketest.toml | 2 +- crates/ml/src/hyperopt/adapters/dqn.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/training/dqn-hyperopt.toml b/config/training/dqn-hyperopt.toml index 8dc2b34ac..1a2391350 100644 --- a/config/training/dqn-hyperopt.toml +++ b/config/training/dqn-hyperopt.toml @@ -81,7 +81,7 @@ w_idle = 0.01 dd_threshold = 0.01 loss_aversion = 1.5 time_decay_rate = 0.0005 -q_gap_threshold = 0.0 +q_gap_threshold = 0.1 [fixed] use_branching = true # GPU pipeline requires branching @@ -113,4 +113,4 @@ w_idle = 0.01 dd_threshold = 0.01 loss_aversion = 1.5 time_decay_rate = 0.0005 -q_gap_threshold = 0.0 +q_gap_threshold = 0.1 diff --git a/config/training/dqn-production.toml b/config/training/dqn-production.toml index d4019b3f1..8ce5ed2ea 100644 --- a/config/training/dqn-production.toml +++ b/config/training/dqn-production.toml @@ -72,4 +72,4 @@ w_idle = 0.01 dd_threshold = 0.01 loss_aversion = 1.5 time_decay_rate = 0.0005 -q_gap_threshold = 0.0 # disabled by default — hyperopt searches [0.0, 0.5] +q_gap_threshold = 0.1 # trade only with conviction — hyperopt searches [0.0, 0.5] diff --git a/config/training/dqn-smoketest.toml b/config/training/dqn-smoketest.toml index 086f2f148..e40b235ce 100644 --- a/config/training/dqn-smoketest.toml +++ b/config/training/dqn-smoketest.toml @@ -36,4 +36,4 @@ w_idle = 0.01 dd_threshold = 0.01 loss_aversion = 1.5 time_decay_rate = 0.0005 -q_gap_threshold = 0.0 +q_gap_threshold = 0.1 diff --git a/crates/ml/src/hyperopt/adapters/dqn.rs b/crates/ml/src/hyperopt/adapters/dqn.rs index 624951fd5..fd591e595 100644 --- a/crates/ml/src/hyperopt/adapters/dqn.rs +++ b/crates/ml/src/hyperopt/adapters/dqn.rs @@ -3931,7 +3931,7 @@ mod tests { assert_eq!(bounds[35], (0.01, 0.01)); // dd_threshold (FIXED in Fast phase) assert_eq!(bounds[36], (1.5, 1.5)); // loss_aversion (FIXED in Fast phase) assert_eq!(bounds[37], (0.0005, 0.0005)); // time_decay_rate (FIXED in Fast phase) - assert_eq!(bounds[38], (0.0, 0.0)); // q_gap_threshold (FIXED in Fast phase) + assert_eq!(bounds[38], (0.1, 0.1)); // q_gap_threshold (FIXED in Fast phase) } #[test]