TradeViora AcademyLearn. Analyze. Practice. Trade Smarter.
Menu

FREE FINANCIAL EDUCATION

Overfitting

Explain how trying many strategies can select noise.

0%

What you will learn

Prerequisites: Parameter selection, training versus evaluation data and random variation.

Mechanism and decision rules

Overfitting occurs when a strategy is selected to match peculiarities of the research sample that do not persist. It can arise through many parameters, many candidate instruments, repeated filter changes or informal visual experimentation. The effective search includes abandoned ideas, not just the final published rule. A simple-looking final strategy may still be the winner of thousands of hidden trials.

Keep a research log of candidates and selection criteria. Prefer economic or market-mechanism hypotheses that constrain the search, and inspect nearby parameter behavior rather than celebrating one isolated optimum. Preserve evaluation data from design decisions where possible. Repeatedly inspecting and adapting to a holdout gradually turns it into training information; chronological splitting is useful but not a magical certificate of validity.

Worked example · synthetic data

Imagine 100 synthetic candidate rules with no true edge, each tested on noisy historical returns. Even if every individual test has only a 5% false-positive probability, selecting the best-looking result from the group creates a much larger chance of finding an apparent success. Under an illustrative independence assumption, the chance of at least one false positive is 1 − 0.95^100 ≈ 99.41%.

Real strategy tests are usually dependent, so that exact percentage is not a universal estimate. The example demonstrates the selection mechanism: reporting only the winner conceals the number of opportunities for luck to look impressive.

Failure modes and limits

Parameter stability is supportive evidence, not proof of a persistent edge. Markets change, and a genuinely useful effect can also be weak in a small sample. Statistical corrections require assumptions and a record of the search. Do not present a repeatedly reused test set as untouched out-of-sample evidence.

Practice case

Twenty independent no-edge tests each have a 5% false-positive rate. Compute the illustrative chance of at least one false positive. Why may the exact number not apply to twenty related moving-average rules?

Reveal the worked answer

The probability is 1 − 0.95^20 ≈ 64.15%. Related moving-average rules share data and signals, so their outcomes are dependent. The independence formula is illustrative; the broader need to account for selection remains.

Check your understanding

Does a simple final rule prove little overfitting risk?


Explanation

Search history matters as well as the final rule’s apparent simplicity.

What happens when a holdout repeatedly guides revisions?


Explanation

Observed evaluation outcomes influence design and weaken independence.

Under independent 5% tests, chance of at least one false positive across 20 is approximately?


Explanation

The complement of no false positives is 1−0.95^20.

Sources and next steps

The lesson, calculations and synthetic cases are original educational material. References explain underlying contract or chart conventions; none validates the profitability of a trading rule. Actual contract specifications, settlement obligations and charges must be checked before trading.

Explore OHLCV data in the chart lab · Explore volume-at-price and TPO data · Practice library