Backtesting evaluates a trading strategy against historical market data to estimate how its rules would have performed in the past. Results depend on data quality, costs and simulation assumptions.