Hello. How can I get my algorithm to look at all stocks on the NYSE instead of having to list them out individually like this?
QUANTCONNECT COMMUNITY
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.
Gurumeher Sawhney
An algorithm can look at all stocks in the NYSE using Universe Selection. Universe selection is a functionality provided by QuantConnect that allows the user to rotate securities in their algorithm based on filter criteria. Universe selection has two levels: the Coarse Selection and then the Fine Selection. The stock exchange data is in the FineFundamental type, which means that you will need to filter for the stock exchange ID in Fine Selection. The tutorial below shows an implementation where the Fine Selection function selects an investment universe consisting of all stocks from AMEX and NYSE. I suggest reading the entire documentation on universe selection to understand how it interacts with QCAlgorithm.
S O'Keeffe
Thank you Gurumeher! I will read that documentation on universe selection. Appreciate the help!
S O'Keeffe
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!