Quant Memo
Core

How The Uncrossing Price Is Computed

The exchange has a book full of buy and sell limit orders at different prices and needs one number. The algorithm picks the price that trades the most shares, then breaks any tie by minimizing leftover imbalance and finally by distance from a reference price.

Prerequisites: Why Markets Use Call Auctions, Order Book Mechanics

During the five-minute pre-open collection window, one stock accumulates this book of limit orders (no trades happen yet — orders just sit there, added, amended, or cancelled freely until the auction fires):

Buy priceBuy sharesSell priceSell shares
50.3040050.05500
50.2560050.10600
50.2080050.15900
50.1550050.20400
50.1070050.25700
50.0530050.30300

At the uncrossing instant, the exchange doesn't match these order-by-order in arrival sequence. It runs a specific algorithm, in order of priority:

  1. Maximize executed volume. Find the single price at which the most total shares can trade.
  2. Minimize surplus imbalance. If more than one price ties for maximum volume, pick whichever leaves the smallest unmatched quantity on one side.
  3. Tie-break by reference price. If prices still tie, pick whichever is closest to a designated reference price (typically the last traded price, or the prior close).

Working the book by hand

A buy limit at 50.30 will also transact at any lower price, so the shares "willing to buy at or above" a given price accumulate as price falls. A sell limit at 50.05 will also transact at any higher price, so shares "willing to sell at or below" a given price accumulate as price rises. Building both cumulative columns across the six price levels:

PriceCumulative buy (≥ price)Cumulative sell (≤ price)Matched volumeImbalance
50.053,3005005002,800 buy surplus
50.103,0001,1001,1001,900 buy surplus
50.152,3002,0002,000300 buy surplus
50.201,8002,4001,800600 sell surplus
50.251,0003,1001,0002,100 sell surplus
50.304003,4004003,000 sell surplus

Matched volume at each price is min(cumulative buy,cumulative sell)\min(\text{cumulative buy}, \text{cumulative sell}) — you can never trade more than the smaller side offers. Reading down the matched-volume column: 500, 1,100, 2,000, 1,800, 1,000, 400. It rises then falls, peaking at 50.15 with 2,000 shares matched — that is the uncrossing price. No other price gets close: 50.20 only manages 1,800 because cumulative sell interest has already outpaced cumulative buy interest by then.

At the winning price of 50.15, cumulative buy demand is 2,300 and cumulative sell supply is 2,000, so 300 shares of buy interest go unfilled (typically the resting orders with the worst priority — later timestamps or, for pro-rata venues, allocated proportionally). Every filled share, on both sides, prints at exactly 50.15, regardless of whether a given buyer had bid 50.30 or 50.15 — the buyer who bid 50.30 does not pay 50.30, they pay the clearing price, same as everyone else who trades.

price cumulative shares cumulative buy cumulative sell 50.15 50.05 50.30 max matched: 2,000
Cumulative buy volume steps down as price rises; cumulative sell volume steps up. They cross closest at 50.15, which is exactly where matched volume — the smaller of the two curves — peaks at 2,000 shares.

When the first rule alone isn't enough

Suppose two neighboring prices had tied at 2,000 matched shares each — say 50.15 and 50.20 both cleared exactly 2,000. Rule 2 looks at leftover imbalance: whichever price leaves fewer unmatched shares on the heavier side wins. If that's also tied, rule 3 takes over — pick whichever tied price is closer to the reference price (commonly the previous close). A prior close of 50.12 would favor 50.15 over 50.20 purely on distance, which also damps artificial swings when the auction book itself is thin.

The uncrossing price is not a negotiation and not "whoever bid highest" — it is whichever single price maximizes the number of shares that can trade, full stop. Ties are broken by leftover imbalance, then by distance from a reference price. Every filled order gets that one price, not the price it was originally entered at.

Where this is used in practice

  • Opening and closing crosses. NYSE and Nasdaq run exactly this algorithm at 9:30am and 4:00pm; imbalance figures like the "300 buy surplus" above are published before the auction fires so participants can react.
  • Index rebalance and ETF creation/redemption. Funds tracking an index must trade at the closing price, which is why rebalance-day auction volume can run tens of times normal, and why the tie-break rules matter — they set the exact price an entire fund complex settles against.
  • Circuit breaker reopenings. After a halt, exchanges typically reopen via a call auction using this same maximize-volume logic rather than resuming continuous trading cold.

Order type matters as much as price in real auctions: many venues let participants enter "market on open/close" orders with no limit price at all, and those are treated as willing to transact at any clearing price, which pulls the imbalance calculation in one direction without appearing anywhere on the visible limit-price ladder. A trader reading only the displayed limit book, like the table above, can badly misjudge where the price will land if a large unpriced market-on-close imbalance shows up in the last few minutes before the cross.

In interviews

Be ready to build the cumulative buy and cumulative sell columns from a raw order list under time pressure — that's the actual skill being tested. State the three rules in order (maximize volume, minimize imbalance, tie-break by reference price) and be explicit that matched volume is the minimum of the two cumulative curves, so the answer is wherever that minimum peaks. If asked why exchanges don't just pick the price where demand equals supply exactly, the honest answer is that with discrete order sizes an exact crossing rarely exists — which is why Why Markets Use Call Auctions frames the goal as "maximize trades," not "find equilibrium."

Related concepts

Practice in interviews

Further reading

  • Madhavan (1992), Trading Mechanisms in Securities Markets
  • Nasdaq Opening and Closing Cross Fact Sheet
ShareTwitterLinkedIn