Hello, I am having troubles trying to get a list of all symbols in the Technology Universe. I started a new algorithm with the Technology Universe Module (which comes with the TechnologyUniverseModule.py and self.SetUniverseSelection(TechnologyUniverseModule()) in the Initialize()). May I know how to access information from all the assets in the Technology Universe?
Link Liang
Hi Soggeh,
After a universe selection, we subscribe to all the symbols that we selected. By subscribing, the data of those symbols will arrive in the next data slice{}, which will be handled by OnData() method. Moreover, we could manage the change of universe in OnSecuritiesChanged() method. You might find more helpful information in our documentation page.
In the backtest I logged the ticker name of the securities in the universe in Ondata() method. Although in the chosen time range, there is no change in the universe based on Technology Universe Module selection, I've put code there in OnSecuritiesChanged() method to demonstrate how to log the ticker name of securities added to & removed from the universe (in OnSecuritiesChanged()). You could access whatever properties you want (OHLC, etc).
Hope it helps!
Soggeh
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!