6.3.3Market Microstructure

Understand price impact and market depth

2,115 words10 min readdifficulty · medium

WHAT are we talking about?


WHY does price impact exist? (first principles)

That's it — no magic. Impact is the price you pay for demanding immediacy from a finite pool of liquidity.

Figure — Understand price impact and market depth

HOW to derive price impact from the order book (walking the book)

Suppose you want to buy QQ shares as a market order. The ask side has levels:

(p1,q1),(p2,q2),(p3,q3),p1<p2<p3<(p_1, q_1), (p_2, q_2), (p_3, q_3), \dots \quad p_1 < p_2 < p_3 < \dots

where p1p_1 is the best ask and qiq_i is the quantity at price pip_i.

Step 1 — Fill greedily. You consume q1q_1 at p1p_1, then q2q_2 at p2p_2, ... until total =Q= Q. Why this step? The matching engine always fills you at the best available price first — you can't skip a cheaper seller.

Step 2 — Total cost. If levels 1..k11..k-1 fill fully and you take rr from level kk:

Cost=i=1k1piqi+pkr,r=Qi=1k1qi\text{Cost} = \sum_{i=1}^{k-1} p_i q_i + p_k \, r, \qquad r = Q - \sum_{i=1}^{k-1} q_i

Why this step? Cost is just price × quantity summed across each level you touch.

Step 3 — Average execution price (VWAP of your fills).

pˉ=CostQ\bar{p} = \frac{\text{Cost}}{Q}

Step 4 — Price impact = slippage vs the pre-trade mid. Let mid price before trade be m0m_0:

  Impact=pˉm0  \boxed{\; \text{Impact} = \bar{p} - m_0 \;}

Why this step? The mid m0m_0 is the "fair" reference before you disturbed anything; how far your average fill sits above it is your cost of impact (a.k.a. slippage).


The empirical "square-root law" (derivation sketch)

Traders observe that impact of a metaorder of size QQ grows less than linearly — roughly:

  Δp    YσQV  \boxed{\; \Delta p \;\approx\; Y\,\sigma \sqrt{\frac{Q}{V}} \;}

where σ\sigma = daily volatility, VV = daily volume, YY = constant 0.5\sim 0.511.


Worked Examples


Common Mistakes (Steel-manned)


Flashcards

What is market depth?
The cumulative quantity available to trade at/near the best prices before the price moves a given amount; deep = large volume absorbable with little movement.
What is price impact?
The price change caused by your own trade — average fill price minus the pre-trade mid price (slippage).
Difference between temporary and permanent impact?
Temporary reverts after the order finishes (liquidity consumed then refilled); permanent persists because the trade revealed information updating fair value.
Why does buying push the price up (two mechanisms)?
(1) Mechanical: you consume cheap sellers and climb to pricier ones; (2) Informational: market makers raise quotes on seeing a large buyer.
Formula for average execution price when walking the book?
pˉ=Cost/Q\bar p = \text{Cost}/Q where Cost =piqi=\sum p_i q_i across consumed levels.
State the square-root law of impact.
ΔpYσQ/V\Delta p \approx Y\,\sigma\sqrt{Q/V}, with σ\sigma volatility, VV daily volume, Y0.5Y\sim0.5–1.
Why is impact concave (square-root) not linear?
As price moves, latent/limit liquidity replenishes, so each additional share hurts less — the book is elastic.
Is the bid-ask spread the same as price impact?
No — spread is the fixed cost of a tiny round trip; impact grows with order size beyond the top of book.
Depth up to price P formula?
D(P)=piPqiD(P)=\sum_{p_i\le P} q_i — total quantity sellable at or below P.
Buy 400 with book (100.0,200),(100.1,300); what's avg price?
(200100.0+200100.1)/400=100.05(200{\cdot}100.0 + 200{\cdot}100.1)/400 = 100.05.

Recall Feynman: explain to a 12-year-old

Imagine a candy shop where the cheapest candy is at the front and the more expensive ones are behind it. If you buy just one candy, you pay the cheap front price. But if you want to buy all the candy, you finish the cheap ones and start paying for the pricey ones at the back — so your average price goes up just because you bought a lot. "Price impact" is that extra you pay for wanting a lot at once. "Market depth" is how much cheap candy sits at the front: a shop stacked high (deep) barely changes price; a shop with 2 candies (thin) jumps in price instantly.

Connections

  • Limit Order Book — the structure impact is derived from
  • Bid-Ask Spread — the level-1 cost that impact extends beyond
  • Liquidity — depth is one dimension of liquidity (with tightness & resiliency)
  • Slippage — realized deviation from expected price
  • VWAP and TWAP Execution — algorithms that split orders to reduce impact
  • Market Makers — who provides depth and reprices on information
  • Volatility — the σ\sigma scaling factor in the square-root law
  • Order Types — market vs limit orders and how they demand/supply liquidity

Concept Map

bids and asks with qty

walking the book

deep = small impact

split into

split into

liquidity replenishes

info leaked

raises avg fill

makers pull quotes

demands immediacy

VWAP of fills

slippage vs mid m0

Limit Order Book

Market Depth

Price Impact

Temporary Impact

Permanent Impact

Price Reverts

Fair Value Updated

Mechanical: eat cheap shares

Informational: signal to makers

Big Order Q

Average Fill Price

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, jab tum market mein ek bada order bhejte ho, to price khud tumhare against move kar jaati hai — buy karoge to price upar chadhegi, sell karoge to niche giregi. Iska reason simple hai: order book mein har price level pe limited quantity hoti hai. Agar tumhe best ask pe available shares se zyada chahiye, to tum pehle sabse saste sellers kha jaate ho, phir mehnge wale sellers tak pahunchte ho. Isse tumhari average fill price badh jaati hai. Yehi extra cost hai price impact (ya slippage), jo hum measure karte hain pre-trade mid price ke against — na ki ask ke against.

Market depth ka matlab hai ki best prices ke aas-paas kitni quantity ready padi hai absorb karne ke liye. Agar depth zyada hai (deep book), to tumhara bada order aaram se fill ho jaata hai bina price hilaaye. Agar depth kam hai (thin book), wahi order price ko jhatka de deta hai. Isliye yaad rakho: DEEP absorbs, THIN jolts.

Ek important baat — impact linear nahi hota, balki square-root follow karta hai: ΔpYσQ/V\Delta p \approx Y\sigma\sqrt{Q/V}. Matlab agar tum order double kar do, cost sirf ~1.4 guna badhta hai, 2 guna nahi. Kyun? Kyunki jaise-jaise price move karti hai, naye sellers (latent liquidity) aa jaate hain, to har extra share thoda kam dard deta hai. Isiliye smart traders bade order ko chhote tukdon mein todte hain (VWAP/TWAP algos) taaki impact kam ho.

Yeh cheez trading mein bahut matter karti hai kyunki agar tum apna cost estimate galat karoge, to profit khatam ho sakta hai. Spread ko impact samajhna sabse common galti hai — spread to chhoti round trip ka cost hai, jabki impact size ke saath badhta hai. Toh hamesha size aur depth dono dekh ke trade karo.

Test yourself — Market Microstructure

Connections