# Computing market impact from the order book?

Market impact as I understand it measure the difference in price between the first share that is bought and the last share that is bought when an buy order of N shares is submitted to the exchange. (Maybe there are other definitions but let's just take that one).

If we take that definition, it seems to me that market impact is a very predictable quantity for market orders. All we have to do is look at the limit orders in the order book and figure out what is the last sell limit order that is going to get matched with our market buy order.

The only uncertainty in this calculation comes from the fact that the order book could have changed during the time it takes for our market order to make it to the top of the queue.

Am I missing something? Are there other phenomena that could be happening that I'm not taking into account? It's likely the case because otherwise I don't see why market impact is notoriously hard to estimate.

I'm asking this question for market orders. I understand that for limit orders, things can be more complicated because the limit order can sit for a long time in the order book before being matched.

• Estimate in what direction? Worst case? Best case? I'm asking because many exchanges allow for hidden quantities, i.e. you can make the market look more sparse than it actually is. Commented Jun 21, 2022 at 6:39
• I guess if there are hidden orders then we would be able to compute an upper bound on the market impact. Let's just assume that everything is visible. Commented Jun 21, 2022 at 15:41
• No that's correct - it's just that by the time you place your order the order book will have changed, and sometimes significantly. Moreover, after you fill the order book will change as well Commented Jun 22, 2022 at 23:24
• Yes, the reactions of other traders when they see your order execute and adjust their orders accordingly are definitely a part of the "market impact". You underestimate the market impact if you assume that no one reacts. The panic reaction when there is a "fat finger error" and liquidity disappears is an extreme case of this. Commented Jul 23, 2022 at 7:23