Money and Finance

Backtesting Investment Strategies: What It Can and Cannot Tell You

How backtesting works, what CAGR, drawdown, volatility and Sharpe ratio mean, how to test simple strategies on your own data and avoid overfitting traps.

Saizul Amin
Saizul Amin2 Nov 2026 · 3 min read
Backtesting Investment Strategies: What It Can and Cannot Tell You

Backtesting Investment Strategies: What It Can and Cannot Tell You

Every investor has heard a rule that sounds convincing: sell when prices fall below their average, buy the winners, rebalance once a year. Backtesting is the habit of checking such rules against history before trusting them with money. Done carefully, it can stop you adopting a strategy that would have failed badly. Done carelessly, it can give false confidence. The Stock Strategy Backtester lets you experiment with simple rules on your own price data, privately in your browser.

How a backtest works

A backtest steps through historical prices one period at a time. At each step the rule decides whether to be invested or not, and the backtester records how a portfolio following that rule would have grown, including trading costs. At the end you can compare the result with simply buying and holding the same investment for the whole period.

The numbers that matter

The compound annual growth rate, or CAGR, is the average yearly growth that would turn the starting amount into the final amount. Maximum drawdown is the largest fall from a peak to a later low, and it is often the number that decides whether a real person could have stuck with the strategy. Volatility measures how much returns swing from period to period. The Sharpe ratio divides average return by volatility, a rough measure of return per unit of risk. A strategy with a slightly lower return but a much smaller drawdown may be the better choice for many investors.

Strategies you can test

Trend-following rules, such as being invested only when the price is above its moving average, or when a fast moving average is above a slow one, aim to sidestep long bear markets. Momentum rules stay invested while recent returns are positive. Monthly investing shows how regular contributions smooth the price you pay. Rebalancing between two assets, such as shares and bonds, shows how a fixed mix behaves through good and bad periods.

The overfitting trap

If you test enough combinations of settings, one will always look brilliant on past data, purely by chance. That is overfitting, and such strategies usually disappoint in the future. To reduce the risk, keep rules simple, test the same settings on different periods and different investments, include realistic costs and be suspicious of results that look too good.

Getting good data

Use adjusted closing prices, which account for dividends and share splits, from your broker or a free financial website. Weekly or monthly data is fine for slow strategies and reduces noise.

A worked example

On the tool's synthetic weekly example, ten thousand invested and held grows to about 13,143, but suffers a drawdown of 59 percent along the way. A 10/40 moving-average crossover ends slightly higher at about 13,698 with a drawdown of 31 percent and only 12 trades, while a 52-week momentum rule ends at about 16,998. On real data the ranking may be different, which is exactly why testing matters.

Comparing strategies side by side

Add each strategy as its own tab and open the comparison view. The tool marks the best value for each measure and overlays the equity curves, which makes trade-offs obvious: one rule may have the highest return while another has a far smaller drawdown and fewer trades.

Costs add up

Every trade costs money through commissions and spreads. Rules that trade often can look great before costs and poor after them, so always set a realistic cost per trade.

Limits

Backtests describe the past, ignore taxes and assume trades at the closing price. They do not predict future returns, and this tool is for education, not investment advice. Your data stays in your browser.

Completely freeNo cost, no sign-up
Files stay privateEverything runs in your browser
Easy in your languageAvailable in many languages