DAY 10: Items to Pay Attention to in Backtesting—Spread and Fill/Slip Tracking
Last time (DAY 9), we learned the basic differences and applications of backtesting and forward testing.
This time, we’ll dig a little deeper and focus on elements that are easy to overlook when performing backtests, particularly spreads and **order slippage (slippage)**, among others.
Even if your backtest results are excellent, if the difference in real operation becomes too large, it becomes troublesome. Let’s grasp the mindset to minimize the gap in numbers.
If the spread setting is lax, the gap with real operation widens
In backtesting, it’s common that you cannot accurately reproduce the actual spreads that vary by FX broker and account type.
For example, if you test in MT4 Strategy Tester with a fixed spread setting, the result may be far from the actual variable spread.
-
Risks of fixed spread settings
Many currency pairs have narrower spreads during high-liquidity periods and wider spreads during quiet periods or right after news releases. If you only test with fixed spreads, those variations are not considered at all, and the results may look better than reality. -
Refer to actual average spreads by broker
If possible, check the broker’s average spreads and spread history, and set the backtest options to close values. It’s desirable to configure the tester with numbers close to reality.
Also, not too optimistic (narrow) spreads—it's safer to set them slightly wider.
Consider slippage (order execution)
Slippage refers to the difference between the order price and the actual execution price.
Due to fast market movements or server delays, positions may be opened at prices that are less favorable than expected (higher or lower prices), which increases the effective cost for traders.
-
Backtests often do not reflect standard slippage
Strategy testers assume ideal execution, and the subtle slippage that occurs in real trading is often not accounted for. -
Methods to simulate slippage in testing software or tools
Some backtesting tools have features to predefine slippage amounts, such as testing with “1 pip slippage” or “2 pips slippage.”
If such features exist, ideally perform tests with reasonable slippage values based on actual broker and account conditions.
Rapid moves during news and data releases
Both spreads and slippage become especially pronounced in markets that move rapidly, such as during economic indicator releases or statements from key officials.
Even if the average spread is about 0.3 pips under normal conditions, spreads can widen to 3–5 pips or more during such major events.
-
Examples of measures
-
Set up your EA to stop during news events
-
Introduce filters to refrain from entering positions around releases
-
If your EA aims for trend breaks, target increased volatility while accounting for slippage and strengthening risk management
-
Backtests cannot reproduce these sudden changes accurately, sobe careful not to be swayed by the “best results”.
Towards improving backtest accuracy
-
Use high-quality historical data
Some brokers provide tick data (price changes per tick), or you can obtain tick data with external tools for more accurate testing.
Generating ticks pseudo-for minute-bar data tends to introduce more error. -
Test over multiple periods
Testing over periods with different spreads or market conditions (high and low volatility periods) helps gauge an EA’s robustness. -
Humility in questioning large backtest results
Even if you see thousands of percent returns or extremely high win rates, be aware that they are unlikely to be reproducible in real trading, and avoid harboring overly optimistic expectations.
Today’s recap and a look ahead
-
Even if backtest results are good, many cases do not reflect reality due to fixed spread settings or ignored slippage
-
If you seek faithful reproduction, use as high-quality tick data as possible and conservatively assume wider spreads and some slippage
-
Actual market moves around news events are hard to reproduce in backtests, so you need to set operating rules for your EA based on that assumption
Next time (DAY 11), we will cover the theme of “Portfolio management of multiple EAs — risk diversification and revenue stabilization,” explaining the benefits of not sticking to one EA and tips for combining them as a portfolio. It will be a big hint for reducing drawdown risk and achieving more stable profits.
Introduction to the EAs I sell
If you are considering running EAs, please also take a look at the EAs I sell.
https://www.gogojungle.co.jp/users/147322/products
During backtesting, estimate spreads and slippage conservatively and test accordingly.
Checking results under realistic conditions will greatly increase your confidence in operation.
In the next article, we will learn together how to combine multiple EAs to achieve stability.
Please click “Read more” to deepen your knowledge.