The easiest thing in quantitative trading is producing a beautiful backtest. The hardest is producing an honest one. Most failed live strategies were not bad ideas so much as bad tests — the equity curve on the screen was never evidence; it was a mirage built from small, invisible cheats.

The classic cheats

Look-ahead bias is using information that would not have existed at decision time — today's close to justify this morning's entry. Survivorship bias is testing only on stocks that exist today, ignoring the delisted and the dead. Optimistic fills assume you traded at prices the market may never have actually offered you. Each one, alone, can turn a losing strategy into a gorgeous curve.

Overfitting: the subtler enemy

Give yourself enough parameters and enough attempts, and you can fit history almost perfectly — while describing nothing about the future. This is overfitting: the strategy has memorised the past rather than learned from it. Defences are unglamorous: fewer parameters, logic you can explain in one sentence, and data the strategy has never seen.

  • Split data: design on one period, validate on another the strategy never touched.
  • Walk-forward test: re-validate on rolling, forward-moving windows.
  • Include realistic costs — brokerage, slippage, taxes — before judging any curve.
  • Judge robustness: does performance survive small changes to parameters? If not, it was noise.

The mindset that protects you

Treat every backtest as an accused witness: guilty of bias until proven innocent. Ask what it assumed, what it ignored, and what would break it. Students in our algo course grade each other's tests before any live discussion — because the skill that matters is not building a strategy; it is being unable to fool yourself about one.