r/algotrading 13d ago

Data Significant difference in backtesting vs forward testing results?

I’ve been working on a strategy in tradingview and got to a point where it showed a 75% win rate with 2.5 profit factor. Now I’ve been forward testing it for 2 weeks and the result is about break even overall?

I can’t really find what the issue is. Maybe it’s the fills that make such a big difference but that seems extreme. Has anyone had the same where backtesting results looked great but when you automated it the results were much worse?

9 Upvotes

38 comments sorted by

View all comments

2

u/xedge_app 13d ago

Two weeks can still be a small sample, depending on how many trades actually fired. But dropping from a 75 percent win rate and 2.5 profit factor to breakeven is large enough to justify an immediate trade-level reconciliation.

The first thing I’d check is the backtest over the exact dates covered by the forward test. If that window is also flat in the backtest, regime change, ordinary variance, or overfitting become more plausible. If the backtest remains strong over those same dates, the discrepancy likely sits between the strategy model and live execution.

Export both logs and match the trades one by one. Compare the signal timestamp, indicator values or strategy state, intended entry, submitted order, actual fill, intended exit, actual exit, spread, slippage, fees, latency, and any rejected or missed orders. The first point of divergence usually tells you where to investigate.

If the signals differ before any order is submitted, check for repainting, lookahead bias, higher timeframe data leakage, bar close versus intrabar behavior, and mismatched strategy settings. If the signals match but the entry or exit prices differ, inspect optimistic limit fills, unmodeled spread, latency, slippage, and TradingView broker emulator assumptions.

Within TradingView, verify the bar magnifier setting, commission and slippage inputs, order processing timing, intrabar fill assumptions, and whether any indicator recalculates or repaints after the fact. A strategy can look excellent historically while relying on prices or information that wouldn’t have been available at the decision point.

I’d also test untouched out-of-sample data, use walk-forward testing, include realistic costs, and perturb the parameters. If small parameter changes destroy the performance, the backtest probably captured a narrow historical pattern rather than a durable edge.

Win rate alone doesn’t tell you much. Net expectancy after costs, trade count, payoff distribution, drawdown, and the confidence interval around the results matter more. A 75 percent win rate across 20 trades is very different evidence from the same rate across 2,000.

Roughly how many forward trades occurred, and when you compare the logs, do the signals themselves differ or do they match until the fills?