Is it possible to create a scheduled universe selector that leverages the fundamental universe selection model.
Alternatively, set a different schedule for the fundamental selection to refresh?
QUANTCONNECT COMMUNITY
Is it possible to create a scheduled universe selector that leverages the fundamental universe selection model.
Alternatively, set a different schedule for the fundamental selection to refresh?
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.
Adam W
If you want to set a lower frequency for universe selection, you can add a check for the `self.Time` attribute (in Python, this is a `datetime.datetime` object). For higher frequency than daily, I don't think this is possible.
i.e. For a universe selection that refreshes weekly:
def Initialize(self): self.week_index = 0 self.symbols = [] self.AddUniverse(self.CoarseUniverse, self.FineUniverse) def CoarseUniverse(self, coarse): # Universe is still called everyday, but returns same list of symbols intra-week current_week = self.Time.isocalendar()[1] if current_week == self.week_index: return self.symbols # Coarse filter logic self.symbols = # sort by dollar volume, etc return self.symbols def FineUniverse(self, fine): current_week = self.Time.isocalendar()[1] if current_week == self.week_index: return self.symbols self.week_index = current_week # Update the week_index # Fine filter logic self.symbols = # sort by fundamentals, etc return self.symbols
Removing the check in FineUniverse will return the same coarse symbols every week, but do fine filter daily - and vice versa.
Jared Broad
You can also do scheduled universe selection with the algorithm framework.
https://github.com/QuantConnect/Lean/blob/master/Algorithm.Python/ScheduledUniverseSelectionModelRegressionAlgorithm.pyThe 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.
Peter Dimov
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!