allorca

Overfitting

Tuning a rule so closely to past data that it matches chance quirks, making it look better on the past than on new data.

Overfitting is tuning a trading rule or model so closely to past data that it fits luck as well as any real pattern. Past prices mix any lasting patterns with a lot of chance movement, called noise. A rule with enough settings to tweak can be shaped around the noise too, and that particular noise does not repeat. It matters because almost anyone can make a rule look brilliant on old data by trying enough versions. Warning signs include many adjustable settings, and results that fall apart when a setting moves a little (a 37-day average that shines while 35-day and 40-day versions do poorly) or when the rule meets data it has never seen. The common misunderstanding is that a closer fit to the past means a better rule. The real test is data the rule was never shaped on, and that test wears out with reuse: tweaks made after each check slowly turn the fresh data into part of the fitting.

Example

Made-up numbers: a trader tries 200 versions of a rule on five years of prices. The best turns a simulated $10,000 into $25,000. On the next year's prices, which no version had seen, it loses $800. One year is a short test, but the gap points to noise, not a lasting pattern.

Related

This term appears in Allorca’s free lessons. Start learning.