Is Backtesting Accurate? Why Backtests Overstate Live Results
August 3, 2026 · Agenttrading · Last updated August 2026
- 1 THESIS
- 2 EVIDENCE
- 3 BACKTEST
- 4 RISK
- 5 VERDICT
02 EVIDENCE · FUNDAMENTALS
04 RISK · IN PLAIN ENGLISH
Past performance does not guarantee future results. Educational analysis only, not financial advice.
Backtesting is accurate about the past and silent about the future. Run correctly, it tells you exactly what a stated rule would have done on historical prices under assumptions you can list. What it cannot do is carry that number forward, and the size of the gap is measurable: across 97 published stock-return predictors, McLean and Pontiff found returns were 26% lower out of sample and 58% lower after publication. Treat a backtest as a filter that kills bad ideas cheaply, not as a forecast.
That framing matters because almost every disappointment people have with backtesting comes from expecting the wrong thing from it. A test that says a rule returned 14% a year over twenty years is not a promise of 14%. It is a statement that, given this data, these costs, and this exact rule, the historical record produced that number. Change any of the three and the number moves. The useful question is not "is my backtest right" but "which of my assumptions is doing the work".
Is backtesting reliable?
It is reliable in proportion to how boring the test was. A backtest of one rule you wrote down before you looked at the data, run over 20+ years of adjusted prices with real costs charged, is reasonably reliable evidence about that rule. A backtest of the best of forty parameter combinations you tried on five years of data is not evidence at all, and there is a specific number attached to that claim.
Bailey, Borwein, Lopez de Prado and Zhu worked out the math in the Notices of the American Mathematical Society in May 2014. With only five years of daily data available, trying more than about 45 independent strategy configurations is nearly guaranteed to hand you a strategy with an in-sample annualized Sharpe ratio of 1.0 whose expected out-of-sample Sharpe ratio is zero. Not degraded. Zero. Forty-five variations is nothing: a single afternoon of nudging a moving average length and a stop-loss level will burn through more than that.
The practical consequence is that the number of things you tried is part of the result, and almost nobody reports it. If you are reading someone else's backtest and it does not say how many variants were tested, you are missing the single most important input.
Why do backtests overstate live results?
Six leaks account for most of the gap, and they all push the same direction. That is the tell: honest measurement error would be symmetric, but backtest error is overwhelmingly optimistic, because every one of these mistakes is easier to make in the flattering direction.
| Leak | What it does to the result | How to detect it |
|---|---|---|
| Overfitting | Fits the rule to noise specific to your sample, so the edge vanishes on new data | Test the neighboring parameter values. If only one exact setting works, it is an artifact. |
| Missing or understated costs | Turns losing high-turnover rules into winners on paper | Re-run at 0%, 0.1%, and 0.25% per trade. If the verdict flips, costs were carrying the result. |
| Look-ahead bias | Uses information the strategy could not have had at the moment it traded | Check every input's timestamp: earnings, restated fundamentals, index membership, and closing prices used for same-bar entries. |
| Survivorship bias | Tests only the companies that made it, deleting the failures from history | Ask whether delisted and acquired tickers are in the universe. On most free data, they are not. |
| Unadjusted prices | Invents phantom signals at splits and erases dividends from the benchmark | Compare the series against a known split date. A 4-for-1 split should not look like a 75% crash. |
| Regime luck | Measures one market environment and calls it a strategy | Break the equity curve into 2000 to 2007, 2008 to 2012, 2013 to 2019, and 2020 onward, and read each separately. |
Look-ahead bias is the sneakiest of the six because it rarely announces itself. A fundamentals field that was restated two quarters after the fact, an index constituent list taken as of today, or an entry filled at a closing price your signal only knew after the close, all quietly hand the strategy information it never had. When AI writes the backtest code for you, this is the failure mode to check first, for the same reasons set out in how to use AI for stock trading.
Does backtesting work?
Yes, at the job it is actually good at, which is elimination. Backtesting almost never finds a winning strategy. What it does dependably is retire bad ones in ten minutes instead of two years of live money. Learning that your crossover rule underperformed buy-and-hold across two decades, or that it required you to sit through a 55% drawdown to collect its return, is a genuinely valuable finding even though it feels like a failure.
Seen that way, the hit rate stops being discouraging. If nine ideas out of ten die on the bench, the bench did its job nine times. The tenth idea still is not proven, but it has at least survived contact with the historical record, which is more than most trading rules ever do. This is why an honest UNDERPERFORMED verdict is worth as much as a good one, a point that also drives what we mean by a good Sharpe ratio: a number without the drawdown and sample size next to it is decoration.
What is overfitting in backtesting?
Overfitting is when a rule learns the accidents of your sample rather than anything durable. Every price series contains real structure and a much larger amount of noise. A model with enough adjustable parameters will happily describe both, and the noise part will not repeat. The result is a strategy that looks superb on the data it was built on and behaves like a coin flip on anything new.
The warning signs are consistent and easy to check:
- Sharp parameter cliffs. A 50-day average works and a 48-day average fails. Real effects are broad and shallow, not knife-edged.
- Too many rules for the sample. Five conditions and three filters fitted to 40 trades is memorization, not modeling.
- A suspiciously smooth equity curve. Real strategies have ugly stretches. A curve with no bad year usually means the bad years were engineered out.
- The winner was chosen after the search. If you ran 200 variants and are reporting the best one, the reported Sharpe is a maximum, not an average, and maxima are inflated by construction.
- Very few trades. Nine round trips is a sample of nine, however good the chart looks.
The cheapest defenses are the ones people skip: hold out a slice of history before you start and never look at it until the end, test the parameter values on either side of your choice, and count the variants you tried. The formal version of holding data back is described in walk-forward analysis, and the reason a long window matters is set out in how long you should backtest a trading strategy. The problem gets sharper the shorter the history: crypto rules are especially prone to it, since even a fully indexed on-chain price record only goes back to 2009, which is less than half the window Bailey and colleagues consider adequate for serious parameter searching.
Backtesting vs forward testing: which one tells you more?
They answer different questions and neither replaces the other. A backtest is fast, covers decades, and is corruptible by hindsight. A forward test is slow, covers months, and is honest by construction because the future data genuinely did not exist when you wrote the rule.
| Backtest | Forward test (paper trading) | Live with real money | |
|---|---|---|---|
| Sample available | 20+ years in minutes | Weeks to months | Whatever you have lived through |
| Hindsight risk | High: the data existed when you designed the rule | None on the data, some on the design | None |
| Cost realism | Assumed, and usually too generous | Simulated fills, no market impact | Fully real, including your own hesitation |
| What it is good at | Killing bad ideas cheaply and showing the worst drawdown | Catching execution problems and bugs | Revealing whether you can actually follow the rule |
| What it cannot show | Whether you will hold on through the drawdown | How the rule behaves in a bear market | Anything, until enough time passes |
The sensible order is backtest first because it is nearly free, forward test what survives because it catches the mechanical problems, and only then commit capital in a size you can hold through the drawdown the backtest already showed you. The drawdown figure is the number people underestimate most, which is why it gets its own treatment in maximum drawdown explained.
Is TradingView backtesting reliable?
The strategy tester in TradingView is reliable at what it measures, and the common problems are the user's rather than the platform's. Two catch most people. Repainting indicators change their historical values once more bars arrive, so a strategy built on one can report entries it would never actually have taken in real time. And the default commission and slippage settings are often left at zero, which quietly flatters every high-frequency rule.
The deeper limitation is bar granularity. If your strategy can hit both the stop and the target inside a single daily bar, the tester has to guess which came first, and its assumption may not match reality. Set commission and slippage explicitly, avoid repainting indicators, and check the trade count before you believe anything. The wider trade-offs against other tools are compared on our TradingView alternative page.
Is backtesting necessary?
If you plan to follow a rule, yes. The alternative to backtesting a rule is not neutrality, it is trusting an untested belief about how markets behave, usually formed from a handful of memorable trades. A backtest at least forces the belief into a form specific enough to be wrong: which ticker, which condition, which exit, what happens when you are out.
If you are a long-term buy-and-hold investor with no timing rule, the honest answer is that backtesting matters much less. There is nothing to test beyond the allocation itself, and that belongs in portfolio backtesting rather than in strategy testing. The people who need it most are the ones in between: investors who have a rule they follow loosely and have never checked whether the rule ever helped. That check is usually uncomfortable and always cheap, and the reasoning behind buy and hold versus active trading is where most of those tests land.
How to run a backtest you can actually trust
Six habits separate a test worth acting on from an expensive way to confirm what you already believed. Write the rule down before you touch the data, including the exit and where the money sits when you are out. Use 20+ years of split- and dividend-adjusted daily prices. Charge a realistic cost per trade, around 0.1%, and re-run at double that to see whether the verdict survives. Benchmark against holding the same asset, not against a broad index that makes any single winner look good. Count and report how many variants you tried. And read the drawdown and the trade count before you read the return.
That is the checklist stock backtesting on Agenttrading is built around. You describe the rule in plain English, such as "buy AAPL when the 50-day moving average crosses above the 200-day and sell on the reverse cross", the bench restates it as an explicit card before anything runs so you can see what it understood, then it tests the rule on 20+ years of adjusted daily history with 0.1% charged per trade, prints the full assumptions strip, shades the worst drawdown and its recovery time, flags samples too thin to support a conclusion, and stamps HELD UP, MIXED, or UNDERPERFORMED against buying and holding the identical share. The golden-cross preset on this page is a real example of the third verdict, kept in place deliberately.
For the full step-by-step method see how to backtest a trading strategy, and for the engine itself see backtesting software. The same decay shows up in the benchmark-relative numbers, which what is a good alpha covers, and if you are still comparing platforms the best backtesting software roundup prices ten of them. Agenttrading executes no trades and connects to no brokerage. It shows you what the record says about your rule, including the parts that argue against it.
Past performance does not guarantee future results. For educational and informational purposes only. Not financial advice. Consult a licensed advisor.
Put it on the bench
Ideas are cheap. Verdicts take a bench.
Agenttrading restates your idea as a testable rule, backtests it on 20+ years of adjusted daily data, and explains the risks in plain English. Honest verdicts, even when the idea loses.
Past performance does not guarantee future results. For educational and informational purposes only. Not financial advice. Consult a licensed advisor.