LEARN · EN · easyquanttrading.com
The three costs that quietly kill backtests
There is a specific, ordinary reason that a strategy which looks profitable in a backtest loses money in an account: the backtest was free and the account is not. Spread, commission and slippage are three different costs with three different behaviours, and treating them as one lump is how the surprise happens.
- Spread is a cost on every trade, paid instantly on entry
- Commission is predictable and proportional to size
- Slippage is the least predictable and the largest in fast markets
- A strategy with a small average win is the most sensitive to all three
Spread: the cost you pay without noticing
Every market has a bid and an ask. Buying happens at the ask, selling at the bid, and the gap between them is the spread. It is a cost you pay on entry and again on exit, and it is deducted from the trade before anything else happens.
What makes spread dangerous in a backtest is that it is often modelled as a constant. In reality it widens at the daily rollover, around scheduled economic releases, at the open of a session, and whenever liquidity thins. If your strategy trades in those windows, a constant-spread assumption understates the cost precisely when you can least afford it.
Commission: the predictable one
Commission is charged per lot per side by most brokers, so it scales linearly with size and is easy to model exactly. Its danger is not unpredictability but magnitude at frequency: a strategy taking ten trades a day pays twenty times the commission of one taking a trade every second day, on the same edge.
Because commission is known in advance, it is also the easiest cost to actually reduce. If you are trading frequently, the difference between two brokers' commission schedules can be larger than the difference between two versions of your strategy.
Slippage: the one that surprises you
Slippage is the difference between the price your logic expected and the price you actually received. It appears when your order is large relative to available liquidity, when the market is moving fast, and when the price you assumed in the backtest is not one you could have obtained.
The most common form has nothing to do with size. It is the bar-close assumption: the strategy decides on the close of a bar and the backtest fills at that same close, but in live trading the bar has already closed by the time the signal exists. The realistic earliest fill is the next bar's open, and on gap moves that can be far from the assumed price.
How the three enter the arithmetic
Suppose a strategy makes an average of 0.20% per trade before costs and trades twice a day. With a 0.5-pip spread on gold, commission, and a tick of slippage each way, the round-trip cost can plausibly reach a quarter of that gross figure. The edge has not vanished; it has been transferred to the broker.
| Cost | Behaviour | How to estimate it |
|---|---|---|
| Spread | Widens at rollover, news, session opens | Read the live spread at the hours you trade, not the average |
| Commission | Linear in size, known in advance | Take it directly from your broker's schedule, both sides |
| Slippage | Largest in fast markets, worst on the close | Assume at least one tick each way, more on gap-prone strategies |
Three costs, three different behaviours. Modelling them as one average number is the usual reason a backtest is optimistic.
A concrete way to test sensitivity
Run your strategy three times. First with zero costs, to establish the theoretical ceiling. Then with your broker's real spread and commission. Then with those plus an execution delay of one bar and a slippage estimate. The three results tell you how much of your edge is the strategy and how much is the assumptions.
If the strategy is only profitable in the first run, you do not have a strategy. You have a description of an inefficiency that is smaller than the cost of accessing it.
Why shorter timeframes suffer more
Costs are roughly constant per trade while the average edge per trade shrinks as the holding period shortens. Moving from daily bars to five-minute bars multiplies the number of trades by roughly a hundred while the average move captured per trade falls by a similar factor. The ratio of cost to edge deteriorates sharply.
This is not an argument against intraday trading. It is an argument for measuring, because at short horizons the cost model is no longer a detail — it is the main term in the equation.
FAQ
- What slippage should I assume in a backtest?
- At minimum, one tick per side for liquid instruments traded at normal hours. Increase it for strategies that trade around news, use market orders on breakouts, or trade instruments with thinner books. Assuming zero is never defensible.
- Is spread or commission more important?
- It depends on the instrument and the broker. For many retail forex accounts, spread dominates on small trade sizes, while commission dominates for larger ones. Measure both rather than assuming which is larger.
- Do costs matter for long-term strategies?
- Much less. A strategy holding positions for weeks pays the round trip a handful of times a year, at which point the cost is a rounding error against the move. This is one reason slower strategies are more robust to broker differences.
More guides
- How EasyQuant validates strategies — evidence you can filter
- Honest backtesting, not pretty curves
- Gold strategy research that stays honest
- Overfitting detection: catch it before you deploy
- System Forge: design, then prove
- Walk-forward analysis: the only backtest that fights overfitting
- MT5 export without custody
- Glass box, not black box AI signals
Not investment advice. Historical results do not guarantee future performance. EasyQuant is a research factory — you execute on accounts you control.