The attached backtest runs with the tickers ["MSFT", "AEP", "CAT"], but if I add "BAC" to the list then it fails with:
“We were unable to locate the ticker 'BAC'. in SymbolCache.cs:line 54”
This is the entire stack-trace and there is no backtest created to attach to this discussion.
The intention of my code is to get the PE ratio of the selected tickers into ‘fundamentals_dict’ to use in the ‘trade ’function.
What am I doing wrong?
Please help
Nico Xenox
Hey Adriaan Janse van Vuuren,
the following line brakes the code:
To make it work you can call all active securities in your portfolio, this will result in a complete history request:
Hope it helps ;)
Best,
Nico
Adriaan Janse van Vuuren
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!