Backtesting is where most strategies go to die — correctly.
What you will learn
Build a rigorous backtest
Understand market making
Avoid backtest pitfalls
The test loop
The test loop
Measuring real risk
Measuring real risk
What a backtest tests
A backtest replays your strategy against historical data and reports the result. But the raw result is almost always optimistic. A honest backtest must account for fees, slippage, and survivorship bias — otherwise you're testing a fantasy.
💡 The optimism gap
Your backtest shows 40% annual returns. But it ignored 0.1% per-trade fees, slippage on fills, and it only used stocks that still exist today (survivorship bias). With costs, the real result is often near zero — or negative. Costs are the truth serum of backtests.
Robustness checks
A good backtest is stress-tested: out-of-sample data (test on periods you didn't tune on), different regimes (bull/bear/choppy), and parameter sensitivity (does a tiny tweak destroy the edge?). A strategy that only works with one exact setting is curve-fit, not real.
How market makers work
Market makers quote both a bid and an ask and earn the spread. They profit from the flow of trading — buying at the bid, selling at the ask — not from predicting direction. Their edge is the spread, their risk is inventory (being stuck holding a falling asset) and adverse selection.
💡 The maker's real risk
A market maker earns $0.01 per share on millions of shares — but adverse selection is brutal: when a big informed trader hits their ask, the maker is left holding an asset about to fall. Makers survive by managing inventory and widening spreads when risk rises.
The takeaway
Backtesting separates fantasy from strategy; market making teaches you that edge often comes from structure (the spread, the flow) rather than prediction. The sophisticated path is to earn structural edge — not to out-predict everyone.
❓ Quick check
A backtest that ignores fees and slippage is:
A) Realistic
B) Overly optimistic
C) Too conservative
D) Perfect
Costs are missing.
(Knowledge check — full exam is next)
Key takeaways
Honest backtests include fees, slippage, and survivorship