5 Common Backtesting Mistakes and How to Avoid Them

5 min read
BacktestingMistakesTradingRisk management

Important Risk Warning

Trading financial instruments involves significant risk of capital loss. Past performance does not guarantee future results. Backtest results presented are based on historical data and do not constitute investment advice. Never invest money you cannot afford to lose.

Why Most Backtests Are Misleading

A backtest that shows 90% win rate and 500% annual return sounds incredible, until you trade it live and lose money. The gap between backtest fantasy and live reality is almost always caused by one or more of these five common mistakes.

Understanding these pitfalls is essential before you trust any backtest result with real capital.

Mistake 1: Overfitting (Curve Fitting)

Warning signs:

  • Your strategy has 10+ parameters
  • Small parameter changes dramatically alter results
  • The strategy works on one specific date range but fails on others

The Overfitting Trap

A strategy with 20 parameters can be tuned to show profits on virtually ANY historical dataset. This does not mean it has an edge. In-sample optimization without out-of-sample validation is the number one cause of blown accounts.

How to avoid it: Use walk-forward analysis. Split your data into training (70%) and testing (30%) periods. Only trust strategies that perform consistently on unseen data.

Mistake 2: Look-Ahead Bias

Common sources:

  • Using the current bar's close price to trigger an entry on that same bar
  • Referencing indicators that use data not yet available at the decision point
  • Using daily high/low to set intrabar targets

How to avoid it: Always use close[1] (the previous bar's data) for decision logic. Reputable backtesting platforms enforce this automatically through anti-repainting safeguards.

Mistake 3: Repainting Indicators

Notorious repainters:

  • Zigzag indicator
  • Some implementations of pivot points
  • Certain smoothed oscillators with future lookback

How to Detect Repainting

Run your strategy on historical data, note the signals. Then wait for new bars to form and check if those signals moved. If they did, your indicator repaints and your backtest is unreliable.

How to avoid it: Use only confirmed, non-repainting indicators. Tools with built-in anti-repainting protection flag or block repainting logic before you run the test.

Mistake 4: Ignoring Transaction Costs

A strategy that makes 2 pips per trade sounds profitable, until you account for 1.5 pips of spread plus commission. Many strategies that look good in a zero-cost backtest become losers when realistic costs are applied.

Costs to include:

  • Spread (bid-ask difference)
  • Commission per trade
  • Slippage (especially on larger positions or illiquid assets)
  • Swap/overnight fees for positions held past rollover

How to avoid it: Always configure realistic transaction costs in your backtest settings. Test with slightly higher costs than expected, if the strategy still profits, it has a buffer.

Mistake 5: Survivorship Bias

Testing only on assets that still exist and trade today ignores all the assets that were delisted, went bankrupt, or became illiquid. This artificially inflates your strategy's performance.

How to avoid it: Include delisted assets in your data when possible. Be skeptical of strategies that only work on a handful of winning assets. Test across multiple assets and timeframes to validate robustness.

The Right Way to Backtest

1

Keep It Simple

Start with 3-5 parameters maximum. Complexity is the enemy of robustness.
2

Use Out-of-Sample Data

Never judge a strategy only on the data it was optimized on. Reserve 30% of your data for validation.
3

Include Realistic Costs

Add spread, commission, and slippage to every backtest. No exceptions.
4

Test Across Multiple Assets

A robust strategy works on similar assets, not just one specific instrument.
5

Use Anti-Repainting Tools

Choose a platform that enforces non-repainting rules automatically.

Backtesting is powerful, but only when done correctly. Avoid these five mistakes and you will be ahead of 90% of retail traders who trust flawed results.

Frequently Asked Questions

Run your strategy on data it has never seen (out-of-sample). If performance drops significantly compared to the training period, you are overfit. Also check: does the strategy have more than 5-7 parameters? Do small changes in parameters cause big swings in results? Both are overfitting red flags.

Aim for 200+ trades minimum. Under 100 trades, random variance dominates your results. A strategy with 95% win rate on 20 trades proves nothing. The same strategy might have 45% win rate on 500 trades.

Yes. Tools like Backtrex enforce anti-repainting rules at the engine level: all indicators use close[1] (confirmed bar data only). This means repainting is impossible by design, unlike TradingView community scripts where repainting depends on the script author.

Not sure what backtesting is or how to get started? Read our complete guide. If you trade SMC/ICT strategies, check out our dedicated guide on backtesting Smart Money setups.

Ready to backtest the right way? Start for free with built-in safeguards against all five mistakes listed above.

Suggested Reads

Ready to backtest your strategies?

Join the waitlist and be the first to build, test, and validate trading strategies โ€” no coding required.

0
0
0
0
7
7
7
7
8
8
8
8
spots remaining
ML
SR
KB
AD
TF
+117
122 traders already joined

Just your email. No commitment.