When a stock is removed from the universe, what happens to the updates to the technical indicators?
Does the stock remain in the list of securities and indicators for the stock are still automatically updated?
QUANTCONNECT COMMUNITY
When a stock is removed from the universe, what happens to the updates to the technical indicators?
Does the stock remain in the list of securities and indicators for the stock are still automatically updated?
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 Valery T ,
When a security is removed from the universe, the data subscription is removed, and, consequently, there is no data to update the consolidator/indicator.
Please note that when we are working with universe selection, we should keep a reference of the consolidator and remove if from the subscription manager. For example:
class SymbolData: def __init__(self, algorithm, symbol): self.algorithm = algorithm self.symbol = symbol self.sma = SimpleMovingAverage(7) # Create Daily Consolidator and Register the indicators for automatic updates self.consolidator = algorithm.ResolveConsolidator(symbol, Resolution.Daily) algorithm.RegisterIndicator(symbol, self.sma, self.consolidator) def Clean(self): '''Clean: remove consolidator''' self.algorithm.SubscriptionManager.RemoveConsolidator(self.symbol, self.consolidator)
Because when the algorithm re-subscribe to a given security, it will create a new consolidator/indicator pair with the same characteristics.
Valery T
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!