I am first trying to get all the symbols in my universe in the initialize method. The best thing I could find is this:
self._universe = self.add_universe(CryptoUniverse.binance(self.universe_selection_filter))
for symbols in self._universe.memebers.keys:
self.debug(symbol.symbol)
## I also tried this:
universe_members = self.universe_manager[self._universe.configuration.symbol].members
for kvp in universe_members:
symbol = kvp.key # The symbol of the asset.
security = kvp.value # The security in the universe.
self.debug(symbol)
self.debug(security)
in both cases, I can see the dictionary object <System.Collections.Generic.Dictionary[Symbol,Security] > but it seems to have nothing inside it when I try to iterate over it. I tried using len() and the output was 0I'm doing this because I want to parse all the symbols in the universe such that I remove any non USDT pairs from my universe using self.universe_manager.remove()Any help with this is greatly appreciated!
Mia Alissi
Sources: Kraken Crypto Price Data - QuantConnect.com, Key Concepts - QuantConnect.com, Crypto - QuantConnect.com, Dropbox Base Data Universe Selection Algorithm, Indicator Universes - QuantConnect.com
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.
Tamer
I specifically want to initialize my universe instead of accessing the symbols from coarse
Tamer
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!