Hey everyone, I run a live algo with equities and futures. Equities are regular hours only, futures clearly all the time. My log stopped printing futures data at 24:00 last night. I know today is a holiday but the futures market is open. So why isn't my algo getting or trading on futures today? Lots of movement in the futures today so pretty bummed out that its not trading. I'm glad it closed my positions on a signal last night before midnight, would have hated to be stuck in a position if it was on the wrong side of a move on a day like today. Unfortunately I would have been short and made a killing today. So with that being said, I need to get this fixed for future trading holidays. Also, I've never ran into this issue on Friday/Mondays that are closed.
This is how I acquire my rolling futures contracts.
# *** FUTURES INITIALIZE ***
futureNQ = Futures.Indices.NASDAQ100EMini # <<< NQ Contract here
self._continuousContractNQ = self.AddFuture(
futureNQ,
dataNormalizationMode=DataNormalizationMode.BackwardsRatio,
dataMappingMode=DataMappingMode.OpenInterest,
contractDepthOffset=0,
extendedMarketHours=True
)
self.symbolNQ = self._continuousContractNQ.Symbol
self._continuousContractNQ.SetFilter(timedelta(days=1), timedelta(days=60))
Mia Alissi
Here is a debugging/logging snippet that will help you diagnose why your algo is not receiving data for the NQ futures during a holiday, even with extendedMarketHours enabled:
How to use this:
Let me know if you need help interpreting the outputs!
Sources: Data Preparation - QuantConnect.com, Extended Market Trading Regression Algorithm, Future Contracts Extended Market Hours Regression Algorithm, Basic Template Continuous Future With Extended Market Algorithm, Pre Holiday Effect
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.
David E
I know what the issue is, NQ futs are every 90 days and my filter is for 1-60 days. I'm sure thats the problem.
David E
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!