← All articles

Quant

Slippage — the cost your backtest forgets

2026-07-02 · 5 min read

A backtest says "buy at 100.00" and books the trade at exactly 100.00. Reality is less generous: by the time your order actually fills, the price you get is a little worse — every single time. That gap is slippage, and ignoring it is one of the fastest ways to turn a losing strategy into a great-looking backtest.

Where the gap comes from

When you send a market order, you don't buy at "the price" — you buy from whoever is selling, cheapest first. If there aren't enough shares at the best offer, your order walks up the book, filling at progressively worse prices until it's done. Your average fill ends up above the quote you saw.

Walking up the order book 100.00×50 100.05×50 100.10×100 slippage quoted your avg fill
Buying 200 shares eats all three levels — your average price lands well above the 100.00 you saw quoted.

Three things widen that gap:

  • The bid-ask spread — you buy at the ask and sell at the bid, so you start slightly underwater on every round trip.
  • Market impact — big orders move the price against themselves by consuming depth.
  • Latency — between your decision and the fill, the market keeps moving; in fast conditions it moves away from you.

Why backtests quietly cheat

A naive backtest fills your order at the last printed price, with unlimited size, instantly. That's a fantasy: it assumes zero spread, zero impact, and zero delay. On an intraday strategy that trades often, even a fraction of a tick per trade compounds into a huge difference — enough to flip a "profitable" system negative once real costs are in.

The gist

The price you see quoted is rarely the price you get. Every trade pays a little toll — and a backtest that skips the toll is selling you a fairy tale.

Modelling it honestly

  • Charge a realistic cost per trade — at minimum half the spread, plus fees; more for size or illiquid names.
  • Fill on the next bar, not the signal bar — you can't trade on a price you only knew after it happened.
  • Stress-test it — if your edge survives double the assumed slippage, it's real; if it evaporates, it was never there. (Related: your backtest is lying to you.)

Slippage isn't a rounding error — for high-frequency, small-edge strategies it's often the deciding factor. The strategies that survive contact with a real broker are the ones that were priced honestly on a laptop first.


SlippageExecutionBacktestingQuant
← Back to the blog