feat(ml-backtesting): cold-start stopgap — max-confidence bytecode policy (Q1/Tier1)
The threshold-tuning smoke at 81decf40f produced n_trades=0 despite
74.6% of decisions having max_conv ≥ 0.30 — the linear-weighted-mean
aggregator in decision_policy_default is structurally dilution-bound
at cold-start (per spec §1).
Q1 stopgap: when sim_variants[i].use_cold_start_stopgap = true, the
harness uploads a max-confidence Strategy bytecode program for that
backtest, routing decisions through decision_policy_program with
OP_AGG_MAX_CONFIDENCE. Existing kernel; zero CUDA changes.
Field additions (atomically across BatchedSimConfig + UniformSimParams
+ ResolvedSimVariant + SweepBase.SimVariant) — every UniformSimParams
literal migrated to include use_cold_start_stopgap: false (default).
The sweep YAML's sim_variants entry sets it to true only for the
validation run; production deployability uses Q2's kernel fix instead.
Sweep YAML (config/ml/sweep_smoke.yaml) flipped to use_cold_start_stopgap=true
at threshold=0.0, cost=0.125 — same anchor as the threshold-tuning
smoke that produced n_trades=0, for direct comparison.
This is a VALIDATION step. Cluster smoke at this commit MUST produce
n_trades > 100 + finite metrics. Q2's kernel CBSW immediately follows
and deletes this entire stopgap atomically (field, harness branch,
YAML setting, every literal).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -220,6 +220,9 @@ struct SimVariant {
|
||||
#[serde(default)] max_lots: Option<u16>,
|
||||
#[serde(default)] kelly_frac_floor: Option<f32>,
|
||||
#[serde(default)] sharpe_weight_floor: Option<f32>,
|
||||
/// Q1 stopgap (Tier 1 only): when true, the harness uploads a
|
||||
/// max-confidence Strategy bytecode program for this variant's backtest.
|
||||
#[serde(default)] use_cold_start_stopgap: Option<bool>,
|
||||
}
|
||||
|
||||
fn default_n_parallel() -> usize { 1 }
|
||||
@@ -407,6 +410,7 @@ fn resolve_sim_variants(base: &SweepBase) -> Vec<ml_backtesting::sim::ResolvedSi
|
||||
sharpe_weight_floor: v.sharpe_weight_floor.unwrap_or(base.sharpe_weight_floor),
|
||||
threshold: v.threshold,
|
||||
cost_per_lot_per_side: v.cost_per_lot_per_side,
|
||||
use_cold_start_stopgap: v.use_cold_start_stopgap.unwrap_or(false),
|
||||
}).collect()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user