Advertisement IC Markets

Slippage Distributions for Backtests: Fixed, Random or Empirical

Share, develop, and backtest custom MQL4/MQL5 Expert Advisors, Python data-scraping scripts, trading bots, and automated market alert systems.
Post Reply
FXS Prop Desk
Posts: 200
Joined: Wed Oct 07, 2026 9:52 am

Slippage Distributions for Backtests: Fixed, Random or Empirical

Post by FXS Prop Desk »

Backtests need a slippage assumption. The choice affects results, especially for scalping.

Options:
  • Fixed: e.g. 0.2 pips on every fill. Simple, but unrealistic.
  • Random: drawn from a distribution, e.g. normal with a mean and standard deviation.
  • Empirical: sampled from your own live fills, by time and order type.
Empirical is most realistic if you have enough live data. Stops usually slip more than market entries, and news periods much more.

A practical middle ground for traders without much live data is to use a random distribution with a negative mean for stops and a mean close to zero for limit orders, then tighten the assumptions as live fills accumulate.

Whatever method is used, running the backtest twice — once with optimistic and once with pessimistic slippage — shows how sensitive the strategy is. If it only works in the optimistic case, the edge is probably too thin.

How do you model slippage in backtests?
FXS Official Team | The Idea Lab & Strategy
Recommended broker for automated trading & scalping IC Markets
Shadow Trader
Posts: 280
Joined: Wed Sep 09, 2026 5:19 pm

Re: Slippage Distributions for Backtests: Fixed, Random or Empirical

Post by Shadow Trader »

I'd push back slightly on the normal distribution for stops. In my live fills the slip on stops isn't bell shaped at all. Most stops fill within 0.1 pips, and then a small number slip 1 to 3 pips, nearly all around data releases or the rollover.

A normal distribution with the same mean spreads that cost evenly across every trade, which hides the real risk. Your average looks fine while the tail is where accounts get hurt.

What I do with limited data is a mixture: 95% of stops get a small slip of 0.0 to 0.2 pips, and 5% get a slip drawn from 1 to 3 pips. Not elegant, but it lands much closer to my real record than any single distribution did.

I also tag each backtest trade with whether it falls within 15 minutes of a high impact release, and apply the bad slip there more often. That alone moved one strategy from marginal to clearly not worth trading.

How much live data would you want before switching to empirical? I've been using roughly 300 stop fills as the threshold, but I've never seen anyone justify a number.
Fairman
Posts: 3071
Joined: Tue Jul 21, 2026 7:11 am
Location: Abuja

Re: Slippage Distributions for Backtests: Fixed, Random or Empirical

Post by Fairman »

FXS Prop Desk wrote: a mean close to zero for limit orders
Small correction worth making there. A limit order can't fill worse than its limit, so it has no negative slippage by definition. The real cost of limits is the fills you don't get, and that's what a backtest needs to model. A common shortcut is to require price to trade through the limit by a small amount before counting a fill, rather than just touching it, because touch fills in a backtest assume you were first in the queue. That one assumption can change a limit-based scalping strategy more than any slippage setting. Your optimistic versus pessimistic run is a great habit, and touch versus trade-through is a good thing to vary in it as well.
It’s Fairman :geek:
PTScalper
Site Admin
Posts: 4706
Joined: Mon Jul 20, 2026 1:28 pm

Re: Slippage Distributions for Backtests: Fixed, Random or Empirical

Post by PTScalper »

Fairman wrote: Mon Oct 12, 2026 9:01 am
FXS Prop Desk wrote: a mean close to zero for limit orders
Small correction worth making there. A limit order can't fill worse than its limit, so it has no negative slippage by definition. The real cost of limits is the fills you don't get, and that's what a backtest needs to model. A common shortcut is to require price to trade through the limit by a small amount before counting a fill, rather than just touching it, because touch fills in a backtest assume you were first in the queue. That one assumption can change a limit-based scalping strategy more than any slippage setting. Your optimistic versus pessimistic run is a great habit, and touch versus trade-through is a good thing to vary in it as well.
Yeah you are right.

But how to backtest it properly? Its not so easy.

For example at weekend i had TP at 1 ethereum on 2508$ with limist sell order, it was executed immediately after that price occured, but in reality it was closed at 2503.5$ thanks to liquidity drop.
Preserve your own money. Scale with the market's money. Exponential growth is the ultimate key.
Shadow Trader
Posts: 280
Joined: Wed Sep 09, 2026 5:19 pm

Re: Slippage Distributions for Backtests: Fixed, Random or Empirical

Post by Shadow Trader »

Another thing that catches people with empirical slippage: your live fills are filtered by the strategy you were running. If you only ever traded quiet hours, sampling those fills for a new strategy that trades the open will understate the cost badly.

So I group my empirical sample by hour and order type, and if a backtest trade lands in a bucket with fewer than about 50 real fills, I fall back to the pessimistic random assumption for that bucket.

The optimistic versus pessimistic run is the best part of your post. I'd add a third run with zero slippage as a sanity check. On one London break strategy of mine the three came out at about 0.85R, 0.42R and 0.05R expectancy per trade.

The attached illustration shows those three runs side by side. The gap from zero to pessimistic was bigger than the average profit per trade, so I stopped there rather than trying to tune the middle case.
img_13458_r2.png
img_13458_r2.png (43.6 KiB) Viewed 4 times
On positive slippage I still model it as zero. Counting on favourable slips in a backtest feels like borrowing from a future that may not arrive. Do you include spread widening in the slippage figure, or model it separately?
Post Reply