Back

ES, Minute The issue starts from Jan 1st, 2008; and continues until May 1st, 2009

Ticker ES
From 2008-01-01 00:00:00
To 2009-05-01 00:00:00
Security Type Future
Market USA
Resolution Minute
Status Closed

Corrupted Files Missing Files Listing/Delisting Error Dividend Error Missing Points Wrong Values Split Error Name Mapping Error TickerESFrom2008-01-01 00:00:00To2009-05-01 00:00:00Security TypeFutureMarketUSAResolutionMinuteStatusWaiting Review

Corrupted Files Missing Files Listing/Delisting Error Dividend Error Missing Points Wrong Values Split Error Name Mapping Error TickerESFrom2008-01-01 00:00:00To2009-05-01 00:00:00Security TypeFutureMarketUSAResolutionMinuteStatusWaiting Review

The documentation on the data library page [link] says that futures data is supposed to begin Jan 1, 2008 but for the ES EMINI no data futures show up until ~May 2009.

class Algorithm(QCAlgorithm):
def Initialize(self):
"""Initial algorithm settings"""
self.SetStartDate(2008, 1, 30) # Set Start Date
self.SetEndDate(2009, 12, 31) # Set End Date
self.SetCash(100000) # Set Strategy Cash
# -----------------------------------------------------------------------------
# init brokerage model, important for realistic slippage/commission modeling
# especially important if using leverage which requires margin account
# -----------------------------------------------------------------------------
self.SetBrokerageModel(
BrokerageName.InteractiveBrokersBrokerage, AccountType.Margin
)
futureES = self.AddFuture(Futures.Indices.SP500EMini)
#futureES.SetFilter(timedelta(0), timedelta(180))
futureES.SetFilter(lambda x: x.FrontMonth())
self.futureES = futureES
self.front_ES = None
self.Settings.FreePortfolioValuePercentage = 0.1
self.i = 0
def OnData(self, data):
#self.Debug(f'{self.Time} | front month symbol: {self.front_ES}')
for chain in data.FutureChains:
if chain.Key.Value == Futures.Indices.SP500EMini:
if self.front_ES is None or ((self.front_ES.Expiry-self.Time).days <= 1):
contracts = list(filter(lambda x: x.Expiry >= self.Time + timedelta(days = 2), chain.Value))
sorted_contracts = sorted(contracts, key = lambda x: x.Expiry)
if len(sorted_contracts) < 1:
self.front_ES = None
else:
self.front_ES = sorted_contracts[0]
self.i += 1
if self.i % 100 == 0:
self.Debug(f'{self.Time} | front month symbol: {self.front_ES}')
return

 

Update Backtest







0

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.


Brian, thanks for reporting this. It is not a data issue; it is a documentation issue.

The first available date of future data we have is, in fact, May 1st, 2009.

Documentation is being fixed right now.

0

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.


JayJayD has marked this issue as closed.

0

Update Backtest





0

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.


Loading...

This discussion is closed