Hello, All. What is the best way to add a single symbol (SPY in my case) to an existing universe selection (like the QC500 universe for example)? I tried to use AddEquity, but then when I try to warm up indicators for that symbol using the SetWarmup, it seems to cause some issues with the rest of my code, which is set up for universe selection. I think it would make things easier if could just add the symbol to the universe.
MildJoe
Do you have a filter that makes the universe selection? maybe you could just add the symbol to the list before it’s returned at the end of your universe filter? list.append(symbol)Â
Garrett Grow
No. I'm not using a filter. Just calling the QC500 universe as follows: self.AddUniverse(self.Universe.QC500)
Alexandre Catarino
Hi Garrett Grow ,
I believe the best option would be fixing the issue with AddEquity("SPY").Â
You can copy the Universe.QC500 code (e.g from the QC500UniverseSelectionModel), and add SPY Symbol to the return statement of the SelectFine method:
Best regards,
Alex
Garrett Grow
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!