fix: min_hold_bars 10→50 + adaptive hold scales with base
min_hold=10 allowed ~1200 trades/day — costs destroyed the edge. min_hold=50 (~6.5 min) limits to ~230 trades/day max. Adaptive extension now scales 0-2× base (was hardcoded 0-8 bars). With base=50: range is 50-150 bars depending on ISV stability. Losing positions (negative reward_ema) get base only (50 bars). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -67,7 +67,7 @@ min_epochs_before_stopping = 80
|
||||
gpu_n_episodes = 4096
|
||||
initial_capital = 35000.0
|
||||
tx_cost_multiplier = 0.18 # bps: IBKR ES RT = $4.50/contract ($0.85 comm + $1.38 exch + $0.02 reg × 2 sides). At ES=$5100: 0.18 bps × 5100 × 0.0001 = 0.09 pts = $4.50
|
||||
min_hold_bars = 10 # ~26s hold at 23 volume bars/min
|
||||
min_hold_bars = 50 # ~6.5 min at ~11.5K imbalance bars/day. ISV extends to 50-150 bars adaptively.
|
||||
|
||||
[experience.fill_simulation]
|
||||
ioc_fill_prob = 0.85
|
||||
|
||||
@@ -157,8 +157,9 @@ __device__ __forceinline__ float enforce_hold(
|
||||
if (isv_signals != NULL) {
|
||||
float stability = 1.0f / (1.0f + isv_signals[1]); /* inv grad_norm: high norm → low stability */
|
||||
float confidence = 1.0f - fminf(isv_signals[3], 1.0f); /* inv ensemble_var: high var → low confidence */
|
||||
/* Extension: 0-8 bars based on stability × confidence */
|
||||
int extension = (int)(stability * confidence * 8.0f);
|
||||
/* Extension: 0-2× base hold based on stability × confidence.
|
||||
* Scales with min_hold_bars: base=50 → extension up to 100 bars. */
|
||||
int extension = (int)(stability * confidence * (float)min_hold_bars * 2.0f);
|
||||
/* If losing (negative reward_ema), reduce hold to base only */
|
||||
if (isv_signals[5] < -0.001f) extension = 0;
|
||||
adaptive_hold = min_hold_bars + extension;
|
||||
|
||||
Reference in New Issue
Block a user