9 Proven Strategies to Dodge Overfitting in Algorithmic Trading: A Data-Driven Approach
Using research to find the top strategies to avoid overfitting
While Quantopian is sadly no more, they published a fascinating paper entitled All that Glitters Is Not Gold: Comparing Backtest and Out-of-Sample Performance on a Large Cohort of Trading Algorithms in 2016. The researchers analyzed 888 trading strategies submitted to the Quantopian community to look for factors that predicted better out of sample performance. Here are some of the main findings:
Consider Higher-Order Moments: Elements like volatility and maximum drawdown, as well as features of portfolio construction like hedging, can significantly predict out-of-sample performance. This suggests that a broader range of data points should be considered in addition to typical metrics like the Sharpe ratio.
Sharpe Ratio May Not Predict Future Performance: The Sharpe ratio and other commonly reported backtest evaluation metrics might not predict out-of-sample performance accurately, despite their widespread use in the industry.
Limit the Number of Backtests: The more backtests a user ran, the larger the difference between in-sample and out-of-sample performance. This supports the notion of limiting the number of backtests to avoid overfitting.
Utilize Machine Learning Techniques: Non-linear machine learning classifiers can predict out-of-sample performance with higher accuracy than linear, univariate features. Machine learning, combined with careful feature engineering, can be used to construct a portfolio of strategies that result in competitive cumulative out-of-sample returns.
Consider Different Performance Metrics: The most predictive measure of out-of-sample performance was found to be the Sharpe ratio computed over the last in-sample year. Different performance metrics may offer better predictability than others.
Penalize Sharpe Ratio Based on Backtesting Amount: The paper suggests penalizing the Sharpe ratio by the amount of backtesting done, to discourage excessive backtesting and to account for its potential to overfit the data.
Feature Importance in Machine Learning: In machine learning models, features quantifying higher-order moments, including skew and tail-behavior of returns (tail-ratio and kurtosis), were among the most important.
Data-Driven, Scientific Approach: Emphasizing a data scientific approach, such as machine learning, can lead to a more accurate evaluation of trading strategies, as opposed to relying solely on traditional financial metrics.
Test on Independent Data Sets: To confirm that a trading strategy is not overfit, it can be helpful to test it on an independent data set or over a much longer time frame. If the strategy continues to outperform, this could provide further confidence in its effectiveness.
As we conclude this exploration of strategies to avoid overfitting in algorithmic trading, it's vital to remember that the journey towards a high-performing trading algorithm is iterative and dynamic. The insights gained here should serve as a launchpad for your own exploration and testing. Not sure what algorithmic trading platform to start with? Check out this article discussing the Best Algorithmic Trading Bots Platforms which provides a comprehensive review to help you make an informed choice. Further, to reinforce your understanding of overfitting, we highly recommend this article on steps to avoid overfitting. These resources, coupled with the knowledge from this piece, should equip you well as you forge ahead in crafting and refining your algorithmic trading strategies.
Important Disclosures
Investing in securities involves risks, including the risk of loss, including principal. Composer Securities LLC is a broker-dealer registered with the SEC and member of FINRA / SIPC. The SEC has not approved this message.
Certain information contained in here has been obtained from third-party sources. While taken from sources believed to be reliable, Composer has not independently verified such information and makes no representations about the accuracy of the information or its appropriateness for a given situation. In addition, this content may include third-party advertisements; Composer has not reviewed such advertisements and does not endorse any advertising content contained therein.
This content is provided for informational purposes only, as it was prepared without regard to any specific objectives, or financial circumstances, and should not be relied upon as legal, business, investment, or tax advice. You should consult your own advisers as to those matters. References to any securities or digital assets are for illustrative purposes only and do not constitute an investment recommendation or offer to provide investment advisory services. Furthermore, this content is not intended as a recommendation to purchase or sell any security and performance of certain hypothetical scenarios described herein is not necessarily indicative of actual results. Any investments referred to, or described are not representative of all investments in strategies managed by Composer, and there can be no assurance that the investments will be profitable or that other investments made in the future will have similar characteristics or results.
Charts and graphs provided within are for informational purposes solely and should not be relied upon when making any investment decision. Past performance is not indicative of future results. The content speaks only as of the date indicated. Any projections, estimates, forecasts, targets, prospects, and/or opinions expressed in these materials are subject to change without notice and may differ or be contrary to opinions expressed by others. Please see Composer's Legal Page for additional important information.