Deep dives
Writing
Long-form notes on the work: methodologies, design arguments, things that went wrong, and why each tooling choice beat the alternatives.
- 5 Jun 2026 8 min
Refusing to fool yourself: deflated Sharpe under 4,550 trials
Ranking 13 strategies across 350 tickers by Sharpe means the top of the board is the maximum of 4,550 noisy draws, and most of that height is luck. Deflated Sharpe with an explicit trial count, stationary block-bootstrap confidence intervals, and the same penalty applied to parameter search. The proof is the test: a 0.5 Sharpe fails best-of-2,500, a real 4.0 survives.
Data - 22 May 2026 9 min
Training a demand forecaster on the cells you didn't lose to stockouts
The standard demand-forecasting setup learns from sales. But sales aren't demand; stockouts censor it. Dropping the censored cells instead of imputing them turns the model into exactly the conditional expectation the downstream allocator needs.
Optimization Data - 21 May 2026 10 min
The calibration layer that makes a backtester safe to act on
A backtester reports a Sharpe. The live trade does not realise that Sharpe. The gap is data, not noise. Wiring the gap back into ranking, sizing, and a visible low-trust warning is the layer that turns a research tool into a real-money one.
Optimization Data - 16 May 2026 22 min
Haversine: three Pythons, seven Zigs, and the knowledge tax
Three Python implementations across the expertise gradient, then seven Zig steps into vectorised + threaded native. The last step is analyzer-driven: read the compiled assembly, find that LLVM isn't emitting FMA, fix it in the source, and pool the threads instead of spawning per call. Lands at 150 GB/s on a 9950X3D.
Optimization - 28 Apr 2026 11 min
Locking a Polars hot loop with source-level invariants
Optimisations get reverted when someone refactors them later. Nine source-level invariants guard the inventory-arena simulator's hot loop from regressing, and from being fixed by accident.
Optimization Data