Preface
Many developers, when developing strategies, will write long and short strategies together in the same code, so there will only be one direction at a time. This is "integration" for developers, but they find that the resulting strategies are not easy to debug or may be overfitting. So how should a strategy be done?
Strategy Combination
This is a long strategy:
This is a short strategy:
It can be seen that the sampling time periods of the above two strategies are the same, and the size of the strategy operation time zone is also the same, but the performance visually is not very good.
So what will happen if we combine these two long and short strategies?
The combined strategy looks like this:
Hmm, it looks good.
So why is it like this?
Introduction to Strategy Combination
In last year's (2022) crypto hedge fund report, it can be seen that multi-strategy is a way that hedge fund companies use, and it is also a way that MFT/LFT developers will use.
"Multi-Strategy" is to diversify investments in strategies of different natures, for example:
Originally, I only had one strategy, and 100% of my funds were in this strategy, but the overall system risk was all on this one;
But now I have developed 10 strategies, and I can invest only 10% of the total funds in each one, and the risk is spread across 10, and the profit and loss amplitude and "timing" of the strategies may not be the same. This means that when one strategy loses, another strategy has the opportunity to profit and hedge the risk of the losing strategy.
This method also has the same effect in preventing overfitting: Simple divergence is better than combining them.
What should you do as a developer?
Do not integrate the logic of the strategy too much as a condition (the condition does not need to be too rigorous, as this will greatly increase the probability of overfitting).
Write long and short strategies separately, and do not complete the logic of going long and short at the beginning. The long and short should be separate, after all, my long closing does not mean I have to go short.
Multiple strategies but low correlation, and the backtesting should be run with all strategies together (but here, pay attention to using the funds that have been diversified for testing).
Supplement
Long/short strategy is also a kind of multi-strategy diversification, because long and short may open positions at the same time, or as in pair trading, they are open at the same time; in this case, one side may profit and the other may lose, but in pair trading, the profit comes from the change in the price difference between the two pairs (convergence or divergence), so multiple strategies also have the benefit of generating new alpha (excess returns) from the low correlation between the two strategies.
The above figure shows that hedge funds usually use long/short strategy as the main profit project, and long is the main one, that is, the long/short direction is used as a separate strategy.
Conclusion
When developing strategies, using multiple strategies, low correlation, diversification in writing and execution (running together), and separating long and short, as the main axis, can prevent the chance of overfitting in the first step, make the logic of each strategy clearer and simpler, facilitate debugging, and strengthen the robustness and risk diversification of the strategy.
Learning Discussion Group
Dear readers, you may be thinking, "Where can I learn and see these in-depth analysis methods and valuable information?"
No need to look any further! In addition to our website's high-quality content, we also invite friends who want to learn about investing in cryptocurrencies and cryptocurrencies to join our "DA Trader Alliance" VIP group, where there are many enthusiastic traders to exchange and discuss with.
Click the link to fill out the form! 🔗 https://datatw.io/vip/ Once approved, you will be able to join this most joyful and high-quality community of cryptocurrency!
Get ready to embark on an exciting investment learning journey with us!
免责声明:本文章仅代表作者个人观点,不代表本平台的立场和观点。本文章仅供信息分享,不构成对任何人的任何投资建议。用户与作者之间的任何争议,与本平台无关。如网页中刊载的文章或图片涉及侵权,请提供相关的权利证明和身份证明发送邮件到support@aicoin.com,本平台相关工作人员将会进行核查。