How to check if symbol was trading during backtest period before adding to universe?

Back

Hello! New here.

I need to get a universe of equities that were trading in early 2015 for a backtest and view the tickers. (I need the tickers in order to pull data from an external data source.)   Whenever I backtest, I get a warning note that says "

Data for symbol PDLI has been limited due to numerical precision issues in the factor file. The starting date has been set to 12/30/2050" Sometimes the dates are less ridiculous but always not within my set time period. Is there a way to check if it was in fact possible to purchase PDLI in 2015, before adding it?

Also, I just added two lines of code and suddenly my backtest is taking ages. Any resources on avoiding that, would be appreciated.  Here are the two lines that seem to be making it take forever:
all_symbols = [ x.Value for x in self.Portfolio.Keys ]
self.Log("all: " + str(all_symbols)) 
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 Kris,

The reason for the error message is because it means we do not have a factor file for that security, and it doesn’t mean that security is not purchasable.

As for the reason the two lines of code causes the major slowdown, this is because converting all securities every selected by the Universe Selection to strings and logging them every minute bar adds up. As a fix, I suggest setting the Universe Resolution to Resolution.Daily and/or only printing the first 10 tickers, both of which I will show in the attached backtest.

Best,
Shile Wen

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.


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