I've opened a Research Environment and am able to run the code in there. For instance, I'm able to see the graph of SPY daily close prices.
I've tried:
gold = qb.AddFuture("GCZ7")
h1 = qb.History(360, Resolution.Daily)
This works without complaint in Jupyter.
But when I query for data:
h1.loc["GCZ7"]["close"].plot()
It fails:
KeyError: 'the label [GCZ7] is not in the [index]'
I searched the discussions without finding anything on this. The link to the docs does not mention futures data. It is not immediately clear to me how to transition the algorithm (
) into the Jupyter notebook. I'm guessing based on the algorithm that there is some sort of subcription to futures chain that I need to do. Please help -- presumably by providing an example.
Bruno Zito
I have same problem, and I haven't find any reference in documentation on using futures in Jupyter.
The error is related to the fact that h1 dataframe is empty, so the function History doesn't return an error, but anyway doesn't load anything in h1.
Tell me if you find any solution. Tks
Alexandre Catarino
Futures is not supported yet.
It is in our TODO list and hopefully we will get it done this month.
Ari Pine
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!