← TradingView strategy optimizer
Risk · Optimization·June 2026·8 min read

How to Avoid Curve-Fitting Your Trading Strategy

Curve fitting is the silent killer of backtested strategies. Here's a 2026 checklist to detect and avoid it before going live.

Curve fitting (also called overfitting) is the reason most beautifully optimized TradingView strategies blow up in the first month of live trading. The strategy didn't fail — the optimization process did. Here's how to recognize curve fitting, prevent it, and pressure-test any parameter set before it ever sees real capital.

What curve fitting actually is. It's when your parameter set is tuned so precisely to historical price action that it captures noise instead of an underlying edge. The hallmark: stellar in-sample results, mediocre or losing out-of-sample results, and a single 'magic' parameter combination surrounded by losing neighbors.

Warning sign 1 — Isolated peaks. If RSI length 14 produces Profit Factor 2.8 while lengths 13 and 15 produce 0.9 and 1.1, you're looking at noise, not signal. A real edge produces a stability plateau where neighboring values perform comparably. A good TradingView strategy optimizer visualizes this — Optimizer AI's Overfit Radar™ flags isolated peaks automatically.

Warning sign 2 — Too many optimized inputs. Optimizing 12 inputs across millions of combinations will always find a great-looking historical fit. It will almost never reproduce live. Cap your optimization at 3–5 truly meaningful inputs.

Warning sign 3 — Profit Factor above 4 with low trade count. A Profit Factor of 5.0 on 30 trades is a curve fit. A Profit Factor of 1.6 on 400 trades is an edge. Sample size matters more than the headline metric.

Warning sign 4 — Re-optimization every week. If your strategy needs new parameters every week to keep working, you don't have a strategy — you have a moving target chasing recent noise.

Prevention 1 — In-sample / out-of-sample split. Hold back at least 30% of your data. Optimize only on the in-sample half, then validate on the unseen out-of-sample half. Anything whose out-of-sample Profit Factor drops more than 30% gets discarded.

Prevention 2 — Walk-forward analysis. Slide a window through your data: optimize on months 1–6, test on month 7, then optimize on months 2–7, test on month 8, and so on. A strategy that produces consistent walk-forward results is far more likely to survive live.

Prevention 3 — Robustness scoring. Instead of picking the single highest-profit row, pick the row with the highest composite robustness score (profit + drawdown + parameter stability + trade count). Optimizer AI's Future Survival Score™ does this automatically; you can replicate it manually in a spreadsheet if you must.

Prevention 4 — Forward test on paper. Two to four weeks on a paper account is the cheapest possible validation. If the strategy can't survive paper trading, it certainly can't survive live execution costs.

Doing it the right way. The combination of disciplined input design (see the Pine Script parameter optimization guide), out-of-sample validation (see how to optimize a TradingView strategy), and robustness-first ranking (built into the TradingView strategy optimizer) is the modern 2026 standard. Skip any one of them and curve fitting will find you.

Related guides