School of Speculation All articles
Strategy & Tactics

The Backtest Mirage: How Execution Costs Quietly Erase the Edge You Thought You Had

School of Speculation
The Backtest Mirage: How Execution Costs Quietly Erase the Edge You Thought You Had

The Seductive Lie of Clean Historical Data

Every trader who has spent time building systematic strategies knows the feeling. The equity curve climbs steadily upward. The Sharpe ratio looks respectable. The drawdown periods are manageable. On paper, the strategy appears to have a genuine, repeatable edge. Then real money enters the market, and within weeks — sometimes days — the returns begin to erode in ways the model never predicted.

This is not bad luck. It is not a temporary rough patch waiting to resolve. It is the structural gap between how markets appear in historical data and how they actually behave when you are attempting to participate in them. That gap has a name: execution cost. And for most retail traders building strategies on consumer-grade backtesting platforms, it is almost entirely invisible until it is too late.

Understanding why this happens — and more importantly, how to account for it before risking capital — separates traders who eventually develop sustainable edges from those who cycle endlessly through strategies that perform brilliantly in simulation and consistently disappoint in practice.

What Backtests Actually Measure

At its core, a backtest measures price availability, not trade execution. When a historical model records a buy signal at 10:32 AM on a given date, it assumes the position was entered at the price displayed in the data feed at that moment. In reality, that assumption is almost never accurate.

The price you see in historical data is typically the last traded price, or in some cases the midpoint between bid and ask. Neither of these is the price you would have actually received as a buyer or seller entering the market at that moment. The price you receive is determined by the current state of the order book, the size of your order relative to available liquidity, the speed of your execution infrastructure, and the behavior of other participants reacting to the same conditions that generated your signal.

Each of these factors introduces friction. Individually, any one of them might seem trivial. Collectively, across dozens or hundreds of trades per month, they can transform a strategy with a theoretical edge of 0.4% per trade into one that loses money with statistical consistency.

The Three Layers of Execution Cost

To properly pressure-test a strategy, a trader must understand execution cost not as a single number but as a layered structure with distinct components.

Bid-Ask Spread is the most visible layer. For liquid large-cap equities and major futures contracts, spreads are often tight enough to feel inconsequential. But in less liquid instruments — smaller-cap stocks, certain options chains, thinly traded ETFs — the spread alone can represent a meaningful percentage of a trade's expected return. A strategy that generates a 0.3% average gain per trade on a stock with a 0.25% average spread is not a 0.3% strategy. It is closer to a breakeven proposition before any other costs are considered.

Slippage operates differently from the spread. It refers to the difference between the price at which an order is triggered and the price at which it is actually filled. In fast-moving markets, this gap can be substantial. A momentum strategy that enters on a breakout above a key level will frequently find that by the time the order reaches the market, the price has already moved several ticks past the trigger point. The model captured the signal at the clean breakout price. The real trade filled at a worse level. Multiply that across every entry and exit in a year, and the cumulative drag can be severe.

Market Impact is the most underappreciated layer, particularly for traders who manage larger position sizes. Every order you place is itself a piece of information that the market absorbs. A large buy order signals demand, which can push prices upward before your order is fully filled. This effect is negligible for a retail trader placing a 100-share order in a heavily traded stock, but it becomes meaningful for anyone operating with meaningful capital in thinner instruments. Strategies that look scalable in backtests often hit hard ceilings when position sizes grow, precisely because market impact rises nonlinearly with order size.

Why Most Backtesting Platforms Conceal This Problem

Popular retail backtesting tools — even sophisticated ones — default to assumptions that systematically understate execution costs. Many use closing prices as the execution benchmark, which is particularly misleading for intraday signals. Others apply a flat commission estimate without modeling spread or slippage at all. Some allow users to input a fixed slippage estimate, but that flat figure fails to capture the dynamic nature of real-world fills, which vary significantly based on market conditions, time of day, and volatility regime.

The result is a systematic optimism bias baked into the output. The trader sees a strategy that appears to work. The platform has no incentive to make the simulation more pessimistic. The gap between simulation and reality remains hidden until capital is at risk.

Building a More Honest Simulation

The antidote is not to abandon backtesting — it remains one of the most valuable tools available to a systematic trader. The goal is to approach it with structured skepticism and to deliberately stress-test results against more conservative execution assumptions.

Begin by replacing any execution-at-signal-price assumption with a worst-case fill model. For liquid instruments, assume you are always buying at the ask and selling at the bid. For less liquid instruments, assume additional slippage of at least half the average daily spread on top of that. Apply these assumptions uniformly and observe what happens to the equity curve.

Next, introduce a latency penalty. Real orders do not execute instantaneously. Assume a one-bar delay between signal generation and execution, particularly if you are not using co-located infrastructure or direct market access. For daily strategies, this means executing on the open of the following session rather than the close of the signal bar. This single adjustment frequently reveals that a strategy's apparent edge was largely attributable to capturing overnight gaps — a return source that evaporates once realistic execution timing is applied.

Finally, vary your position sizing assumptions and observe how results degrade as size increases. A strategy that survives execution stress-testing at 100 shares may deteriorate significantly at 1,000. Understanding where the scalability ceiling sits is essential before committing meaningful capital.

The Discipline of Pre-Capital Verification

Professional trading operations run execution simulations, paper trade in live market conditions, and analyze fill quality data before scaling any strategy. This is not excessive caution — it is the standard of rigor that separates strategies with genuine edges from those that merely appear to have them under idealized assumptions.

For individual traders operating without institutional infrastructure, the equivalent discipline is systematic skepticism toward any backtest result that has not been subjected to realistic execution stress-testing. A strategy that survives that process with its edge intact is a genuine candidate for deployment. One that only looks attractive under clean, frictionless assumptions is a mirage — convincing from a distance, and costly the moment you step into it.

The market does not care how elegant your model is. It cares only about the prices at which orders are actually filled. Build your expectations accordingly.

All Articles

Related Articles

What You're Really Paying For: The Hidden Value of Trades That Keep Multiple Doors Open

What You're Really Paying For: The Hidden Value of Trades That Keep Multiple Doors Open

Priced Out in Plain Sight: How Execution Reality Destroys the Trade You Thought You Had

Priced Out in Plain Sight: How Execution Reality Destroys the Trade You Thought You Had

When the Map Lies: How Volatility Metrics Betray Traders at the Moment of Maximum Danger

When the Map Lies: How Volatility Metrics Betray Traders at the Moment of Maximum Danger