The rule your backtest uses to convert a theoretical price into a realistic one. It can be a fixed number of ticks, a fraction of the spread, or a function of size and volatility.
The simplest defensible model is to pay the full bid-ask-spread on entry and exit for anything taking liquidity, plus a buffer in volatile conditions. A common refinement scales with the ratio of your order to recent volume, since larger orders move the price.
Slippage should also depend on when you trade. Spreads are wide at the open, at the close in some markets, and after news; a model using an average spread systematically understates costs for a strategy that trades exactly at those moments, which many do.
Sensitivity is the real test. Re-run with double and triple the assumed cost. A strategy whose edge survives 3x costs is robust; one that dies at 1.5x is a cost-arbitrage claim that needs execution infrastructure you probably do not have.
Original diagrams for the ideas on this page. Illustrative, not real market data.
Slippage on a market order. You click at 20.00, but only 300 shares are resting there, so the rest of the order fills at 20.01, 20.03 and 20.04. The average price paid is 20.02, and that two-cent gap is slippage.The bid-ask spread. Buy orders sit below, sell orders above, and the gap between the best bid (50.01) and best ask (50.04) is the spread you pay to cross. Bar length shows the size resting at each price.
Educational only, not advice. Spotted an error? Post in Site Feedback.