This error in the console while backtesting is driving me batty! I get quite a few of the following errors in the console when I backtest:
Backtest Handled Error: The security with symbol 'NWSA T3MO1488O0H1' is marked as non-tradable.
I have the following block in my portfolio code to try and handle it right when it creates the target to hand off to execute:
if (algorithm.Securities[insight.Symbol].IsTradable) {
Decimal numberOfShares = algorithm.CalculateOrderQuantity(insight.Symbol, .10m);
targets.Add(new PortfolioTarget(insight.Symbol, numberOfShares));
}
What am I missing? I am checking literally as I am making the trade, I looked at the open source code and it looks like I am using the same check that is used a bit down the line to throw the error.
Alethea Lin
Hi Marcus,
Could you please share your algorithm so that we could reproduce your issue and address it in detail? Thanks for your support.
Matthew Martin
I too have this problem (in C#). I have seen it mentioned in several threads, but have not seen a solution. My message is, for example:
Backtest Handled Error: The security with symbol 'BA R735QTJ8XC9X' is marked as non-tradable.
Is there a resolution, or a know common coding error that is made that causes this condition? Please note other securities are trading just fine and the securities marked as non-tradeable change as the universe changes. Additionally, other stocks selected by the universe do trade. I cannot share my current version of my project.Jared Broad
Its likely been delisted but hard to say without a case to reproduce the issue. Please post a new thread so we can assist.
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.
Marcus Weidner
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!