Skip to content

Backtest vs live results: why they differ

By Bec, futures trader and founder of Wildflower · Updated

A backtest has to assume how each order would have filled. Live, orders meet a real market: market and stop orders can fill a few ticks worse, you pay the spread and fees, a limit that price only touched may not fill, and your prices can differ from the backtest’s data. Each gap is small, but they add up over many trades.

Live fill 100.75: 2 ticks worseBacktest fill 100.25Signal
Live 100.75Backtest 100.25Signal

Why backtest and live results differ

A is a model. It knows only the prices in its data, and it has to assume how every order would have filled. Live trading has no assumptions. Your order goes to a real market, where other traders, the , speed and chance all play a part.

So the same rules, on the same days, can give different trades. The main reasons, each explained below:

  • Slippage: market and stop orders fill at a worse price than the one expected.
  • The spread: you buy at the ask and sell at the bid, not at the chart’s price.
  • Fees: commissions and exchange fees on every contract.
  • Latency: the time it takes an order to reach the market.
  • Limit fills: price touching your level doesn’t mean your order filled.
  • Data differences: your backtest’s prices and your broker’s prices can differ.

Most of these cost you a little on every trade. Missed limit fills cut both ways: sometimes a trade the backtest took never happens live.

Slippage: filled at a worse price

is the difference between the price you expected and the price you got. A market order takes whatever price is available when it arrives. In the picture at the top, the backtest booked the next candle’s open, 100.25. Live, the order filled at 100.75. On a contract that moves in 0.25 steps, that’s 2 .

Fast candleStop 99.00Filled 98.25Filled 3 ticks past the stop.
Gap past the stopStop 99.00Filled 97.50Opened below it. Filled 6 ticks past.

Stops slip too. A stop order waits for its price, then becomes a market order. In a fast candle, the next price can already be a few ticks past. If the market opens past the stop, it fills at the first price there. A backtest that books every stop at its exact price shows smaller losses than live trading could.

Size matters. A large order can use up everything waiting at the best price and fill the rest at worse prices. A backtest rarely sees how much was waiting.

Slippage can go your way too, but a test that assumes none leaves out a cost. Read about slippage.

The spread: the chart shows one price, you trade at two

Buy at the ask, sell at the bidAsk 100.25: buysBid 100.00: sellsThe chart shows the last trade, 100.00.

A candle chart shows prices that traded. But a market buy fills at the , and a market sell at the . A backtest that fills at the chart’s price skips the spread twice, once in and once out. On busy futures the spread is often one tick, but it can widen in fast markets, near news and when few people are trading. Read about the bid-ask spread.

Fees: small per trade, large in total

Every contract you trade pays a to your broker, plus exchange and other fees. They’re charged in and out, so they’re quoted per contract for the round trip.

Here’s a made-up example. Say fees are $4 per contract for the round trip. A trade that makes $50 per contract before fees makes $46 after. A trade that loses $50 before fees loses $54 after. A backtest without fees shows every trade a little better than it could be. The more often the rules trade, the more that adds up.

Put together, costs add up the same way. Say a tick is worth $5. Two ticks of slippage in and one out is $15 per contract, before fees.

Latency: price moves while your order travels

The 400 milliseconds after a signalSignal 100.00Filled 100.750 ms100200300Each candle is 100 milliseconds.

is the delay between a signal and your order reaching the market. The software has to see the candle close, work out the signal, send the order, and your broker has to pass it on. Each step takes milliseconds. In a quiet market, price barely moves in that time. In a fast one, it can move several ticks.

A backtest has no delay unless it adds one. It acts on the exact price at the exact moment.

Limit orders that are touched but not filled

Only touched✕Buy limit 96Your order may still be waiting.
Traded through✓Buy limit 96Price went past 96, so it filled.

A waits at your price in an . Orders that arrived earlier at that price fill first. If price only touches your level and turns, the orders ahead of yours may use up all the trading there. Yours is still waiting.

A backtest that counts every touch as a fill takes trades that live trading might miss. This matters most for targets, which are limit orders too. Some backtests only count a limit fill if price trades through it, one tick or more past the level.

Data differences

The backtest’s dataTarget 101High 101.25: target filled.
Your broker’s pricesTarget 101High 101.00: only touched.

Two sources of prices for the same market can disagree by a tick or two. That’s enough to change whether a target or stop is reached.

  • Different feeds. Data vendors and brokers can record slightly different highs and lows.
  • Joined contracts. A continuous futures chart joins contracts at each roll, and some shift older prices. The backtest may trade prices that never existed.
  • Time zones. A file in the wrong time zone puts session times and day boundaries in the wrong place.
  • Candle size. Big candles hide the order of prices inside them. A test on 1-minute candles can differ from one on 15-minute candles.

Other reasons live trading differs

  • Partial fills. Part of an order fills and the rest doesn’t.
  • Rejected or missed orders. A broker can reject an order, or a connection can drop.
  • Rules you didn’t test. A news event you skip live, or a daily limit, changes which trades happen.
  • You. If you pick which trades to take, live trades differ from the rules.
  • The market changes. The history in a backtest may not look like the days you trade.

How traders compare backtest and live results

Many traders compare the two trade by trade. They run the backtest over the same days they traded live, then line up each pair: did both find the same signal, at the same time? How many ticks apart were the entries and exits? A trade that shows in one and not the other points to a difference in rules, data or fills.

Another way is to forward test: run the rules on a demo account as new prices arrive, then compare. Read about forward testing. How much slippage and what fees to add to a backtest is your choice. There’s no single rule. Read about slippage and commissions in a backtest.

Backtesting with fills and costs you can see

See what your backtest assumed about every fill

Wildflower’s Backtest runs the Bot’s own simulator, so it fills orders the Bot’s way. A market order fills 1 tick worse, a stop fills 1 tick past its price, and a target only fills if price trades through it. If one candle touches both your stop and your target, it counts the stop. You can enter your own fee per contract for the round trip and add extra ticks of slippage, and every result says what it assumed. No coding needed.

A Backtest chart with a trade’s stop and target drawn as shaded boxes, and a line you drag to ask why a candle had no trade.

Set it up and see how it works, free. Only pay when you backtest on real market history.

Common questions

Why are my live results worse than my backtest?

Often because of costs the backtest left out or underplayed: slippage, the spread and fees. Missed limit fills, latency and data differences can also change which trades happen.

What is slippage in a backtest?

An allowance for filling at a worse price than expected, in ticks. Without it, a backtest assumes every market and stop order filled at the exact price.

Do backtests include the spread?

Only if the tool includes it. A test that fills at the chart’s price leaves the spread out.

Why didn’t my limit order fill when price touched it?

Orders at that price fill in the order they arrived. If price only touched your level, the orders ahead of yours may have used up all the trading there.

Can a backtest match live results exactly?

Not exactly. It can come close on which trades happen, but live fills depend on the market at that moment.

What is latency in trading?

The delay between a signal and your order reaching the market, in milliseconds. Price can move in that time.

Why do two backtests of the same strategy give different results?

They may use different data, candle sizes or fill assumptions, such as whether a touch counts as a fill.

How do I compare backtest and live trades?

Run the backtest over the days you traded and line up each trade: same signal, same time, and how many ticks apart the fills were. More above.

Does a backtest show slippage on stops?

Only if it models it. A stop becomes a market order when reached, so live it can fill past its price.

In the help centre