Why Live Results Diverge From Backtests (and How to Close the Gap)
Why Live Results Diverge From Backtests (and How to Close the Gap)
Live results diverge from backtests because real‑time trading introduces frictions—spread, latency, and mid‑candle fires—that a backtest cannot fully replicate. Understanding these three forces lets you adjust your workflow and bring live performance in line with simulated expectations.
What is a backtest and why does it feel "perfect"?
A backtest runs a strategy against historical price data, applying every entry and exit rule exactly as coded. The environment is deterministic: the price series is known, there is no latency, and the bid‑ask spread is either ignored or set to a static value. Because the engine can replay each tick instantly, the results look clean and often better than what you see when the market is live.

Spread: The hidden cost that erodes every trade
The spread is the difference between the best ask (price you buy at) and the best bid (price you sell at). In a backtest, many platforms either assume a zero spread or apply a fixed, unrealistic value. In live markets the spread fluctuates with liquidity, time of day, and news events. Even a 0.5 % spread on a 1 % move cuts your profit in half.
- Static spread assumption: Backtest uses a constant 0.1 % spread.
- Dynamic spread reality: During low‑liquidity periods the spread can widen to 1 % or more.
To narrow the gap, model the spread as a variable range in your backtest. Use recent tick data to calculate the average spread for the instrument and time‑frame you trade, then apply a random‑within‑range adjustment to each simulated fill.
Latency: How milliseconds turn into missed edges
Latency is the delay between the moment your algorithm decides to trade and the moment the order reaches the exchange. It consists of three components: network round‑trip time, broker processing time, and exchange matching latency. Backtests assume zero latency, so a signal that would have been executed at the exact price is instead filled a few ticks away in reality.
Even a 20 ms delay can move the market several ticks on fast‑moving assets like Bitcoin. The impact grows with higher volatility and tighter stop‑loss levels.
- Measure your end‑to‑end latency using a ping‑pong test from your trading server to the exchange gateway.
- Incorporate a latency buffer in your backtest: shift each entry price by the average slippage observed at your measured latency.
- Consider co‑location or a low‑latency VPS if the buffer exceeds your strategy’s tolerance.
Platforms that provide sub‑second execution, such as Tim Edge’s live algo deployment, help reduce the latency component, but you still need to account for it in your simulation.
Mid‑candle fires vs. hindsight filters: The illusion of perfect timing
Many backtests use candle‑based data (e.g., 1‑minute bars) and assume that if a condition is true at the close of a candle, the trade can be entered at that exact price. In reality, the market moves continuously within the candle, and a signal may fire only after the price has already moved past the optimal entry—this is known as a mid‑candle fire.
Hindsight filters—like “enter at the high of the candle if condition met” —look ahead in the data to pick the best possible fill. This creates an unrealistic edge because the algorithm could not have known the high in real time.
| Backtest Feature | Live Reality |
|---|---|
| Entry at candle close | Entry may occur mid‑candle or miss entirely |
| Zero slippage assumption | Slippage from spread + latency |
| Static stop‑loss distance | Stop may be triggered by noise before signal |
To close the gap, use tick‑level data for backtesting. Tim Edge’s AI Strategy Builder offers honest tick‑level backtesting on its own recorded market data, ensuring that each simulated fill respects the exact order of trades, spreads, and latency.
Practical steps to align live results with backtests
- Model dynamic spread: Pull recent spread statistics and apply a variable spread model in the simulation.
- Add realistic latency: Measure your own round‑trip time and inject a corresponding price offset.
- Switch to tick‑level backtesting: Avoid candle‑based hindsight filters; simulate each tick as it arrives.
- Use a trade journal: Record actual fill prices, slippage, and latency for post‑trade analysis. Tim Edge’s automatic trade journal captures these metrics automatically.
- Run a Market Replay: Replay a recent live session with your strategy to see where mid‑candle fires occurred.
The bottom line
Live performance diverges from backtests mainly because real markets impose a variable spread, unavoidable latency, and continuous price movement that candle‑based simulations ignore. By modeling spread dynamically, incorporating measured latency, and backtesting at tick resolution, you can dramatically narrow the gap and trust that your simulated edge will survive the live arena.
