Skip to content
All library documents

Measuring Execution Costs in Closing Auctions

Article Quant Q&A · Author: MikeRand

Summary

The discussion explains why a market-on-close order cannot be evaluated using the continuous market’s usual displayed bid and ask. During the pre-close auction, buy and sell orders accumulate in separate books, and their imbalance helps determine the clearing price. Afterward, the nearest unfilled buy and sell prices, together with residual demand or supply, can serve as auction-specific reference points. Some venues allow limit prices on auction orders; broker-run target-close algorithms may instead split an order across prices and times.

The answers caution that auction fills can differ from the official closing price and that order imbalances affect execution. They suggest including transaction costs in overnight-strategy backtests, while noting that rigorous assessment requires exchange-level trade and quote data, which may be costly. Benchmarking is difficult because waiting or splitting an order changes both opportunity costs and interactions with liquidity. The document raises these issues but does not provide a complete empirical estimate of auction slippage or validate the strategy’s reported Sharpe ratios.

Key ideas

  • A closing auction matches accumulated buy and sell orders, so the continuous market’s displayed spread does not directly describe its pricing.
  • The nearest unfilled buy and sell prices after the auction can help benchmark the clearing price, with residual quantities also relevant.
  • Closing-auction execution may differ from the official close because order imbalance and available liquidity affect fills.
  • Backtests using market-on-close or market-on-open orders should account for transaction costs and auction impact.
  • Execution benchmarks are imperfect because waiting or splitting orders changes opportunity costs and market interactions.

Tags

Full text
# Do MarketOnClose orders cross a bid-ask spread?


# Do MarketOnClose orders cross a bid-ask spread?












If I'm entering into a Market order to buy (e.g., for a share of SPY), it's easy to see the spread that I am crossing: I can compare the "mid" average of the NBBO to the ask, and that's the spread I paid. So generally during trading hours, this would be \$0.005 for SPY (implying a $0.01 round-trip spread for SPY).

When I enter into MarketOnClose orders, however, it's not as obvious what spread (if any) I paid. All I think I see is the auction-clearing price at which all shares transact, and it's not clear what "ask" I should be comparing against.

Does this mean that, unlike pre-close Market orders, MarketOnClose orders don't cross a spread? Or is there a way to read or infer a bid/ask to calculate a spread?

Context

In several backtests, Overnight Anomly seems to provide superior Sharpe ratios to buy-and-hold strategies. Digging deeper into these backtests, however, it appears that they rely on MarketOnOpen and MarketOnClose orders, which don't obviously charge the strategy the cost of crossing the bid/ask on a daily basis.

But if everyone were entering into overnight trades, the closing auction would be so imbalanced with Market buys that the price would have to rise to clear the auction. And unlike trades during the day (where we can see the NBBO), it's not clear to me that it's easy to measure this impact.

## Answer by lehalle (score 4, accepted)

https://quant.stackexchange.com/a/72124

A market on close order is usually an order that is reversed for the closing auction.

When such orders not designed by exchanges, brokers are emulating them. For instance, if an exchange does not provides this feature inside its matching engine, your broker can build a mechanism that will retain your order up to send it to the exchange just at the start of the closing fixing. In such a case: if your broker has an IT/network issue, your order will never reach the close. Keep in mind that some exchanges do not have auction calls for the fixing (India for instance).

Market on close are usually market orders: whatever the price at the close they will accept it because implicitly they assume you want liquidity, not a good price. Nevertheless some exchanges accept limit prices for market on close, to prevent you to have an awful price if the price really goes away during the closing auction. There is a lot of information about this in Market Microstructure in Practice (2nd Edition) L and Laruelle, section 2.1.1.

From the boo, here is the typical flow of orders arriving for the close during the pre-fixing (horizontal axe is in minutes, vertical axe in quantity):

It is not the same as target close algos, that are all designed by brokers, and have the discretion to create child orders, sending some of them before the close and others at the close. Thus your price will be the average of all this child prices.

Similarly, you can try to obtain a price improvement by not trading everything at the close, but wait more (this is an implicit suggestion in your question). And you are right to try to understand what would have been your price at the close: it is good to have a benchmark, to compare your execution to.

In your question you mention that

> If I'm entering into a Market order to buy (e.g., for a share of SPY), it's easy to see the spread that I am crossing: I can compare the "mid" average of the NBBO to the ask, and that's the spread I paid.

I am not sure that it is that easy even in continuous trading:

- what if you would have wait to send your order (opportunity cost)?

- what if you would have split your order in two smallest ones, waiting for new liquidity to come in the orderbook (liquidity cost)?

These questions is indeed the same for orders sent during the continuous and fixing sessions.

These questions imply that it is difficult to have a benchmark because once you interacted with other market participants (via the orderbook), you changed their reaction and "what if I would have done something else?" scenarios are very difficult to assess.

Nevertheless there is no "bid-ask spread" during the prefixing, but they are two overlapping orderbooks: the one of the buy orders and the one of the sell orders. This is the imbalance between there two orderbooks that will form the price (in a Walrassian equilibrium manner). Hence after the close, you have the "next closest buying price" and the "next closest selling price" that you can use like bid and ask prices. Be careful that in most cases, not 100% of the offer or demand has been cleared at the close price, hence there is a signed remaining quantity, that you should take into account.

## Answer by pyCthon (score 6)

https://quant.stackexchange.com/a/72087

A simpler way to debunk these studies without having actual trade and quote data at the exchange level is to just take into account transaction costs, IBKR's half a penny per share is a good starting point as mentioned above.

However for most exchanges, market on open/close orders execute as close to the open/close price as possible, not at the exact open/close price! You are correct to assume order imbalances and liquidity will have an impact.

These two factors are often omitted in academic studies as exchange level trade & quote data is quite large and expensive to do this study correctly.

As suggested by @nbbo2 I've added the SPY vs the NSPY (overnight only) total returns as a comparison.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.