DEV Community

NydarTrading
NydarTrading

Posted on • Originally published at nydar.co.uk

Backtesting Your Strategy? Here Are 7 Mistakes That Invalidate Your Results

Most backtests look profitable. Most live results don't.

The problem usually isn't the strategy. It's the backtest. Most traders unknowingly build errors into their testing that make terrible strategies look brilliant.

Here are seven mistakes that quietly invalidate your results — and how to fix each one.


1. Overfitting: The #1 Killer

Overfitting is when you tune your strategy so precisely to historical data that it only works on that specific data.

What it looks like:

  • Adding indicators until the backtest looks good
  • Tweaking parameters to catch every historical move
  • A strategy with 15+ rules that produces perfect results

The fix: Use out-of-sample testing. Split your data: train on 70%, test on 30% you've never seen. Keep strategies simple — two to three rules that make logical sense.

2. Look-Ahead Bias

Using information that wouldn't have been available at the time of the trade.

Common examples:

  • Using today's close to make a decision during today's session
  • Referencing an indicator that uses future bars in its calculation

The fix: Only use data from completed bars. Be paranoid about timestamps.

3. Survivorship Bias

Testing your strategy only on assets that still exist today. If you backtest on today's S&P 500, you're excluding every company that went bankrupt or got delisted.

Studies show survivorship bias can inflate returns by 1-2% annually. In crypto it's worse — thousands of tokens from 2017-2021 are dead.

4. Ignoring Transaction Costs and Slippage

A strategy that trades 200 times a year with 0.1% cost per trade has a 20% annual drag that doesn't appear in your backtest. A +25% return becomes +5%.

The fix: Add realistic spread, slippage, and commission costs to every backtest.

5. Too Short a Test Period

Testing on 6 months of bull market data proves nothing. Your strategy needs to survive bull markets, bear markets, sideways chop, crashes, and low-volume periods.

Minimums: Day trading: 2+ years. Swing trading: 5+ years. Position trading: 10+ years.

6. Not Accounting for Regime Changes

A trend-following strategy that crushed it in 2020-2021 crypto gave back everything in 2022 chop. Segment your results by market regime.

The fix: Walk-forward testing — optimize on period 1, test on period 2, re-optimize, repeat.

7. Curve Fitting Your Stop Loss

Setting stops based on what would have worked historically rather than on market structure.

The fix: Place stops at logical levels (below support, above resistance) using a consistent approach. Not at whatever distance avoided getting stopped out on past data.


The Right Way to Backtest

  1. Start with a hypothesis, not random combinations
  2. Keep rules simple (2-3 conditions max)
  3. Split your data (in-sample vs out-of-sample)
  4. Include all costs (spread, slippage, commissions)
  5. Test across regimes (bull, bear, sideways)
  6. Paper trade first before risking real money
  7. Start small and scale up after proving it works live

The traders who succeed with backtesting are the ones trying to break their strategy, not prove it works.


Read the full article with interactive examples at nydar.co.uk


Originally published at Nydar. Nydar is a free trading platform with AI-powered signals and analysis.

Top comments (0)