Backtesting simulates how a set of trading rules would have performed if applied to real market data from an earlier period, using historical price and volume candles rather than live prices. The trader defines precise entry and exit conditions, often built around indicators from technical analysis such as moving averages, MACD crossovers, or Bollinger Band breakouts, and runs those rules step by step through the historical dataset to see what trades they would have triggered.
The output is a set of performance statistics: total return, win rate, maximum drawdown, profit factor, and risk-adjusted measures like the Sharpe ratio. A meaningful backtest needs a large enough sample, generally well over a hundred trades spanning bull, bear, and sideways markets, since a strategy tested only on one type of market regime has not really been tested at all.
Crypto backtesting carries specific pitfalls. Overfitting happens when a strategy is tuned with too many parameters until it fits past noise rather than a genuine edge, so it looks excellent historically but fails on new data. Survivorship bias is another common trap: testing only on tokens that still trade today ignores the hundreds of coins that collapsed to zero or were delisted, which can inflate results significantly. Ignoring exchange fees, slippage, and funding costs also overstates real profitability.
To guard against these issues, traders use out-of-sample and walk-forward testing, where a strategy is validated on data it was never tuned on. Retail platforms like TradingView's strategy tester offer quick prototyping, while open-source frameworks such as Freqtrade and Backtrader let developers backtest strategies later deployed as automated trading bots. Even a strong backtest is only a starting point; live paper trading is usually recommended before risking real funds.