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