Curve-fitting — overfitting — is the reason so many "amazing" backtests turn into losing live accounts. It happens when you tune a strategy so tightly to past data that it memorizes history's noise instead of capturing a real, repeatable edge. Here's how to catch it before it costs you.
What curve-fitting looks like
You add a filter, tweak a threshold, adjust a stop — and the equity curve gets prettier each time. That feels like progress. Often it's the opposite: you're fitting the strategy to the exact wiggles of this history, wiggles that won't repeat. The tell is a curve that's beautiful in-sample and falls apart the moment it meets data it hasn't seen.
How to detect it
- Out-of-sample holdout — hold back a chunk of history the optimizer never touches, and test on it once at the very end. A big gap between in-sample and holdout performance is overfitting.
- Walk-forward analysis — repeatedly optimize on one window and test on the next. If the strategy only works on the windows it was fit to, you've found noise.
- Parameter stability — a real edge works across a range of nearby settings, forming a stable plateau. If it only works at one exact value and neighbours fail, that's a lucky spike, not an edge.
- Deflated Sharpe / PBO — statistical gates that penalize the fact that you tried many variations, estimating the odds your "winner" is a false positive.
Fewer knobs, more honesty
The more parameters you can tune, the easier it is to overfit — so favor simple strategies and be suspicious of any result that needed a dozen filters to look good. The right mindset is adversarial: actively try to break your strategy. What survives the attempt is worth trading.
TapeScript is built around that adversarial idea — every strategy faces walk-forward, an untouched holdout, parameter-stability checks, and deflated-Sharpe/PBO overfitting gates automatically, and it tells you honestly when there's no edge to find. Kill your curve-fits →