Diagnosing Backtests That Fail in Live Trading
Summary
The document examines why a stock strategy can show a strong average trade return, win rate, and risk-to-reward ratio in a backtest yet disappoint in live trading. It identifies coding errors and look-ahead bias as possible causes, especially when historical analyst estimates or company fundamentals reflect revisions that were unavailable at the time. It also notes that reporting data can reach a trader later than a press release, so a simulated signal may be acted on sooner than a real one could be.
For strategies based on technical indicators, the answer recommends examining returns as a time series across a longer test period, rather than relying on trade averages. It suggests comparing both return and risk against a broad market index and accounting for transaction costs. These are diagnostic suggestions, not proof that any one issue explains the reported gap. The document offers no data or worked example to establish which cause applies, and its caution about technical strategies is presented as personal experience rather than general evidence.
Key ideas
- Historical estimates and fundamentals may include revisions that were unknown when a trade would have been made.
- Data release delays can make a backtest assume earlier access than a live trader has.
- Average trade statistics alone may hide periods when a strategy stops working.
- Test across time and compare strategy returns and risks with a broad market index.
- Transaction costs can erase a small apparent advantage over the index.
Tags
Full text
# Strategy works on backtest, but doesnt seems to work in the real world # Strategy works on backtest, but doesnt seems to work in the real world I have a strategy that works in the backtests.. but it seems to me that it is not working in the real world.. Here is how i have backtested the strategy: I apply a specific strategy on all the stocks of my countries market and save the profit % in a list (This list contains the profit % of all the trades over all the stocks).. then i use this list to calculate majorly 3 things.. Average profit % per trade, winrate and risk:reward... Now using this method the strategy has good results, but when i took real trades with it.. I dont think it is working, since its winrate is coming just too less than what the backtest told.. My question is am I missing something? Is there a problem with how i am backtesting or what am i doing wrong? Any help is appreciated. Thanks ## Answer by user79931 (score 1) https://quant.stackexchange.com/a/81601 I guess you either have some errors in the code or look-ahead biases within your market data. A few examples I experienced: - Using analyst estimate data Analysts are constantly adjusting their estimates, at least for major companies. However, most market data providers only offer a single consensus estimate and this is the latest estimate available. However, the estimates usually converge more and more towards the actual reported value as the analysts get more and more information. If your strategy uses estimates but you do not have a historical time series of the estimates, there is likely a significant look-ahead bias. - Fundamental data in filings Even the officially reported fundamentals often have a look ahead bias. If any errors are discovered or reporting standards change after the publication of quarterly figures, companies usually make corrective filings. Most market data providers also only ever report the latest fundamentals. However, these corrected figures did not exist at the time of publication. If a company initially publishes huge profits, this would in reality trigger signals. If it turns out afterwards that the profits were so high because accounting mistakes were made, the trade would not end up in the backtest. - Delayed fundamentals data The timeline of financial statement release for most companies is: Press release → Earnings Call → SEC 8-Q/K filing → SEC 10-Q/K filing. And sometimes there is up to one week between the press release and the 10-Q filings. Most marketdata provider only have the data available once the 8-Q filing is done. However, institutional investors naturally have the data within milliseconds of the press release and then act immediately. Your backtest would tell you that this is also possible for you. But you probably won't have the data until days later and the price could even fall again then, because of mean reversion effects. If your strategy only uses technical indicators: You should not just consider the average return per trade. To my experience no strategy based on technical stuff alone will work consistently. There might be periods they work, but to my opinion this is just due to overfitting. So maybe you fitted the signals in order to maximise the average return per trade. But in fact, it only worked e.g. from 2019-2022 and not before and not afterwards. Then you still might have a good average return/trade, but apparently this won't work now in 2025. So I'd suggest to create a time series of your returns instead, extend the testing period if possible and you also should compare the strategy returns and risks with a broad market index. If your strategy returns are only slightly above the index, or only above the index for a few months, then it's clear that your strategy won't work in reality, as you also have significant transaction costs there.
Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.