Backtesting RSI Strategies Without Fooling Yourself
A backtest can prove almost anything if you let it. Here is how to test an RSI rule honestly — and the biases that quietly inflate results.
Why backtest at all
A backtest applies a fixed set of rules to historical data to see how they would have performed. Done well, it replaces opinion with evidence and tells you whether an RSI strategy has any edge before you risk capital. Done carelessly, it manufactures false confidence that the market later punishes.
Define rules a computer could follow
The first discipline is precision. "Buy when RSI is oversold" is not testable; "Buy when 1H RSI closes below 30 and exit when it closes above 50" is. Every entry, exit, position size, and filter must be unambiguous, with no room for the hindsight that creeps in when you eyeball a chart.
The biases that wreck a backtest
- Lookahead bias: using information that would not have been available at the time, such as acting on a candle's close before it closed.
- Survivorship bias: testing only coins that still exist today ignores all the ones that went to zero, flattering your results.
- Overfitting: tuning parameters until they fit the past perfectly. A strategy with ten optimised settings usually describes history, not the future.
- Ignoring costs: fees, funding, and slippage turn many "profitable" high-frequency RSI systems into losers.
The metrics that matter
Win rate alone is misleading — a system can win 80% of the time and still lose money. Focus on expectancy (average profit per trade), maximum drawdown (the worst peak-to-trough loss you would have endured), and sample size. A handful of trades proves nothing; you want enough occurrences to trust the average.
Out-of-sample and walk-forward testing
Split your data: build the rules on one period (in-sample) and validate them on a later, untouched period (out-of-sample). Better still, walk the test forward in rolling windows. If an RSI edge survives data it was never tuned on, it is far more likely to be real. Remember that crypto regimes shift — a strategy that thrived in a bull market may quietly bleed in a range, so re-test as conditions change.