diff --git a/crates/ml/examples/evaluate_baseline.rs b/crates/ml/examples/evaluate_baseline.rs index eb8c57014..c9b92abd1 100644 --- a/crates/ml/examples/evaluate_baseline.rs +++ b/crates/ml/examples/evaluate_baseline.rs @@ -1340,10 +1340,22 @@ fn evaluate_dqn_fold_gpu( ..Default::default() }; - // Single window = full test fold + // Single window = full test fold. Build zero-OFI LobBar SoA for the + // SP15 cost-net pipeline — eval-path lacks per-bar OFI features, so the + // OFI-impact term degrades to 0 (commission + half-spread × position + // still apply). Same degradation pattern as the PPO hyperopt adapter. + let lob_bars: Vec = prices + .iter() + .map(|ohlc| ml::cuda_pipeline::lob_bar::LobBar { + price: ohlc[3], // close + spread: gpu_config.spread_cost, + ofi: 0.0, + }) + .collect(); let mut evaluator = GpuBacktestEvaluator::new( &[prices], &[features], + &[lob_bars], market_feature_dim, gpu_config, &stream, @@ -1638,9 +1650,19 @@ fn evaluate_ppo_fold_gpu( ..Default::default() }; + // Zero-OFI LobBar SoA — see DQN fold above for rationale. + let lob_bars: Vec = prices + .iter() + .map(|ohlc| ml::cuda_pipeline::lob_bar::LobBar { + price: ohlc[3], + spread: gpu_config.spread_cost, + ofi: 0.0, + }) + .collect(); let mut evaluator = GpuBacktestEvaluator::new( &[prices], &[features], + &[lob_bars], market_feature_dim, gpu_config, &ppo_stream, @@ -1799,9 +1821,19 @@ fn evaluate_supervised_fold_gpu( ..Default::default() }; + // Zero-OFI LobBar SoA — see DQN fold above for rationale. + let lob_bars: Vec = prices + .iter() + .map(|ohlc| ml::cuda_pipeline::lob_bar::LobBar { + price: ohlc[3], + spread: gpu_config.spread_cost, + ofi: 0.0, + }) + .collect(); let mut evaluator = GpuBacktestEvaluator::new( &[prices], &[features], + &[lob_bars], market_feature_dim, gpu_config, &sup_stream,