Hi
i would like to combine multiple algorithms so that hopefully the the combined algorithm has a better return profile than any single algorithm. I noticed that I can do this using the Alpha class. However where I am having trouble is in the case where the different alphas trade different instruments and at different time periods. So my first alpha is a simple 60-40 ration of spy and tlt and say my second alpha only trades the QQQ of current price is grater than 200 MA. Since the instruments are different how do I pass these instruments to the different alpha. I believe the current model will work as long as all the alphas trade the same set of instruments but won’t work well if they trade set of instruments. is this correct? And how do I deal with this situation?
Varad Kabade
Hi Narendra Kulkarni,
For the above-mentioned requirement we can use the Add alpha method to add multiple alphas. We can pass the list of tickers relevant to each alpha refer to the following code snippet:
Â
Best,
Varad kabade
Narendra Kulkarni
thank you for your response. One more follow up question. Say I want to run alpha1 code every 5 minutes while alpha2 every 30 minutes, how do I set that? Should I just set the resolution to the highest frequency of minute and let each alpha build out the appropriate candle and handle the trades?
Secondly in your example should I use self.AddUniverseSelection() to Manual?
Varad Kabade
Hi Narendra,
There are two ways to do this:
Â
Secondly, in your example should I use self.AddUniverseSelection() to Manual?
We would have to use ManualUniverseSelection model because we have already determined the securities for each AlphaModel.
Best,
Varad Kabade
Narendra Kulkarni
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!