Optimization is useful. It is also one of the easiest ways to manufacture confidence. The problem begins when the search for robust settings quietly becomes a search for settings that make the chart look better.
That distinction matters because a trader can spend weeks improving profit factor, drawdown and win rate while reducing the amount of real information in the result. The strategy becomes better at explaining the past and no better at surviving the future.
Two closely related parts of this decision are Can You Trust Your Backtest? 8 Checks Before You Risk Real Money and Should You Fix or Abandon a Trading Strategy? A Diagnosis-First Framework.
What overfitting actually means
A trading strategy is overfit when its rules or parameters capture details of the historical sample that do not persist outside that sample. Some of those details may be genuine market structure. Others are accidents: a particular sequence of volatility, one unusually clean trend, a handful of outsized trades or random noise.
The optimizer does not know the difference unless the research process forces it to prove the difference.
The number of attempts matters
Suppose you test ten settings and one works. Now suppose you test ten thousand settings and one works. The winning result can look identical on the page, but the second experiment had far more chances to get lucky.
This is why QuantWeaver's current rebuilding protocol records the experiment family and tested variants. Multiple testing is part of the evidence. You cannot fairly judge the winner while pretending the losers never existed.
A sharp peak is often less reassuring than a plateau
If a parameter value of 37 produces exceptional results while 35, 36, 38 and 39 collapse, you may have found a very precise economic threshold. More often, you have found a fragile historical coincidence.
Robust systems tend to make economic sense across a region of reasonable settings. The exact best setting can still matter, but stability around it tells you whether the result depends on one lucky coordinate.
Filters can hide the problem
Adding filters often improves a backtest because filters remove trades. That does not automatically mean the filter identified a causal failure condition. It may simply have deleted historical losers.A regime filter, session filter or volatility threshold should have an economic reason, a preregistered role and evidence that it adds something beyond trade deletion. Otherwise the system can accumulate a museum of filters, each one installed to explain a previous disappointment.
Validation can be overfit too
Walk-forward analysis is valuable because it repeatedly tests settings on unseen windows. But the walk-forward scheme itself has choices: training length, test length, step size, optimization objective and acceptance thresholds. If you keep changing those choices after seeing the results, you can fit the validation process to history.A stronger process freezes the rules first and accounts for the searches honestly.
A better backtest does not prove that you fixed the strategy
This is the central Rehabilitation principle. If an automated strategy is struggling, the right response begins with the mechanism. What is the strategy trying to exploit? Which part of the implementation expresses that idea? Which market states should support it? Which conditions should hurt it?
Only after the failure is understood should the code change. Otherwise optimization can turn a diagnosis problem into a prettier chart.
Practical signs that you may be curve-fitting
Watch for large performance jumps from tiny parameter changes, strong in-sample results with weak out-of-sample performance, constant addition of filters, parameter values that move wildly between periods, profitability concentrated in a few trades, and repeated changes to the testing process after disappointing results.
None of those proves overfitting by itself. Together they are reasons to slow down and ask whether the strategy is discovering a mechanism or simply learning the dataset.