Most DIY backtests are inflated — not through dishonesty, but because the process has holes traders don’t notice. A backtest that shows a 58% win rate that drops to 34% in live trading happens constantly, and it’s almost always one of a handful of repeat mistakes baked into the steps below. Here’s the process to avoid them.

Step 1: Write entry rules as testable statements, not vibes

Before opening any backtesting tool, write your setup rules as conditions you can actually check — not a fuzzy description. “Go long when price breaks resistance on high volume” isn’t specific enough to test. You need to answer: how is resistance defined (last 20-candle high? a consolidation zone?), what counts as “high volume” relative to the 20-period average, and is the breakout confirmed by a closed candle or just a wick touch. If two people could read your rule and take different trades on the same chart, it’s not tight enough to backtest.

Exit rules — stop loss, take profit, trailing — need the same precision. Most backtests fail because entries are carefully defined and exits are improvised.

Step 2: Pick a dataset and timeframe long enough to matter

Testing over a short window (three months, say) or a single market regime (only trending, no chop) produces results you can’t trust. At minimum you want enough data to cover a strong trending stretch, a sideways stretch, and a high-volatility stretch (major news, thin liquidity). For short-term trading — intraday, scalping — you need at least a few hundred trades before win rate and expectancy mean anything statistically. Under 30 trades, any conclusion could just be noise.

Step 3: Watch for lookahead bias

This is the most common and most dangerous mistake. Lookahead bias happens when the backtest unknowingly uses information you wouldn’t actually have had at the moment of entry — using a candle’s closing price to trigger an entry within that same candle, for instance, or using an indicator that repaints, where the historical value shown now differs from what it would have shown in real time. The result is a system that quietly “sees the future,” and the numbers come out much better than reality. A quick check: at every entry point in the backtest, ask “if I were standing at exactly this moment in the past, would I actually have had this data available?”

How to backtest a trading strategy, step by step

Step 4: Be wary of overfitting

Overfitting happens when you tune too many parameters — stop-loss percentage, RSI threshold, MA period — until the strategy fits the exact historical stretch you’re testing so perfectly it no longer generalizes to new data. The tell: you’ve already tried 5-10+ parameter combinations and picked whichever performed best. The fix is to split your data — optimize on the first portion (in-sample), then validate on a later portion you never touched during optimization (out-of-sample). If out-of-sample performance drops sharply versus in-sample, the strategy is overfit, not genuinely good.

Step 5: Add real trading costs and slippage

Plenty of backtests skip fees, spread, and slippage — an omission that, for a high-frequency strategy, can eat the entire paper profit. Add your actual exchange fees plus a conservative slippage estimate (0.05-0.1% per trade for a mid-liquidity coin, more for thin ones). A strategy showing +0.3R expectancy before costs can go negative after fees if trade frequency is high enough — which is exactly why scalping systems that “win” on the backtest routinely lose live.

Step 6: Forward test before real money

A backtest tells you the logic held up historically. It doesn’t prove market conditions will stay the same. Once the backtest clears your bar, run a forward test — demo or very small size, in live market conditions, for at least 4-6 weeks or enough trades to be statistically meaningful — before scaling up to real size. This is the step most traders skip because they’re impatient, and it’s the one that separates disciplined traders from people chasing a pretty backtest chart.

More on this in the Trading performance section.