1
$\begingroup$

I have some questions about how order matching works:

  1. Can an order be matched if the top of the order book on the bid side is lower than the top on the ask side? I would say no since matching would imply a market marker posting a bid and asking to match each, respectively. Then, the bid order would no longer be lower, so it's a different scenario.

  2. When the top of the order book on the bid side is higher than the sell side, does the market maker keep the entire difference? Is there a specific standard for dealing with this case?

  3. Does the bid-ask spread go to 0 every time a trade happens (orders are matched) and then (almost instantly) widen until the next order is matched, when it goes to 0 again, and so on?

  4. Finally, which book would you recommend to learn about these?

$\endgroup$

1 Answer 1

2
$\begingroup$

1- Can an order be matched if the top of the order book on the bid side is lower than the top on the ask side? I would say no since matching would imply a market marker posting a bid and asking to match each, respectively. Then, the bid order would no longer be lower, so it's a different scenario.

They don't "ask" to match. That would be what's called a RFQ market.

The matching engine simply determines whether they match based on a set of rules. Usually the rule is very simple: match if price is equal. Sometimes, like in the US, some regulatory limitations apply such as Rule 611 which could prevent the match.

2- When the top of the order book on the bid side is higher than the sell side, does the market maker keep the entire difference? Is there a specific standard for dealing with this case?

Easy way to understand this is to imagine the extreme case. You place a buy limit order with infinite price, like \$9,999.99, for a cheap stock, let's say BAC (\$40.14 last sale at time of this writing).

You can test this with 1 share on your brokerage app. It will get filled, but obviously at a price very close to \$40.14. Rather than saying you pocketed the difference between \$9,999.99 - \$40.14—since you obviously didn't get out of this trade \$9,959.85 richer, or it would be an infinite money glitch—you simply got matched with the lowest offer.

It happens that the \$9,999.99 limit order is functionally nearly the same as a market order.

A side remark: Back to regulatory limitations like Rule 611, there is much academic debate whether we should outright reject or reprice the order vs. allowing it to be published on the book with zero or even inverted spread. This scenario is called a locked market or crossed market. In practice, this rarely exists—even if the rules of a market allow it, a crossed market would allow a free arbitrage.

3- Does the bid-ask spread go to 0 every time a trade happens (orders are matched) and then (almost instantly) widen until the next order is matched, when it goes to 0 again, and so on?

From the perspective of what the entire market sees published on the data feed, usually no. Most markets do not publish the crossing order (i.e. trade initiator) as a limit add event followed by a trade event. They simply publish the trade.

But some markets, e.g. I've seen this in crypto, will publish the limit and the trade event separately. In fact some distinguish between whether the initiator was a market order or a limit order or even the price of that limit. In theory this means the market was momentarily at zero or inverted spread, but this takes place atomically with the trade that comes after, so it is functionally not a zero spread since you won't be able to jump your own order in there.

4- Finally, which book would you recommend to learn about these?

See: Book on market microstructure

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.