I'm not able to properly request to Emini S&P Select Sector futures data (see example below). Based on the sample code provided in the library, I try to subscribe in the initializiation as follows:
def Initialize(self):
self.SetStartDate(2019, 1, 1) # Set Start Date
self.SetCash(100000) # Set Strategy Cash
self.AddSecurity(SecurityType.Future, "XAP", Resolution.Minute).SetFilter(timedelta(0), timedelta(days=360))
but when I try to pick the front month contract, it seems there's no data is pumped into OneData:
def OnData(self, data):
for chain in data.FutureChains:
if chain.Key.Value == "XAP":
if self.front_xap.Expiry - self.Time).days <= 1):
xap_contracts = list(filter(lambda x: x.Expiry >= self.Time + timedelta(days=10), chain.Value))
I don't see any helper static classes in the futures reference table in the documentation either (to use with the AddFuture method).
What would be the proper way to subscribe to these futures? Or it's not possible to subscribe to this data at this point?
Rahul Chowdhury
Hey Ashkan,
Although we have the data for XAP futures, we have not yet properly modeled that future yet with its expiration, margins and the other features necessary to model each symbol. All the Futures symbols which are properly modeled and available can be found in the Futures file in the github.
AshkanV
Thanks Rahul,
Do you know if there's any plan to add these in near future? And in general the broader plan for addition of futures that QC has the data for but has not yet properly modeled.
Thanks.
Jared Broad
We took a wide filter of future contracts that had at least 1000 trades a day and it reduced our universe of contracts from hundreds to 145. We've fully implemented these 145 and will focus on getting them all the way through to production. You can see the full list in the futures documentation.
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.
AshkanV
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!