LEAN is the open source
algorithmic trading engine powering QuantConnect. Founded in 2013 LEAN has been built by a
global community of 80+ engineers and powers more than a dozen hedge funds today.
Alpha League Competition: $1,000 Weekly Prize Pool
Qualifying Alpha Streams Reentered Weekly Learn
more
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.
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.
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.
Universe Selection is responsible for adding and removing securities. Manual removal (RemoveSecurity method) of securities of dynamic universes is disabled.
Want to invest in QuantConnect as we build the Linux of quant finance? Checkout our Wefunder campaign to join the revolution.
0
Haakon
1.8k Pro
,
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:
Capture the coarse object in CoarseUniverseSelection, but return an empty list subscribing to no symbols
Have a scheduled universe to run at two different times, first subscribing to one set of symbols (filtering using the coarse object) and then limit that selection on the next run to only those that fulfill certain requirements.
0
Derek Melchin
STAFF Pro
,
Hi Haakon,
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)?
To run the scheduled universe multiple times per day, we can use self.TimeRules.Every(timedelta(minutes=30)).
Also, when using scheduled universe selection, are previous stocks removed once you return a new set of symbols?
Yes.
If both is possible then you can
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.
0
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.
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.
Loading...
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!