The Framework Algorithm wizzard provides either a scheduled universe or a coarse/fine universe collection. How can I combine both and schedule a coarse/fine universe selection once a month?
Don't have an account? Join QuantConnect Today
QuantConnect Community Discussions
QUANTCONNECT COMMUNITY
LEAN is the open-source algorithmic trading engine powering QuantConnect. Founded in 2012 LEAN has been built by a global community of 180+ engineers and powers more than 300+ hedge funds today.
Join QuantConnect's Discord server for real-time support, where a vibrant community of traders and developers awaits to help you with any of your QuantConnect needs.
The Open-Quant League is a quarterly competition between universities and investment clubs for the best-performing strategy. The previous quarter's code is open-sourced, and competitors must adapt to survive.
Combine scheduled universe with coarse/fine universe selection monthly in QuantConnect.
Continue ReadingRefer to our Research Guidelines for high quality research posts.
Create an account on QuantConnect for the latest community delivered to your inbox.
Sign Up Today
|
|
|||||||
|
|
||||||||
|
Schedule Coarse/Fine Universe Selection
Filib Uster | March 2019
The Framework Algorithm wizzard provides either a scheduled universe or a coarse/fine universe collection. How can I combine both and schedule a coarse/fine universe selection once a month?
QuantConnectâ„¢ 2025. All Rights Reserved
Link Liang
Hi Filib,
Scheduled universe selection and coarse/fine universe selection are not designed to work in a chain combination. We are making more universe selection models.
Here is an example of scheduling selection once a month: in both CoarseSelectionFunction() and FineSelectionFunction(), we first check if it is a new month. If not, we return the unchanged symbol list. If it is a new month, then do monthly selection. The check for new month is
{if self.Time.month == self.lastMonth:
return self.symbols}
And the update for new month is
{self.lastMonth = self.Time.month}
Hope it helps!
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.
Filib Uster
Thanks for your answer - I am already using these kind of workarounds. My point is: They shouldn't be necessary. If you provide a scheduling mechanism for anything, you should also provide flexible scheduling periods. Right now, one can only choose between minute, daily, weekly and monthly and for the latter, you only get to choose between month start and month end. If I want any other period , or if I want to schedule an event in the middle of a month, I am bound to use workarounds and additional code, like the one you provided.
That has a smell...
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.
Jon Quant
I second Filib User. The ability to combine scheduled and coarse/fine universe selection would be great without the guard clause hack as I like the granularity that scheduled (ITimeTriggeredUniverse) brings.
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.
Alexandre Catarino
Hi!
We have opened a GitHub issue to address this request:
Custom Universe Selection Schedule #3890
If you have a GitHub account, you can subscribe to receive notifications on updates.
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!