Back

Removing "tickersString ="

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?

 

Update Backtest







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.

https://www.quantconnect.com/tutorials/strategy-library/12-month-cycle-in-cross-section-of-stocks-returns
0

Thank you Gurumeher!  I will read that documentation on universe selection.  Appreciate the help!

1

Update Backtest





0

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.


Loading...

This discussion is closed