Analysis
I spent three years optimizing a trend-following strategy that looked beautiful on paper. The backtest showed 28% annualized returns. I was convinced I'd found something. Then I went live with $50,000, and within four weeks I was down 10%. Within two months, I'd lost enough to stop trading and ask myself the hardest question: Was I testing a real strategy, or a fantasy?
The answer haunts everyone in quantitative trading: I wasn't testing a strategy at all. I was testing a market that doesn't exist.
Most traders blame their signal generation when a strategy fails live. They tweak indicators, add filters, reoptimize parameters. But that's treating the symptom, not the disease. The real problem isn't usually your model. It's that your backtest assumes conditions that only exist in a video game.
I want to walk you through what happened to my strategy, why it happened, and how to stop it from happening to yours.
Here's what I see over and over in trading communities:
The drop from paper to live is usually blamed on "bad luck" or "market conditions changed." The deeper drop from backtest to paper? That's chalked up to slippage, which traders treat like an act of God—something that happens to you rather than something you must account for.
But here's what's really happening: your backtest is lying to you. Not intentionally. But systematically. And the lie gets bigger the more edge you think you have.
When you build a standard backtest, you're making silent assumptions. These assumptions are so pervasive that most backtesting platforms make them the default, and most traders never question them.
Assumption 1: Perfect fill at signal price
Your strategy generates a buy signal at 100.50. In your backtest, you get filled at exactly 100.50. Not 100.51. Not 100.60. Exactly the price you wanted.
In reality, by the time your order reaches the exchange, the price has moved. On milliseconds, for high-frequency strategies. On seconds, for retail traders submitting orders through a broker. On minutes, if you're building positions in less liquid instruments.
Assumption 2: Zero slippage
Slippage is the enemy of backtests. It's invisible in historical data. A data feed gives you OHLC bars (open, high, low, close), not the microsecond-by-microsecond price movement. So when you backtest, slippage isn't there to subtract from your returns. It's just... missing.
Assumption 3: Zero latency
Your signal generates at 14:32:15. Your order executes at 14:32:15. Instant. In reality, there's network latency (milliseconds at best, hundreds of milliseconds if you're using a standard retail broker). There's processing time on the exchange. There's the time it takes for the fill confirmation to come back to you.
Assumption 4: No liquidity constraints
Want to buy 100,000 shares at market price? The backtest lets you. You'll get filled instantly at whatever price you set. The real market? If you try to buy 100,000 shares of a mid-cap stock in a thin market, you'll move the price significantly. You might not find enough shares at reasonable prices to complete the order.
These aren't subtle. They compound. And they explain why almost every strategy that looks good on paper underperforms in reality.
Let me show you exactly what happened to my strategy with real numbers.
My trend-following system traded mid-cap US equities. Average daily volume: 500,000 shares. Average trade size: 5,000 shares (about 1% of daily volume). The backtest assumed:
Backtest results:
Beautiful. Too beautiful.
Then I added slippage. Not much. Just 0.2% per trade (20 basis points). This is conservative for mid-cap equities and assumes reasonable execution.
With 0.2% slippage:
The return dropped from 28% to 9.2%. That's a 67% reduction from a single, modest adjustment.
Then I added commissions. I was paying $3 per trade (fairly cheap for a mid-cap strategy). With 5,000 shares per trade, that's $0.0006 per share, or about 0.06% per trade. Over a round trip (entry + exit), that's 0.12%.
With 0.2% slippage + 0.12% commissions:
Now add the reality that some trades didn't fill as planned. You'd target the close, but volume was thin. You'd miss the fill slightly. You'd slip more on some trades than others.
With realistic entry/exit timing (0.3% total friction):
A strategy that promised 28% annually was actually a slight loser once you account for real execution.
The harsh truth: most of those 28% returns were phantom gains. They existed only in the backtest. They were money the market was never going to give me.
Not all slippage is the same. Understanding the different types helps you model them realistically.
Bid-Ask Spread Slippage
This is the most obvious and the most visible. You want to buy. The bid (what buyers offer) is 100.00. The ask (what sellers demand) is 100.10. You take the ask and get slipped 10 cents, or 0.1%.
Mid-cap stocks during regular hours might have a 1-2 cent spread ($0.01-0.02) on a $100 stock, roughly 0.01% to 0.02%.
Small-cap stocks might have $0.05 spreads, or 0.05%.
Illiquid instruments can be 0.5% or worse.
The spread widens when you need speed (market order) versus providing it (limit order that sits and waits).
Timing Slippage (Latency Decay)
Your signal triggers at 15:59:50. By the time your order reaches the exchange, it's 15:59:51. The price has moved in your disfavor by the time you can trade it.
For algorithms trading near the close, this can be 0.05% to 0.5% depending on volatility and market liquidity.
For day traders watching price action, this is constant. The price you see isn't the price you'll get.
Market Impact Slippage
This is the killer. It's your own trading moving the market against you.
When you buy, you're lifting asks. As you buy at increasingly higher prices, your demand pushes the ask up. You end up paying more for your last shares than your first shares. Your average price drifts higher.
When you sell, you're hitting bids. You push the bid down as you do it.
If you have a large position relative to market liquidity, this is devastating.
Let me show you how this works at scale.
Imagine a stock trading at $100 with 10,000 shares available at the ask. You want to buy 5,000 shares.
If the market is:
And you buy 5,000 shares as a market order, you:
No problem. Clean execution.
But what if the market is:
Now buying 5,000 shares:
Your average fill: $100.20. You've slipped $0.10, or 0.1%, just from the shape of the order book.
For a $50,000 position (500 shares), that's $50 in lost edge.
At scale, this becomes your primary friction cost.
An institutional trader executing a $10 million position in a mid-cap stock might face 0.3% to 0.5% market impact, not from the bid-ask spread but from their own order moving the market.
Institutional traders have a term for this: implementation shortfall. It's the difference between the "decision price" (the price when your trading algorithm decides to execute) and the "execution price" (the weighted average price you actually get).
Academic research on implementation shortfall shows:
These numbers come from analyzing actual institutional trades, not backtests. And they're the reality your strategy faces.
If your edge is 0.5% per trade and your implementation shortfall is 0.3%, your net edge is 0.2%. You're operating on razor margins.
If your edge is 1% per trade but your market-moving impact is 0.4%, you're down to 0.6% net. That's workable. But not if you're also paying 0.1% in commissions and trading in volatile environments where latency costs you another 0.1%.
Here's how to build a realistic backtest:
1. Add execution friction as a model layer
Don't just subtract a fixed percentage. Model:
If you're using a broker API, typical latency is 100-500ms, translating to 0.01% to 0.1% slippage depending on volatility.
2. Use intrabar execution
Don't assume you get filled at the daily close. Assume you're trading the actual intraday price path. If your signal triggers at the close, you get filled at a slightly worse price than the official close. Model this.
3. Account for partial fills
If you're trading a large size relative to typical volume, you might not get the full order filled immediately. Model the queue time. Model the price drift while you're filling.
4. Build in realistic commissions
Don't set commissions to zero "to test pure signal quality." That's backwards. You're testing for live trading. Live trading has commissions.
For stock trading:
For futures: $4-10 per contract round trip.
5. Test across different liquidity regimes
Backtest during high-volume periods and low-volume periods. Test around earnings when volatility spikes and spreads widen. Test in different market conditions.
Your strategy that works perfectly in calm, liquid markets might fail catastrophically on days when volume drops 50%.
Here's where traders get confused: paper trading (also called "backtesting in real-time") is more realistic than backtesting, but it's still not real.
In paper trading:
Paper trading is useful for finding bugs in your order execution code. It's useful for building confidence before going live. But it's not a test of real execution.
I paper-traded my strategy for one month and saw 22% returns. The returns were high partly because:
The real test only happens when capital is actually at risk.
Here's the mindset shift that changed everything for me: your signal is maybe 30% of the problem. Execution is 70%.
If you have a signal that's right 55% of the time and captures 2% winners vs 1.8% losers, you have edge. But if you botch the execution, that edge disappears.
Smart execution means:
Splitting orders intelligently
If you want to buy 10,000 shares, don't market order all at once. Split into 2,000 share chunks. Buy when volume is highest. Avoid moving the price unnecessarily.
Choosing the right time of day
Market opens (first 30 minutes) are high-volume, high-volatility. You'll face worse slippage.
Mid-day is calmer. Better execution possible.
Close is often volatile again. If you're forced to trade near close, expect worse fills.
Respecting liquidity constraints
Before entering a trade, check: is there enough liquidity to exit?
If you're considering a 10,000 share position in a stock with only 50,000 shares daily volume, you're risking 20% of daily volume just to get out. Your exit is going to hurt.
Adapting to market conditions
When the VIX is high, spreads widen. Your slippage goes up. Reduce position size. Or don't trade at all.
When volume drops (summer, holidays, earnings season), be more conservative with execution.
The best backtests I've seen account for:
When you run the same strategy through this level of backtesting rigor, the numbers change dramatically. Not by 10%. By 50% to 80%.
That's not pessimism. That's accuracy.
Here's what keeps me up at night about backtesting: the strategies that look best on paper are often the ones most sensitive to execution slippage.
Why? Because high-return strategies usually:
The strategy that backtests at 50% annual returns might actually be a 5% annual return after realistic execution. The one that backtests at 10% might actually be 7%. The one that backtests at 2% might actually be -2%.
The better the backtest results, the more likely you're living in a fantasy.
Before tweaking your indicators or adding more filters or reoptimizing your entry logic, ask:
If you can't answer "yes" to most of these, you're not testing a strategy. You're testing a dream.
The painful truth I learned: execution is your competitive advantage, not your signal generation.
Two traders with the same signal but different execution will have dramatically different results. The trader who understands market microstructure, who sizes positions carefully, who executes patiently rather than greedily—that trader wins.
Build your strategy assuming realistic execution from the start. Model slippage as a core part of your model, not an afterthought. Test across diverse market conditions. Accept that your live returns will be lower than your backtest (if they're similar, something is wrong).
And understand that "realistic" backtesting is harder, more complex, and often more humbling than the fantasy version. But that hard, humbling backtest? That one might actually make you money.
The fantasy backtest will only make you broke.
Your strategy isn't losing because the signals are bad. It's losing because the test was never real. Start testing the market that actually exists, and you'll finally know if you have something worth trading.