Hi community,
Thrilled to announce that the QuantConnect team is adding extended market hours support for futures in Lean.
From now on, the `AddFuture` API receives a `extendedMarketHours` which defaults to false, to indicate whether to include data from extended market. This means that when a future is added with `extendedMarketHours` set to true, data from every open hour will be included. Likewise, without `extendedMarketHours`, only data from regular hours will be included. Typically, futures market is open from Sunday evening to Friday evening, with a maintance hour every day, and regular hours spanning from 9:30am to 5:00pm, although this depends on the exchange and the future itself.
What behavior changes to expect
- Your algorithms might experiement a decrease in data points given that by default only regular hours will be used.
- If you set `extendedMarketHours` to true to be able to use the full market hours, and your algorithm is placing market orders during hours that are now considered extended market, your orders will be invalidated since market orders are not allowed outside or regular hours and MOO orders are not allowed at all for futures. Consider using limit orders (as ilustrated in several regression algorithms) when placing orders on extended market hours.
Placing orders
As mentioned above, you should consider using limit orders outside of regular hours for futures. As of now, for other securities types, Lean detects when a market orders is placed outside of regular hours and placed a MOO instead. Since futures don't have support for MOO orders, Lean will invalidate these orders for futures. There is a follow up issue to discuss the possibility of implementing this behavior for futures as well and convert market orders to limit orders during extended market hours.
Some example algorithms
Please let us know if you have any issues or concerns about this new feature so we can look into it asap.
Best,
Jhonathan
Billy Dixon
This is not a good development. I used to be able to execute Market Orders for futures during extended market hours, but now, apparently, I can't. By the way, you rolled this out without sufficient notice, so my live trading algo busted and I lost money because of it. There is no reason why futures can't execute Market Orders during extended trading hours. The brokerages allow Market Orders during extended trading hours and not just limit orders. This is a bad development and needs to be changed to allow Market Orders during extended market hours.
Jared Broad
Thank you for the feedback; we'll review and post back shortly.
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.
Jhonathan Abreu
Hi Billy Dixon
Thank you for your feedback on this matter. After further research and discussion, we have restored support for market orders during extended market hours for futures. The fix can be found in version 14490. Please refer to these GitHub PR for further information.
We apologize for any inconvenience this may haved caused and thank you again for your feedback.
Best,
Jhonathan
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.
Mark Kust
Hello,
I'm developing my first futures trading algo, and have run into a problem that I think is related to this. My algo uses hourly futures data (VIX futures in particular), but the last regular session hour seems to get dropped, or has OHLC set to the closing price of the previous bar. For VIX futures (and other futures products too) the regular session runs from 8:30AM - 3:15PM US Central time, or 9:30AM - 4:15PM in the more familiar New York trading hours. Thus, I expected that the last regular session Trade/Quote bar would aggregate that 15min “stub” period from 3:00-3:15 (central time), but have a bar closing timestamp of 17:00:00. This doesn't seem to be the case, and rather, seems like the last hourly bar in a day is the 2:00-3:00PM (central) bar.
Can you verify that this is or is not the case? I'm looking at the “Volmageddon” even of 2/5/2018, and the 5:00PM bar on that day is a specific example of this phenomenon.
Thanks!
Jhonathan Abreu
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!