When your live P&L drifts from the backtest you validated, the culprit is almost never psychology. It is code: the same metric computed two subtly different ways in research and in the live sizing path. Here is the parity oracle I now gate on, and the deeper rule behind it: live and research must call the same code, not two copies of it.
A data-quality gate that crash-loops on corrupt, stale or all-NaN data is not broken, it is working: the alternative is fail open, trading on garbage with silent defaults. Here is the war-story from both sides, the honest flip where an over-eager gate locked me out of a market, and the one portable rule: on bad data, refuse to trade and alert loudly, never proceed with a default that looks like data.
A bar carries one timestamp, but that stamp is ambiguous: is a bar labelled 09:00 the open of the coming interval or the close of the last one? Vendors disagree, and reading the wrong edge is a clean one-bar look-ahead that sails through review. Here is the war-story, why the leak is invisible, and the ingest rule I now enforce on every feed.
Total-return and price-return series look identical on a chart and differ by percent-per-year underneath. Mix them, or fold dividends in twice, and a long-horizon backtest drifts a few percent above the honest one every year and compounds into a phantom edge. Here is the reconstruction check I now run: rebuild total return from price plus the dividend stream yourself and diff it against the vendor's adjusted series.
Survivorship bias is the term every quant knows and almost nobody makes actionable. Here is the one-number diagnostic I run before I trust any cross-sectional backtest: count the dead names as a share of your universe over a decade. If it is near zero, your data quietly deleted the losers and every result is biased upward.
Even a genuine edge dies if you deploy it too large. This is the field note on alpha-side risk: how your own market impact (capacity) and everyone else trading the same signal (crowding) shrink the size at which the edge is still yours, and the crossover test that tells you where your ceiling sits before the market finds it for you.
A candidate in my Titan system posted a Sharpe near 1.4, cleared every statistical gate, and still traced a drawdown so deep and so long that I could never have held it through the trough. Here is why Sharpe is blind to the path and the tail, the survival-metric suite (Sortino, Calmar, CVaR, CDaR) that sees what it misses, and the one rule it bought me: promote on Calmar lift, not Sharpe lift. All figures are illustrative and sanitised.
Most risk-of-ruin Monte Carlo resamples a strategy's realised P&L, which quietly bakes in the good luck you are trying to stress and understates the tail. Here is the correction that made my honest drawdown distribution far fatter than my first one, plus the relative gate a long-only sleeve actually needs. First person, British English, illustrative numbers only.
Everyone sells walk-forward validation as proof a strategy is out-of-sample. It is not. I ran my own walk-forward pipeline on pure random-walk noise and it still produced a healthy positive stitched Sharpe, because out-of-sample is a property of provenance, not partitioning. Here is the random-walk control that tells you whether your pipeline, or your edge, produced the number.
Look-ahead bias is the default state of careless backtest code, not an exotic edge case, and it survives review because it reads as ordinary pandas. Here is the corrupt-the-future causality test I now gate on: poison every price after a date, then assert nothing computed before it moves. If the past shifts when you poison the future, the strategy is reading ahead.
The expected best Sharpe of a parameter sweep climbs as the grid grows, even when every strategy in it is worthless. Here is the deflated Sharpe ratio explained as a practitioner sees it, with a small N to noise-ceiling lookup table you can apply to your own sweep tonight, and the one rule that killed my proudest grid-search winner: N is the pool, not the podium.
The most dangerous code in a trading repo is the throwaway research notebook. One structural rule, dependencies that flow in a single direction, keeps it out of production and turns invisible coupling into a number you can grep.
Choosing a quant trading framework is not a feature comparison between NautilusTrader, backtrader and a DIY loop. It comes down to one property, and a rubric you can apply to any engine: does your backtest run the same code as live?
Using a floating-point number for money is a classic bug, but in a trading system it does not just round a penny wrong: it silently mis-sizes a live position. Here is why, and why a Money type is not the fix you think it is.
A beautiful equity curve is the default outcome of a backtest, not an achievement. Here is why every retail quant failure mode is biased toward optimism, and the one habit that survives contact with a live market: suspicion over celebration.
An introduction to my book, "Building a Production Quant Trading System", a practitioner's guide to the unglamorous 90% of systematic trading: why I wrote it, what to expect, and what not to expect.
· 10 min
Essays in your inbox
New writing on Syria, sustainability and finance, a few times a month.
Unsubscribe anytime. Read by 4,200+ professionals.