Hello All,
I am attempting to backtest a strategy that trades Futures contracts for the Indices. However, when I run my backtest I receive the error that the symbols I am attempting to trade are marked as non-tradable. I would like to be trading the front month contract and only focus on the M, U, Z, H contracts. I have run this exact algorithm with forex and equities and the backtests run fine so it must be some issue with how I am selecting the specific futures contracts. Any help would be greatly appreciated! Also I am not a coder so if there is any mistakes or bad practice you notice feel free to point it out. Thanks again!
Varad Kabade
Hi Matthew Laux,
The above algorithm is trying to place an order on the Future symbol(chain identifier) instead of on a selected future Contract. Contracts can be retrieved by using
Â
or They are present in FutureChains property of the Slice object in OnData event handler. The indicator needs to be created for a Future contract.
Refer to the attached backtest regarding the above changes.Best,
Varad Kabade
Matthew Laux
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!