Docs menu

Market impact

Market impact is the extra price a larger order pays because it moves the market. In a backtest it is off by default. When it is on, a taker fill pays an extra adverse price on top of slippage, and a larger order pays more per unit.

The model

The extra price is k times the recent volatility, times the square root of the order size divided by the typical bar volume, times the price. Buys fill higher and sells fill lower.

  • Volatility is the standard deviation of the log returns of the closes in the window.
  • Typical volume is the median volume of the bars in the window.
  • The window is the last 30 bars by default, taken strictly before the fill bar. The fill bar's own volume never enters.
  • k is 1.0 by default. Published estimates run from about 0.5 to 1.5.

The extra price is zero when fewer than 5 bars came before the fill, and on tick-only replays, which have no bar history. Makers never pay it.

Where it is switched on

  • Compounding. This switch in the Backtester's strategy parameters sizes positions off the running balance. Turning it on also turns the impact model on when it was off. The result shows it as On: MTM sizing + impact=sqrt.
  • Capacity. The Capacity tab in Research re-runs one strategy across a ladder of account sizes with impact on. Its fields are impact k and impact window (bars), which start at 1 and 30.

Settings and the per-run Engine & execution card have no impact field. Paper Settings has none either, and live fills are the exchange's.

What it does not do

  • It puts a price on size and does not ration liquidity. Fills stay whole, with no participation cap and no partial fills from size.
  • Order-book (level 2) depth is coming.

Related: Fills and slippage, Spread and Costs and fees.