Back

How to import all symbols in Research?

Hello,

From the documentation, I learn the following way to add individual equity; but is there way to add the whole universe without adding each symbol?  For example, I want to add all symbols = MorningstarSectorCode.Technology, and search for tech stocks that meet fundamental criteria overtime.    What would be the best approach? Thanks

 

qb = QuantBook()

symbols=["SPY","VMW","TWTR","ADBE","W","UBER","LYFT","WORK","FB","PINS","SQ","MSFT"]

for symbol in symbols:
    qb.AddEquity(symbol)

history = qb.History(qb.Securities.Keys, 253, Resolution.Daily)

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.


Hi Hua,

Universe selection is not currently supported in the research environment. For now, this can only be done during a backtest.

For the securities we manually enter into the research environment, we can request historical fundamental data by using the GetFundamental method.

qb = QuantBook()
aapl = qb.AddEquity("AAPL").Symbol
qb.GetFundamental([aapl], "AssetClassification.MorningstarIndustryCode", datetime(2019, 1, 4), datetime.now())

Review our documentation for more information.

Best,
Derek Melchin

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.


Thanks Derek! hopefully universe selection can be supported in the research environment in near future..

Best,

Hua

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