How to Model Spread Realistically in Backtests
TL;DR: A backtest that uses a fixed, tight spread is almost always more flattering than reality. Variable spread modeling, accounting for news widening and your specific broker's spread profile, is the difference between a strategy that looks good on paper and one that holds up live.**
Why Spread Modeling Is the Most Underrated Backtest Variable
When traders evaluate a backtest, they scrutinize drawdown, Sharpe ratio, win rate, and profit factor. Spread is treated as an afterthought, usually a single number dropped into a settings field and forgotten. That oversight quietly inflates every metric in the report.
Spread is a real cost that comes out of every trade, twice: once on entry and once on exit. If your backtest spread does not match the spread your broker actually delivers at the times your strategy trades, your results are fiction. Not pessimistic fiction. Optimistic fiction. That is the dangerous kind.
This post covers how fixed and variable spread models differ, how brokers actually structure their spreads across sessions, what happens to spreads around news events, and how to build a spread simulation that does not flatter you.
Fixed vs Variable Spread: What Each Model Actually Assumes
Fixed Spread
A fixed spread model applies the same spread value to every bar, every session, every news event, for the entire backtest period. The number is usually whatever you type into the backtest configuration field.
Most traders type a number they have seen quoted somewhere, perhaps a broker's advertised spread during the London session on a quiet Tuesday. That number gets applied to a 3 AM Asian session trade, a news spike, and a thin holiday market equally.
Fixed spread is not useless. It works reasonably well for strategies that only trade during liquid, predictable windows and that hold positions long enough that a few extra pips of spread would not meaningfully change outcomes. For scalpers, news traders, and any system trading across sessions, it produces misleading results.
Variable Spread
A variable spread model changes the spread over time, ideally reflecting actual market conditions during the backtest period. The inputs are typically:
- A baseline spread for the instrument during normal liquid hours
- A multiplier or absolute addition for thin sessions
- A separate handling for known high-volatility events
Getting this right requires data. The better your spread data, the more accurate your simulation. The sections below explain what drives that variation.
How Broker Spread Profiles Actually Work
Brokers do not apply a single spread. Their pricing engines continuously adjust based on aggregated liquidity from their liquidity providers. What you see quoted on a broker's marketing page is typically the spread during peak liquidity, in normal conditions. It is a floor, not an average.
A realistic spread profile for a major pair like EURUSD might look like this across a trading day:
- Asian session (Tokyo hours): Spreads widen, sometimes two to four times the London midday baseline, because fewer institutional participants are active and liquidity thins out.
- London open: Spreads compress as liquidity floods in. This is often the tightest point of the day.
- London/New York overlap: Typically the most liquid and tightest spread window.
- New York afternoon into close: Spreads begin drifting wider as European participants exit.
- Sunday open: Spreads can be dramatically wider than weekday norms for the first few minutes as the market reopens after the weekend gap.
If your strategy fires signals at 2 AM server time and your backtest uses the London session spread, every one of those trades is being evaluated against the wrong cost structure.
Broker-Specific Differences
This matters because not every broker accesses the same liquidity pool. An ECN broker routing to a deep pool of tier-one liquidity providers will have a different spread profile from a market-maker with a fixed markup layered on top of internal pricing. The same strategy on GBPJPY could face spreads that differ by a factor of two or three between broker types during thin hours.
The implication for backtesting is that a strategy validated using one broker's data may look worse or better when running live on a different broker, purely because of spread differences. When you build a spread model, you should use spread data that matches the broker you intend to trade on.
choosing the right broker type for your strategy
News Widening: The Event Most Backtests Ignore Entirely
High-impact news releases cause spreads to widen, sometimes severely and very briefly, and then snap back. Non-Farm Payrolls, FOMC rate decisions, CPI prints, and similar events can push spreads on major pairs to multiples of their normal levels for seconds to minutes around the release.
The problem for backtesting is that most historical data does not capture this. OHLC bar data, the format most retail backtesting platforms use natively, collapses each bar into four prices. A news spike that widened the spread for 30 seconds inside a 15-minute bar is invisible in that data. Your backtest executes at whatever price it finds in the bar, with whatever spread you have set, completely unaware that the spread was actually five times wider at the moment your signal triggered.
What Realistic News Modeling Requires
Handling news spread widening properly means one of three things:
-
Avoid trading around known high-impact events. If your strategy has no edge around news, building a news filter that prevents entries within a defined window before and after releases is straightforward and removes the problem entirely.
-
Apply a spread multiplier for news bars. If you have a record of news event timestamps, you can code a rule that applies an elevated spread during those bars. The multiplier you use should be conservative. Underestimating a news spike is worse than overestimating it.
-
Use tick data with real spread recorded. This is the most accurate method and is discussed below.
building a news filter for MetaTrader strategies
Does Using Tick Data Solve the Spread Problem?
Is tick data backtest accuracy significantly better than OHLC?
Tick data backtesting is a meaningful improvement over OHLC for spread modeling, but only when the tick data includes the actual bid/ask spread at each tick, not just the midpoint price.
Many sources of tick data provide only the mid price. If you feed that into a backtest platform and add your own fixed spread on top, you are back to the same problem. The spread is still a guess, not a measurement.
When tick data includes both the bid and ask at each recorded tick, the spread at any given moment is the actual bid/ask gap from that moment in history. Your backtest executes against real bid prices for sells and real ask prices for buys. News widening shows up automatically because the data recorded it. Session thinning shows up. Sunday open gaps show up.
The practical constraint is that high-quality tick data with full bid/ask is large, sometimes difficult to source for more than a few years, and computationally expensive to backtest against. It is not always practical. But for a strategy where spread sensitivity is high, it is the right tool.
How Spread Misrepresentation Flatters Backtests
Let's be concrete about the direction of the error. Using a spread that is too tight makes a backtest look better than reality in several specific ways:
More Trades Appear Profitable
A strategy that barely breaks even at a real spread of 2.5 pips may look like a solid winner with a backtest spread of 0.5 pips. Each trade's net result shifts by two pips. Multiply that by hundreds of trades and the cumulative difference becomes significant enough to flip a marginally unprofitable system into what looks like a winner.
Scalping Strategies Are Especially Vulnerable
Short-term strategies targeting small pip ranges are the most distorted by spread errors. If your average target is 5 pips and your average stop is 5 pips, applying a spread that is 1 pip too tight changes your reward-to-risk ratio materially. At scale, it can mean the difference between a strategy with a positive expectancy and one with a negative one.
Drawdown Appears Smaller
When trades that should have been stopped out by a wider real-world spread show as winners or break-evens in the backtest, the drawdown sequence is also distorted. You may think your strategy's maximum drawdown is X when the live drawdown will be closer to X plus the cumulative drag of undercosted spread across losing periods.
What This Means for Strategy Development
Any optimization process running on top of a too-tight spread model is optimizing against the wrong cost function. The parameters it surfaces as optimal may be entirely different from what would be optimal under realistic spread conditions. If you later run the strategy live and the results diverge significantly from the backtest, undercosted spread is one of the first suspects to investigate.
walkforward testing and avoiding backtest overfitting
Building a Practical Variable Spread Model
If you do not have access to full tick data with bid/ask, you can build a reasonable variable spread model from components you can assemble manually.
Step 1: Establish your baseline spread. Find your broker's typical spread for the instrument during peak liquidity. Most broker platforms display the current spread in real time. Monitor it over several peak-hours sessions and note the range.
Step 2: Establish session multipliers. Monitor the same instrument during Asian session hours and note how much wider the spread runs relative to baseline. Do the same for the Sunday open window. These observations give you multipliers to apply to your baseline.
Step 3: Account for news events. Pull a calendar of major scheduled events for the backtest period. For each one, decide whether to exclude bars around the event or apply a spike multiplier. If you choose the multiplier approach, be conservative. A multiplier of three to five times the baseline for one to three bars around a major release is a reasonable starting estimate.
Step 4: Build in a buffer. Even well-built variable spread models are estimates. Adding a small buffer, perhaps ten to twenty percent, above your estimated spread costs helps ensure your backtest does not become the upper bound of real-world performance.
Step 5: Segment your backtest results. Run the backtest and examine performance segmented by session and by whether news events occurred. If the strategy holds up across all conditions, you have more confidence. If it only works during tight-spread conditions, you have found a structural dependency that needs addressing before live deployment.
FAQ
Q: What spread should I use for a MetaTrader backtest if I do not have variable spread data?
A: Use your broker's average spread for the instrument during the sessions your strategy actually trades, not the advertised minimum. If your strategy trades across sessions, run separate tests with session-appropriate spreads and compare. Using a single tight number for all conditions is the most common way backtests overstate performance.
Q: Can I get historical spread data for my broker?
A: Some brokers provide historical tick data that includes bid and ask, and you can download it directly from the MetaTrader terminal. The quality and depth of that data varies by broker. Third-party data vendors also sell tick data with spread for major pairs. Always verify that the data source and the timeframe match your broker's actual pricing environment before treating it as authoritative.
Q: How much does spread typically widen during a major news release?
A: This varies significantly by broker type, instrument, and the specific news event. For major pairs like EURUSD on a well-connected ECN broker, widening during events like NFP can be two to five times the normal baseline. For exotic pairs or at less liquid brokers, the widening can be much more extreme. The safest approach is to treat news windows as a risk zone and either avoid them or apply a conservative worst-case assumption.
Q: Does the MetaTrader 5 strategy tester support variable spread simulation?
A: MT5's strategy tester has a "Random delay" and "Real spread" option when using tick data downloaded from a connected broker account. The "Real spread" mode uses the spread recorded in the tick data rather than a fixed user value. This is meaningfully more accurate than fixed spread testing, provided the tick data is sourced from a broker with spread characteristics similar to where you intend to trade live.
Q: My backtest looks great but the strategy underperforms live. Could spread be the cause?
A: It is one of the most common culprits. Compare your backtest's assumed spread with the spread your broker is actually delivering during the sessions you trade. Also check whether your live fills are experiencing any additional slippage beyond spread. The combined effect of understated spread and unmodeled slippage accounts for a large share of the gap between backtest and live performance for short-term strategies.
The Bottom Line
Spread modeling is not a cosmetic detail. It is a core input that shapes every performance metric your backtest produces. Fixed spread models are convenient and often wrong in the direction that flatters you. Variable spread models that reflect session behavior, broker-specific pricing, and news event widening take more effort to build but produce results you can actually trust.
If your strategy cannot hold up against a realistic spread model, finding that out during backtest development is far better than finding it out after deploying capital. Tighten your spread assumptions, not your stops.