Analysis & metrics

Overfitting / Curve-fitting

Fitting a strategy too closely to noise or incidental features of the data used to develop it. Searching many rules and retaining the best result increases selection bias. An unusual parameter alone is not proof of overfitting; use separated validation data, realistic costs and sensitivity checks without repeatedly reusing the final test set.
Example. In a hypothetical experiment, 20 independent tests all have true null hypotheses and each uses a 5% error level. Expected false rejections are 20 × 0.05 = 1, while the probability of at least one is 1 − 0.95²⁰ ≈ 64.15%. This is a multiple-testing model, not the actual error rate of every Forex optimisation.

How noise gets fitted

Development data contain possible relationships and random events. Adding filters or choosing instruments and settings after reviewing performance can capture those events. The variant count also includes ideas discarded manually. An unusual indicator period does not independently prove an error, while a popular parameter offers no protection. The full selection and evaluation process matters, rather than the appearance of one curve.

Many searches change the interpretation

The best result among many models does not have the same interpretation as a single rule specified in advance. Dependent tests violate the 64.15% example’s assumptions, but do not automatically restore the winner’s credibility. Record the number and scope of searches. See Bailey and co-authors, The Probability of Backtest Overfitting on strategy selection; it does not imply a universal percentage penalty.

How to reduce the problem

Freeze definitions and separate development, validation and final testing. Examine neighbouring-parameter stability, realistic costs and different periods, disclosing these additional choices. Fitting to another validation result creates a need for a new honest evaluation. Do not convert the final test into training data without acknowledging it. Simplicity helps control the procedure, but does not itself establish an edge.

An economic story does not replace testing

A convincing account of demand, sessions or banks’ behaviour can be attached retrospectively to chance results. An explanation should generate a hypothesis specified in advance, with conditions under which observations would not support it. Do not dismiss every failure as an exceptional market. Adding exceptions expands the search for rules; record and reevaluate them, retaining failed variants and reasons for changes.

Diagnosis and application

Weak OOS can also reflect a regime change, implementation problem or uncertainty. Compare data sources, availability timestamps and costs before drawing conclusions. A research journal should include failures as well as successes, with versions and dates. In the course: backtesting and forward testing and algorithmic trading. Source checked on 11 October 2026.

FAQ

Does an excellent backtest prove overfitting?
No. It warrants careful review of the process, rather than being a diagnosis by itself.
Does removing some filters solve it?
Not automatically. The revised rule also needs honest validation without selection against a known test.

← Back to the full glossary

Jarosław Wasiński

Editor-in-chief, ForexMechanics.com • Macro & FX analyst

Independent analyst and practitioner with over 20 years of experience in financial markets. Actively involved in Forex since 2007, with a focus on fundamental analysis, OTC market structure, and disciplined capital risk management.

  • Creator and editor-in-chief of MyBank.pl, providing reliable financial education since 2004.
  • Author of hundreds of in-depth market commentaries, structural analyses, and educational materials for traders and investors.
  • Advocate for market transparency, promoting education grounded in hard data and institutional reports (BIS, ESMA, CFTC).

All content is educational and informational only – it does not constitute investment advice or a recommendation. Remember: leveraged trading (Forex/CFD) carries a high risk of rapid capital loss.