What Is Overfitting?
In term:quantitative finance, overfitting of trading strategy means that the trading strategy results in backtest where mostly luck-driven and there is no real alpha.
Because of limited historical data, backtesting results, especially grid search results may look too rosy. Trading strategy is excessively tailored to historical market data, to the point that it performs well on past data but fails to generalize to new, unseen data or real-world market conditions. This phenomenon can occur when trading algorithm is optimised too much based on historical data, effectively fitting the strategy too closely to the noise or random fluctuations present in that data (luck-driven vs. finding real alpha).
Examples of overfitting include
Data snooping bias: Traders or developers sift through historical market data to find patterns or relationships that may not actually exist. By repeatedly testing different strategies on the same dataset, they might stumble upon strategies that seem to perform exceptionally well purely by chance.
Curve fitting: Traders may excessively tweak the parameters of their trading algorithms to make them fit historical data perfectly. While this may result in high returns on historical data, it often leads to poor performance in real-world trading because the strategy becomes too sensitive to past market conditions.
Optimization bias: Optimizing trading strategies based on past data can lead to strategies that are highly specialized to those specific market conditions. When market conditions change, these strategies may fail to adapt and perform poorly.
Complexity: Introducing unnecessary complexity into a trading strategy can increase the likelihood of overfitting. A complex model may capture noise in the data rather than true underlying relationships.
Overfitting bias can be mitigated with various methods
Using different datasets for strategy backtesting and validation of the backtest, a usual method in machine learning
Monte Carlo-method by creating random asset prices where the behavior resembles the :term:`
For continuous markets like cryptocurrency markets, you can do shifted trading hours <https://tradingstrategy.ai/blog/outperfoming-eth>__ and shifted OHLCV data.
See also