I want to overwrite one universe selection by another, and only subscribe to the symbols the second universe selection returns. Is there a way to unsubscribe from the symbols of one universe at any given time. In the attached backtest, I want to remove subscription of all symbols returned from CoarseUniverseSelection, and only subscribe to the 2 symbols I return from ScheduledSymbolSelect. Currently the algorithm subscribes to all symbols returned from each function.
Alexandre Catarino
Hi Haakon Flaarønning ,
Universe Selection is responsible for adding and removing securities. Manual removal (RemoveSecurity method) of securities of dynamic universes is disabled.
We have an open GitHub issue that addresses the issue (from another point of view):
Custom Universe Selection Schedule #3890
Best regards,
Alex
Want to invest in QuantConnect as we build the Linux of quant finance? Checkout our Wefunder campaign to join the revolution.
Haakon
Alexandre Catarino Thanks for the response! 😊 Do you know if it is possible to set multiple time rules for a scheduled universe (e.g run at 09:00 and 09:30 every day)? Also, when using scheduled universe selection, are previous stocks removed once you return a new set of symbols? If both is possible then you can:
Derek Melchin
Hi Haakon,
To run the scheduled universe multiple times per day, we can use self.TimeRules.Every(timedelta(minutes=30)).
Yes.
Yes, but if we use self.TimeRules.Every(timedelta(minutes=30)), then the universe selection will run more than twice per day. We just need to return Universe.Unchanged when we want to keep the current universe.
Best,
Derek Melchin
Want to invest in QuantConnect as we build the Linux of quant finance? Checkout our Wefunder campaign to join the revolution.
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.
Haakon
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!