How to model slippage in backtests
Model slippage as three separate components rather than one flat number: the spread you cross, the market impact your own order causes, and the delay cost from latency between signal and fill. A single “5 basis points” assumption is the most common way backtests overstate returns, because impact scales with the square root of participation rate — so costs grow non-linearly as size increases, exactly where a naive constant assumption says nothing changes.
Decompose before you estimate
| Component | What causes it | Scales with |
|---|---|---|
| Spread cost | Crossing from mid to the far touch | Half-spread, roughly constant per trade |
| Market impact | Your order consuming book depth | ~ sqrt(order size / ADV) |
| Delay cost | Price drift between decision and fill | Volatility x sqrt(latency) |
| Opportunity cost | Unfilled portion of the order | Fill rate and subsequent drift |
A workable model
The square-root impact law is the part worth internalising. It has held up across markets and decades of研究 and is the reason capacity is a real constraint: doubling order size does not double impact, it multiplies it by about 1.41 — but that still means impact per share rises with size.
Worked example
Buying 50,000 shares of a stock with 5,000,000 ADV, 2% daily volatility, a 2 bp half-spread, k = 0.7, and 250 ms from signal to fill:
Now scale the order to 500,000 shares (10% of ADV) and impact becomes
0.7 * 0.02 * sqrt(0.10) * 10000 = 44.3 bp. Ten times the size
produced a bit over three times the impact per share — but total cost
in dollars rose more than thirtyfold. A backtest using a flat 5 bp would have
charged the same rate for both.
What this does to a strategy
Cost compounds with turnover, which is where plausible-looking edges die:
| Annual turnover | Round trips | At 33 bp/round trip |
|---|---|---|
| 1x | 1 | -0.33% |
| 12x | 12 | -4.0% |
| 52x | 52 | -17.4% |
| 252x | 252 | -83.2% |
A daily-rebalanced strategy needs to gross more than 80% annually just to break even on execution at this cost level. This is why turnover, not signal quality, is usually the binding constraint on high-frequency approaches.
Practical rules
- Never use one constant. At minimum, make cost a function of participation rate.
- Cap participation in the backtest. If a fill needs more than 5–10% of ADV, the backtest should reject or split it, not assume it filled at the close.
- Charge the spread you would actually pay. Quoted spreads at the open and close differ by multiples from midday.
- Test sensitivity, not a point estimate. Re-run at k = 0.5, 1.0 and 1.5. If the edge disappears, it was never robust.
- Model partial fills. Assuming complete fills at the signal price is optimistic in exactly the conditions where signals fire.
Limitations
- The square-root law is an empirical regularity, not a physical constant; k varies by asset, venue and regime.
- It describes typical conditions. In stress, impact is materially higher and liquidity can vanish, so tail scenarios need separate treatment.
- The model above ignores fees, borrow costs and taxes, all of which are real and strategy-specific.
References
- Almgren, R. & Chriss, N. (2001). “Optimal Execution of Portfolio Transactions.” Journal of Risk 3(2), 5–40.
- Almgren, R., Thum, C., Hauptmann, E. & Li, H. (2005). “Direct Estimation of Equity Market Impact.” Risk 18(7), 58–62.
- Kyle, A. (1985). “Continuous Auctions and Insider Trading.” Econometrica 53(6), 1315–1335.
- Perold, A. (1988). “The Implementation Shortfall: Paper versus Reality.” Journal of Portfolio Management 14(3), 4–9.