Slippage and commission in backtesting: getting realistic results

11 min read
BacktestingSlippageCommissionsSpreadTrading

Slippage is the primary driver of the gap between backtesting and live trading: according to analyses from leading prop firms, scalping strategies lose an average of 30 to 50 percent of their simulated performance once slippage is properly modeled. Yet the vast majority of retail traders ignore this variable entirely in their backtests, then wonder why live results diverge so sharply from their projections.

Why slippage destroys optimistic backtests

What slippage actually is in trading

Slippage occurs at two points: when opening a position (entry slippage) and when closing it (exit slippage). According to Investopedia's guide on slippage, slippage is especially impactful during high-volatility periods and for high-frequency execution strategies.

For a scalper trading EUR/USD, 1 pip of slippage at entry and 1 pip at exit means 2 additional pips of cost per trade. On a strategy targeting 5 pips of profit per trade, that is 40 percent of the expected gain gone before commissions and spread are even counted.

Slippage accumulates invisibly

Over 1,000 trades with just 1 pip of average slippage, you lose the equivalent of 1,000 pips. On EUR/USD with a standard lot, that is roughly 1,000 euros of annual return wiped out and completely invisible in a backtest that does not model execution reality.

The systematic backtest-to-live gap

Financial regulators consistently publish data confirming the gap between traders' expectations and actual outcomes. According to the AMF report on CFD and Forex traders, 77 percent of retail clients lose money trading CFDs and Forex over a 4-year period in France. A significant portion of the gap between expected and actual results stems directly from poor modeling of transaction costs in backtests.

ESMA requires all regulated European brokers to display this loss percentage prominently in their advertising. This mandate reflects how structurally important execution costs are in the underperformance of retail traders.

Without modeling slippage and commissions, a backtest is an idealized simulation where every order executes at the exact displayed price with no delay and no cost. That is not the real market.

To understand how other biases distort your backtests, read our guide on common backtesting mistakes to avoid.

Modeling slippage in your backtest

Fixed vs variable slippage: which approach to choose?

Two approaches exist for integrating slippage into a backtest:

Fixed slippage: you assign a constant value applied to every trade (for example, 1 pip). Easy to configure, but unrealistic because actual slippage varies with volatility and liquidity conditions.

Variable slippage: slippage is calculated based on market conditions at the moment of execution (real spread, available volume, time of session). More accurate, but requires tick data or high-resolution OHLCV data.

For the majority of swing and day trading strategies, a conservative fixed slippage gives a reasonable estimate. For scalping strategies, variable slippage becomes essential to avoid a critical underestimation of costs.

Reference slippage values by asset and broker type

AssetAverage slippage (normal conditions)Slippage during macro announcements
EUR/USD, GBP/USD (major pairs)0.5 - 1.5 pips3 - 8 pips
XAU/USD (Gold)5 - 15 pips30 - 50 pips
US30, SPX500 (indices)0.5 - 2 points5 - 15 points
BTC/USD (crypto)0.05 - 0.2%0.5 - 2%

These are general reference values based on typical market conditions. Your specific broker may have better or worse execution depending on their technology and liquidity access. Always consult your broker's execution specifications before setting your slippage model.

Impact on profit factor and win rate

Integrating slippage and commissions into a backtest fundamentally changes key metrics:

  • Profit factor: a 2.0 ratio without costs can drop to 1.2-1.5 once real costs are modeled
  • Win rate: trades near the breakeven threshold flip to net losses
  • Maximum drawdown: loss periods extend proportionally to cumulative costs over time

For a deeper analysis of these critical metrics, read our guide on expectancy and profit factor in backtesting.

Integrating commissions and spread

Variable spread by trading session

Spread is not fixed throughout the trading day. On EUR/USD with a typical ECN broker, variations are significant:

  • Asian session (00:00-08:00 UTC): spread of 1.5 to 2.5 pips
  • London open (08:00-10:00 UTC): spread of 0.5 to 0.8 pip
  • US session (13:00-17:00 UTC): spread of 0.5 to 0.9 pip
  • London/New York overlap (13:00-16:00 UTC): minimum spread, sometimes 0.1 to 0.3 pip

A backtest applying a fixed spread at all hours overestimates conditions during liquid sessions and severely underestimates costs during quiet periods. For a strategy that trades primarily during the Asian session, the error can reach 200 to 300 percent of the actual average cost.

Overnight financing costs (swap)

Positions held open overnight carry swap fees (rollover). These fees depend on the interest rate differential between the two currencies in a Forex pair:

  • EUR/USD long: typically negative swap (around -0.5 to -2 euros per standard lot per night)
  • USD/JPY long: can be positive when the US dollar offers a higher rate than the Japanese yen

For swing trading strategies that hold positions for multiple days, ignoring swap fees can turn a marginally profitable strategy into a losing one, particularly on long-held positions.

Calculating total cost per trade

The real cost per trade combines several distinct components:

Total cost = Spread + Commission + Slippage (entry + exit) + Swap if overnight

Concrete example on EUR/USD with 1 standard lot (100,000 units) with a typical ECN broker:

  • Spread: 0.8 pip = 8 euros
  • Commission: 3.5 euros (round-trip)
  • Slippage: 1 pip x 2 = 20 euros
  • Swap if overnight: 1.5 euros

Approximate total cost: 33 euros per trade, before counting strategy performance.

Calculate your real breakeven point

With the costs above on a standard lot EUR/USD, each trade needs to generate at least 33 euros (3.3 pips net) just to break even. A scalping strategy targeting 5 to 8 pips of profit per trade is therefore operating on a very thin margin once costs are correctly factored in.

