fix: promote entire backtest pipeline from bf16 to f32
CRITICAL CORRECTNESS FIX: bf16 has $32 resolution at $5K equity.
Transaction costs ($12.50), tick PnL ($12.50), and cumulative returns
were ALL below bf16 resolution — rounded to zero. Sharpe was quantized
to ~0.004 resolution. All previous hyperopt evaluations used garbage
metrics.
Changed to f32:
- backtest_env_kernel.cu: prices, portfolio_state, step_rewards,
step_returns — both backtest_env_step and backtest_env_step_batch
- backtest_metrics_kernel.cu: all accumulators, shared memory,
metrics_out, annualization_factor
- backtest_gather_kernel.cu: portfolio parameter (f32 → bf16 for
model input at output stage only)
- gpu_backtest_evaluator.rs: all buffer types, upload paths,
metrics download, shared memory byte calculations
Kept bf16: features_buf, states_buf (neural network input for
tensor cores), cuBLAS forward pass buffers.
Verified: Sharpe now has 6-digit precision (19.4745) vs bf16's
~0.004 resolution. All 345 tests + 3 smoke tests pass.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>