feat(sp15-wave3b): host-side wire-up — eliminates 5 orphan launchers via GpuBacktestEvaluator constructor signature change
Second half of the Wave 3 val-cost-streams refactor (3a kernel-side
foundation landed at e968f4ded). Atomically migrates the
GpuBacktestEvaluator::new contract; 3 call sites + 6 test call sites
+ 5 WindowMetrics fields + 11 new buffers + launch sequence wiring
all in this commit.
Constructor signature change: GpuBacktestEvaluator::new gains
window_lob_bars: &[Vec<LobBar>] parameter alongside existing
window_prices + window_features. Three production call sites migrated
atomically:
- trainers/dqn/trainer/metrics.rs:651 (val_evaluator construction)
- trainers/dqn/trainer/metrics.rs:1166 (extra_eval Dev/Test)
- hyperopt/adapters/dqn.rs:1493 (full LobBar with real OFI)
- hyperopt/adapters/ppo.rs:1364 (zero-OFI LobBar — PPO lacks per-bar
OFI features; cost-net OFI-impact term degrades to 0; commission +
half-spread × position still apply)
11 new mapped-pinned buffers on GpuBacktestEvaluator:
Input (3): close_prices_buf, half_spread_buf, ofi_scalar_buf
Derivation (3): position_history_buf, side_ind_buf, rt_ind_buf
Output (5): cost_net_sharpe_buf, baseline_{buyhold,hold_only,
momentum,reversion}_sharpe_buf
5 new WindowMetrics fields (host-annualised via × annualization_factor):
- sharpe_cost_net (1.2.b cost-net sharpe)
- baseline_{buyhold,hold_only,momentum,reversion}_sharpe (1.4.b)
Per-window eval flow now: existing fused metrics kernel → 1.1.b sharpe →
position_history_derivation (one launch over all windows) →
cost_net_sharpe (per-window) → 4 × baseline_* (per-window).
commission_per_rt: host-computed constant per D3 resolution, formula
config.tx_cost_bps × 0.0001 × config.initial_capital, passed by-value
at each baseline + cost_net launcher invocation.
Wave 3a kernel signature follow-up: cost_net_sharpe_kernel side_ind /
rt_ind switched from unsigned int* → float* so the cost-net kernel
chains directly with the f32 streams emitted by
position_history_derivation_kernel (no u32→f32 adapter buffer; bit-pun
mismatch fixed). cost_net oracle test migrated MappedU32Buffer →
MappedF32Buffer accordingly.
Atomic per feedback_no_partial_refactor: constructor sig change + 3
production + 6 test call site migrations + 5 orphan launchers
eliminated + WindowMetrics field additions + cost_net kernel sig fix
+ audit doc all in this commit.
Closes 1.2.b + 1.4.b + position_history_derivation orphan launchers
per feedback_wire_everything_up.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>