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: 1689
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: 5594
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: 6955
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: 7821
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: 5594
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 202 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?
Shadow Trader
Posts: 5594
Joined: Wed Sep 09, 2026 5:19 pm

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

Post by Shadow Trader »

Slippage is often modeled as a constant number of pips, which is convenient but inaccurate. Real slippage varies with volatility, time of day, order type, and size. A better model reflects its distribution.

Collecting data from live or small-size test trades produces an empirical distribution. Separating buy and sell orders, entries and exits, and market versus stop orders shows where slippage concentrates. The distribution is typically skewed, with most trades near zero and occasional large outliers.

Backtests can then draw random slippage values from the observed distribution, conditioned on volatility or session. Running many simulations produces a range of outcomes instead of a single optimistic curve. The tail of the distribution matters most, since a few large slippage events can erase many small gains. Updating the model periodically as new fills accumulate keeps it relevant. A strategy that remains profitable under a realistic slippage model has a far stronger claim to a genuine edge.
Fairman
Posts: 6955
Joined: Tue Jul 21, 2026 7:11 am
Location: Abuja

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

Post by Fairman »

That ETH fill is a good example, and it's the same gap I'd expect on any thin weekend book. Your limit at 2,508 triggered when the price printed there, but behind it the available size was probably tiny, so the order walked down and ended at 2,503.5. That's 4.5 dollars on 1 coin, nothing dramatic, but if you had scaled to 20 coins it becomes 90 dollars.

Backtesting it properly is hard, I agree. The practical way is to stop treating a limit as a fixed price. I'd give each backtested sell limit a fill price that is the limit minus a random draw taken from your own weekend history, for example anywhere between 0 and 6 dollars, with weekend trades drawing from a wider range than weekday trades. And I'd also require the market to trade through the limit by about 1 dollar before it counts as filled.

You can build the real distribution cheaply. Write down the requested versus actual price for your next 30 weekend exits and use those numbers.

Is your broker's price the same as the exchange's, or an aggregated feed? That changes whether the slippage you see comes from the broker or from the market itself.
It’s Fairman :geek:
FXS Prop Desk
Posts: 1689
Joined: Wed Oct 07, 2026 9:52 am

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

Post by FXS Prop Desk »

Fairman wrote: A limit order can't fill worse than its limit, so it has no negative slippage by definition.
Fair correction, that wording was loose. For limits the cost is the fills you don't get, and trade-through is the right lever. How far through is worth tying to pair and hour rather than one fixed amount, since a touch at the London open on EURUSD fills far more often than the same touch at 12:30. Running touch, plus 0.1 and plus 0.3 pips as three scenarios shows quickly whether a strategy only exists under touch fills.
FXS Official Team | The Idea Lab & Strategy
FXS Prop Desk
Posts: 1689
Joined: Wed Oct 07, 2026 9:52 am

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

Post by FXS Prop Desk »

Fairman wrote: A limit order can't fill worse than its limit, so it has no negative slippage by definition.
Fair correction, that wording was loose. For limits the cost is the fills you don't get, and trade-through is the right lever. How far through is worth tying to pair and hour rather than one fixed amount, since a touch at the London open on EURUSD fills far more often than the same touch at 12:30. Running touch, plus 0.1 and plus 0.3 pips as three scenarios shows quickly whether a strategy only exists under touch fills.
FXS Official Team | The Idea Lab & Strategy
Post Reply