To avoid other common errors that undermine backtest reliability, read our guide on OHLC data quality validation.

Tools that handle slippage automatically

TradingView vs MetaTrader vs Backtrex

Automatic handling of slippage and transaction costs varies considerably across tools:

FeatureBacktrexTradingViewMetaTrader 5
Automatic slippage integrationYes, calibrated by assetPartial (manual fixed value)Yes (Strategy Tester)
Session-variable spreadYes, simulated by hourNo (fixed spread only)Yes (broker data)
Configurable commissionsYes, by broker and assetYes (manually)Yes (manually)
Swap/rollover feesYes, automatic calculationNoYes (historical rates)
Configuration complexityNone (zero manual setup)High (manual entry)Very high (MQL script)
Guaranteed backtest/live parityTarget < 2%Not guaranteedNot guaranteed

How Backtrex guarantees less than 2% divergence from live

Backtrex automatically integrates real cost parameters into every backtest: slippage by asset type, average spread by trading session, and commissions based on your broker type. The goal is divergence below 2 percent between backtest metrics and live performance.

This is achieved through a three-layer approach:

1

Asset and session-level slippage modeling

Each instrument uses slippage values calibrated on real execution data, differentiated by time of day and asset class to reflect actual market microstructure.
2

Dynamic spread by market liquidity

Applied spread varies by session, accurately reproducing real liquidity conditions: tight during liquid London and New York sessions, wider during off-hours.
3

Automatic backtest/live cross-validation

Backtrex compares backtest results against live performance on the same periods and alerts when divergence exceeds the 2% target, ensuring simulation model integrity.

Explore how these features fit into the complete workflow on the features page, or compare available plans on the pricing page.

Pre-validation checklist for a realistic backtest

Questions to ask before going live

Before deploying a strategy in live trading, systematically verify these points:

01
Have you integrated realistic slippage for your strategy type (scalping: 2-3 pips minimum, swing: 0.5-1 pip)?
02
Does the spread match the actual trading hours and sessions your strategy targets?
03
Have you included your broker's commissions, including full round-trip fees?
04
If your strategy holds positions overnight, have you factored in swap fees?
05
Has the backtest been validated on an out-of-sample period separate from the optimization period?
06
Does the profit factor remain above 1.5 after full real-cost integration?
07
Have you stress-tested robustness by increasing slippage by 50% to simulate degraded market conditions?

For further strategy validation, read our article on backtesting vs forward testing and our guide on intraday scalping strategy backtesting.

Important Risk Warning

Trading financial instruments involves significant risk of capital loss. Past performance does not guarantee future results. Backtest results presented on this platform are based on historical data and do not constitute investment advice. You should not invest money you cannot afford to lose. Always consult a qualified financial advisor before making any investment decisions.

Conclusion

Slippage and transaction costs are not secondary technical details: they are the variables that separate a flattering backtest from a realistic projection. Correctly integrating slippage, spread, commissions, and swap fees into your simulations lets you quickly identify strategies that will survive contact with the real market, and eliminate those that only work under ideal execution conditions.

FAQ

Slippage in a backtest refers to simulating the difference between the expected execution price and the price actually received. In real trading, this gap exists because of network latency and market liquidity at the exact moment of the order. A backtest that ignores slippage assumes all orders execute at exactly the desired price, which is unrealistic and leads to systematically overstating performance. The impact is especially significant for scalping strategies where every pip matters.

For major pairs (EUR/USD, GBP/USD, USD/JPY) under normal market conditions, 1 to 2 pips of slippage per trade is a conservative but realistic estimate. During major macroeconomic announcements (NFP, Fed or ECB rate decisions), slippage can reach 5 to 10 pips or more. For scalping strategies, testing with a minimum of 2 to 3 pips of slippage is recommended to get an accurate picture of live performance.

Yes, particularly for high-frequency strategies. A commission of 3.5 euros per lot round-trip appears negligible in isolation, but over 1,000 trades per year on a standard EUR/USD lot, it adds up to 3,500 euros of cumulative cost. For a strategy targeting 10 percent annual return on a 10,000-euro account, those fees absorb 35 percent of the expected gain, often turning a profitable strategy into a losing one.

The most accurate method uses tick data that includes the real bid/ask at every moment during the session. Without tick data, you can apply session-averaged spreads differentiated by time: tight during liquid London and New York sessions (0.5 to 1 pip), wider during the Asian session and overnight hours (1.5 to 2.5 pips). Backtrex applies these spread variations automatically by time of day without any manual configuration.

Swap, or rollover, is a daily fee applied to positions kept open overnight. It is calculated based on the interest rate differential between the two currencies in a Forex pair. For swing strategies holding positions for multiple days or weeks, swap can represent a meaningful cost. To include it in a manual backtest, multiply the average number of nights held by the broker's daily swap rate for each instrument in your strategy.

Slippage impact on scalping is proportionally far greater than on swing strategies. A scalping strategy targeting 5 pips of profit carries a 2-pip slippage cost representing 40 percent of the target gain. The same slippage value represents only 4 percent for a swing strategy targeting 50 pips. This is why scalping strategies require particularly precise slippage modeling: an overly optimistic estimate can transform a profitable strategy into a consistently losing one in live conditions.

Backtrex integrates slippage parameters calibrated on real execution data for each asset class, session-variable spreads, and configurable commissions by broker by default. The target is less than 2 percent divergence between backtest metrics and live performance. This approach eliminates manual parameter entry, which is a frequent source of errors and optimism bias in manual backtests.

Suggested Reads

Ready to backtest your strategies?

Join the waitlist and be the first to build, test, and validate trading strategies โ€” no coding required.

Create your free account in 30 seconds. No credit card required.