Hello,
I am trying to consolidate futures minute data to daily bars. Therefore I created a consolidator as follows:
var consolidator = new TradeBarConsolidator(TimeSpan.FromDays(1));
Unfortunately, this gives a bar starting from 11pm America/Chicago time --> + 1 day, which is the standard NY day, but which is not the exchange trading time.
How to consolidate according to exchange trading hours?
e.g. pseudo code for Gold Futures "GC" trading from 5pm to 4pm Chicago time.
var consolidator = new TradeBarConsolidator(GC.MarketOpen, GC.MarketClose);
Thx.
Eugene
I made some progress with the help of this post: Link, see Backtest.
The target is to generate daily bars from minute data according to exchange trading hours, not the standard QC NY 0am to 0am time. In my case for gold futures "GC".
Now, it works.... kind of.
There are still issues with the implementation:
Lets focus on the Dezember 2020 contract Symbol=GC29Z20
Is there a fundamental issue of my implementation?
Thx.
Eugene
Eugene
There was a small bug in the implementation.
Furthermore, the volume in the data from algoseek seems to be slightly wrong for "some" minute bars (hundreds per day), which gives a slightly wrong daily volume.
For those who are interessted, see solution attached.
Eugene
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!