Back

Requested symbol not found in database

Hello,

For an algorithm I am trying out, I have a bunch of specific stock symbols I would like to follow. One of them is YDLE which does not exist in the QuantConnect database currently. When I run the backtest, it aborts with:

Backtest Error: Requested symbol (YDLE) not found in database.

I tried wrapping the AddSecurity call in a try-catch so that the backtest could continue, but that didn't work.

Is there a way to gracefully continue a backtest if the symbol is not in the QuantConnect database?

To test this, you can just clone the starter project, substitute SPY with YDLE and then put a try-catch around AddSecurity:

try
{
AddSecurity(SecurityType.Equity, "YDLE", Resolution.Minute);
}
catch {}

Thanks,
Carl
Update Backtest








Hi Carl -- This error means we don't have that symbol and changing your algorithm-code won't help make the data available.

However in this case it was just that YDLE is relatively new and was just slow getting added to the database. I've manually added it now and your algorithm should work.
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.


Well my real motivation here is to feed lots of different symbols to AddSecurity() (I've got a large list) and be able to backtest the code without having to comment out symbols that don't exist. For now, I will just have to write a preprocessor that filters out symbols that are not supported by QuantConnect, but it would be nice if AddSecurity() didn't fatally crash the backtest but instead continued (without using that symbol).

Without the filter preprocessing, my workflow has been to run the backtest, see which symbol is not included in the database, comment it out of the code, then re-run. It just takes a long time to do it that way. I will try the filter preprocessor approach.

Thanks,
Carl

PS - Here are a list of symbols so far that I wanted to backtest on but were not present in the database:

BLFS
ARDX
XENT
MDXG
TNXP
SHLX
AERI
GBSN
JMEI
RDUS
ERN
ADXS
RXDX
MOMO
EYES
CPXX
KITE
CHAD
CBMG
PETX
KZ
CHAU
AST
RCPI
GRBK
NVIV
TERP
ASHS
NHTC
OCUL
AVOL
ADAP
NDRM
ONDK
AXON
VSLR
LPCN
ITEK
VGGL
STLD
RYAM
BNED
GBIM
BXLT
TECU
FNJN
YDLE
TUBE
0

Thanks for the clarification Carl, there are a bunch of those who we have data for, but aren't in the database yet. I've chatted with Mike and we'll make a small update which allows backtesting even if the symbol isn't yet registered. If we cannot find data during a backtest we'll send a warning.
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.


This has been completed and will be available with the next deploy.
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