Hello QuantConnect Community,
The QuantConnect Team has been making some improvements in the Equity Fill Model. The logic behind the fill of Market-On-Open orders has changed and might affect algorithms that place orders of this type.
In the previous version, the model used information from the first data available for the day, whether it was a TradeBar or QuoteBar (Ask or Bid, depending on order direction), to determine the market open price. This behavior was not correct, given that the official open price is a trade. Consequently, it should use TradeBar data only.
If the algorithm uses Hour or Daily resolution data, we should observe no differences since there is no QuoteBar data for these resolutions.
For tick data, the model used the last tick data of the first group of Tick objects (Tick objects are grouped by timestamp) after the market opening, whether it was a Tick of type Trade or Quote. The Tick data provided by AlgoSeek has trade condition flags that inform us that a given trade refers to the official open or opening prints. We use this information to determine the market open price.QuantConnect uses the trade condition flags to determine the open and close prices to create second to daily-resolution data. Hence, the market on open fill price is the same across resolutions. The exception being second-resolution if the tick with the official open is observed after the first second.
For more information about the changes, please check out the following pull request:
Best regards,
Alex
Critical.Error
I also noticed that the algorithm framework will default a futures trade to a market on open order even if the futures day has not ended yet. It seems to only happen during 16:00-17:00. Look at the trade on 09/21/2021 at 16:15 even though NQ trades until 17:00 before taking a 1 hour break. This broke my One-Cancels-Other code I wrote but that is a fix for another post most likely.
Louis Szeto
Hi Critical.Error
Thank you for reporting and we can reproduce the stated problem. Please subscribe to this data issue thread for follow-up.
Best
Louis
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.
Alexandre Catarino
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!