To backtest a trading strategy, historical market data is used to evaluate how the strategy would have performed in the past. Traders can use specialized backtesting software or platforms and even backtest automatically.