STRATEGY LIBRARY

Eleven conditions, four trades a month: what overfitting looks like

Contents
This is a strategy optimised into uselessness, posted as an exhibit rather than a recommendation. It is what overfitting looks like when it is written down.

1. The exhibit

# BUY — eleven conditions, four trades a month, none of them good live if HhmmSs >= 94500 and HhmmSs <= 103000: if ChangeAngle(60) > 47 and Strength > 128 and AvgStrength(300) > 118: if DayAmount > 8000000 and Volatility(600) > 0.8 and Volatility(600) < 2.2: if SumBuyVol(120) > SumSellVol(120) * 1.7 and RisingStreak(8): Buy() Every number here was tuned to fit four specific trades in the test period. It backtested beautifully. Live it took two trades in two months and lost on both.

2. The numbers that give it away

ConditionThe tell
ChangeAngle(60) > 4747, not 45 or 50 — a threshold that precise came from a fit, not from a reason
Volatility(600) > 0.8 and < 2.2a two-sided band with both edges tuned
RisingStreak(8)eight consecutive rises is a very specific shape
AvgStrength(300) > 118a second strength condition doing almost the same job as the first
None of these is wrong on its own. Together they describe a handful of days rather than a market.

3. The one number that would have caught it

Trade count. It fell every single time the strategy "improved". That is the signal, and it is available while you are still optimising rather than two months later. A change that raises your average return and cuts your trade count by half has not made the strategy better — it has made your evidence weaker. With four trades in the sample, the confidence interval on the result is wider than the result. Watch trade count with the same attention you give to return, and treat any improvement that comes with a large drop in trades as a warning rather than a win.

4. Why it looked so good

A backtest with four trades is not a measurement, it is an anecdote. Selecting eleven conditions that all happen to be true on four profitable days is not hard — with enough parameters you can always do it, and the search itself is what produces the illusion. Our own model was not immune. When we audited it against live subscription constraints, 82.2% of its fills turned out to be trades we could not have taken, and those fills carried 48% of the profit (82% of our backtest fills were trades we could not have taken live).

5. What to do instead

Run the same entry at three sensitivities. If a strategy only works at exactly one setting of each threshold, it found your sample. If it degrades smoothly as you loosen it, there is something behind it. And compare against the baseline your trading strategy has to beat rather than against the previous version of itself. Optimising against your own last attempt is how you get here.

Educational template for research and backtesting. Not investment advice and not a signal service.

Related reading

← All strategy library

Originally published by TraderWe on July 27, 2026. You may quote and link to this page. Republishing the full text without a link back to the original is not permitted.

2 replies

BacktestBetty· Jul 2026 ago
Posting a failure as a template is genuinely more educational than another winner.
DataDrivenDee· Jul 2026 ago
The nesting depth alone is a warning sign. Four levels of `if` is usually four levels of fitting.
Sign in to reply →