QUANTCONNECT COMMUNITY
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.
Lexx7
I tried the below code and it ran successfully but returned an empty dataframe.
Can you please check this still works
es = qb.AddFuture("ES") es.SetFilter(timedelta(0), timedelta(180)) future_history = qb.GetFutureHistory(es.Symbol, datetime(2017, 1, 11, 10, 10), datetime(2017, 1, 13, 12, 10)) future_history.GetAllData()
Â
Jack Simonson
Hi,
We've just done an overhaul of our futures data and will have the Research Environment updated soon. Once this is done, this code should work fine, but if you continue to encounter issues with it in the next week, please let us know and we'll do our best to find a solution.
Ch9ki7
I want to evaluate some ideas on options. But I need the greeks, looks like we can not get them through `option_history.GetAllData()`. How can we get the greeks and IV?
Link Liang
Hi Ch9ki7,
In research environment, there is no direct access to those values, therefore you have to calculate on your own. However, we offer those values in backtesting terminal. Here is the usage of option data. Greeks and IV can be accessed as properties of OptionContract object.
Hope it helps!
Brian Weber
Hi Jack,
I tried the example code for retrieving historical futures data, but when I get all the data nothing prints. Is there a bug for historical futures data?
Thanks,
Brian
Link Liang
Hi Brian,
Sorry about the inconvenience, we are aware of the bug and are working on addressing it for the community. Due to the current work in progress, we expect this will be resolved in about 1 week.
Brian Weber
Thank you, Link! No worries I check back in about a week to try the code again.
Islander
%matplotlib inline # Imports from clr import AddReference AddReference("System") AddReference("QuantConnect.Common") AddReference("QuantConnect.Jupyter") AddReference("QuantConnect.Indicators") from System import * from QuantConnect import * from QuantConnect.Data.Custom import * from QuantConnect.Data.Market import TradeBar, QuoteBar from QuantConnect.Jupyter import * from QuantConnect.Indicators import * from datetime import datetime, timedelta import matplotlib.pyplot as plt import pandas as pd # Create an instance qb = QuantBook() # Select asset data assets = ["SPY", "EURUSD", "BTCUSD", "GOOG", "ES", "XAUUSD"] spy = qb.AddEquity("SPY") # add equity data eur = qb.AddForex("EURUSD") # add forex data btc = qb.AddCrypto("BTCUSD") # add crypto data goog = qb.AddOption("GOOG") # add goog options es = qb.AddFuture("ES") # add SP 500 futures xau = qb.AddCfd("XAUUSD", Resolution.Minute, Market.Oanda) # Gets historical data from the subscribed assets, the last 360 datapoints with daily resolution h1 = qb.History(qb.Securities.Keys, 360, Resolution.Daily) # Plot closing prices from "SPY" for s in assets: h1.loc[s]["close"].plot()
fails with error:
the label [GOOG] is not in the [index]
but I suppose that if I use SPY and XAUUSD only it fails as well.
Why is this happening?
Hao Bin Zhang
Islander I think it has to do with this line
h1 = qb.History(qb.Securities.Keys, 360, Resolution.Daily)Â
I don't believe the research can handle that much data currently.Â
Jared Broad
We're rebuilding research from scratch. It should be available by the end of next week.
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.
Omegab
Hi Jared, is it possible to have Extended Market Stock data in the Research Environment as I tried to pass it to bo AddEquity and History functions to no avail?
Xin Wei
Hi Omegab,
Extended market hours data is available in the research environment. I've attached a Research Notebook to show how to implement it. Please check it out.
Jack Simonson
Hi Mike,
This is a result of how we aggregate and timestamp daily data. It is timestamped at UTC 00:00 the day after it has happened -- i.e., all data from 2019-11-15 is aggregated and we create a Daily OHLCV with the timestamp 2019-11-16 00:00.
QuantConnect Robot
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!