Glossary · Updated
What is backtesting?
Quick answer
Backtesting is testing a trading or investing rule on historical market data to see how it would have performed had it been followed in the past.
Backtesting, explained
A backtest applies a fixed set of rules, such as "buy when the 50-day moving average crosses above the 200-day", to past prices and records the hypothetical trades, returns, drawdowns and win rate. Some screeners and charting platforms include a backtesting module.
A sound backtest includes trading costs, uses only data that would have been available at the time, covers several market regimes and includes delisted stocks. Leaving any of these out tends to make results look better than they would have been.
Backtested results are hypothetical. When a vendor quotes impressive historical returns for its AI or strategy, check whether they come from a backtest or from picks that were recorded live and dated at the time.
Example
A trader might backtest a rule that buys stocks hitting a 52-week high and sells after 20 trading days, then compare its 2010–2025 results against simply holding an S&P 500 index fund.
Tools that use this
Finviz
Stock screener and market maps; the paid Elite tier adds real-time data, advanced charts, alerts, backtesting and export.

TrendSpider
Charting and technical-analysis platform that automates trendline and pattern detection, market scanning, backtesting and trading bots.
Related terms
- OverfittingOverfitting is when a model or trading rule is tuned so closely to historical data that it captures noise instead of a lasting pattern, so it performs well in backtests but poorly on new data.
- Survivorship biasSurvivorship bias is the error of judging results only from the stocks, funds or strategies that still exist, ignoring those that failed or disappeared, which makes past performance look better than it was.
- Benchmark (S&P 500)A benchmark is a standard used to judge investment performance; for US stock tools it is usually the S&P 500, an index of about 500 large US companies weighted by market value.
- AlphaAlpha is the part of an investment's return above or below what its benchmark or risk level would predict, often used as shorthand for beating the market.
Where this matters
Backtesting comes up most when choosing AI stock screeners. See Best AI stock screeners for the tools we compare, with dated prices.
General information, not financial advice. Back to the glossary.
Cite this page
Christian Soren. "What is backtesting? Definition and example." bestaistocktools, updated November 8, 2026. https://bestaistocktools.com/glossary/backtesting
Last checked · bestaistocktools.com/glossary/backtesting