5D Library › Liquidation Cascades, Order-Book Depth Depletion and Cointegrated Statistical Arbitrage · 中文
Chapter 1 Order-Book Depth and Price Impact
What an order book is
In most electronic markets prices are formed by matching orders in a limit order book. Those who want to buy at a given price or better post bids; those who want to sell post asks. The gap between the highest bid and the lowest ask is the spread, and the quantity resting at each price level is that level’s depth. A market order names no price: it starts at the best price and eats through the resting orders on the other side, level by level, until it is filled. How far a market sell order pushes the price down therefore depends on its size and on how depth is distributed on the bid side.
There are two views of this. In the informational view, market makers cannot tell whether a counterparty knows something, so they adjust quotes in the direction of order flow. In the mechanical view, the book is a staircase, and the further a large order walks down it, the more the price moves. This chapter takes the classic model of the first view, then the second.
Kyle’s λ
Kyle’s 1985 model (Kyle 1985) has three kinds of participant: an insider who knows the asset’s true value , noise traders who submit random quantities, and competitive market makers. In the single-auction version and noise-trader volume is . The insider submits ; market makers see only total order flow and price by a linear rule .
The derivation has two steps. The insider, knowing , maximises expected profit , giving with . Market makers are competitive, so the price equals the conditional expectation , hence . Solving the two together:
λ is the price-impact coefficient: how far the price moves per unit of order flow. Its reciprocal is often called the market’s “depth”. The more noise trading there is (larger ), the harder it is for market makers to read information from order flow, the smaller λ and the “deeper” the market; and after one auction the price has absorbed exactly half of the insider’s information.
Check these three results with 200,000 simulated auctions, then simulate an analyst who has only 250 auctions (about one year of daily data) and estimates λ by regressing price changes on signed order flow.
Calculation
# Kyle (1985), one auction: lam = sqrt(S0)/(2 su), beta = su/sqrt(S0), Var(v|p) = S0/2.
import math, random
from statistics import fmean
def equilibrium(S0, su):
return su / math.sqrt(S0), math.sqrt(S0) / (2 * su)
def simulate(S0, su, n, rng, p0=100.0):
beta, lam = equilibrium(S0, su)
ys, dv, profit = [], [], []
for _ in range(n):
v = rng.gauss(p0, math.sqrt(S0))
x = beta * (v - p0)
y = x + rng.gauss(0, su)
p = p0 + lam * y
ys.append(y); dv.append(v - p0); profit.append(x * (v - p))
return ys, dv, profit
def ols_slope(xs, ys):
mx, my = fmean(xs), fmean(ys)
sxx = sum((a - mx) ** 2 for a in xs)
b = sum((a - mx) * (c - my) for a, c in zip(xs, ys)) / sxx
res = [c - my - b * (a - mx) for a, c in zip(xs, ys)]
se = math.sqrt(sum(r * r for r in res) / (len(xs) - 2) / sxx)
return b, se
rng = random.Random(1985)
S0 = 4.0 # prior variance of value (sd 2)
print("noise sd | theory lam simulated | Var(v|p)/S0 | insider profit theory / sim")
for su in (0.5, 1.0, 2.0):
beta, lam = equilibrium(S0, su)
ys, dv, prof = simulate(S0, su, 200000, rng)
b, _ = ols_slope(ys, dv) # E[v - p0 | y] is linear with slope lam
post = fmean((d - lam * y) ** 2 for d, y in zip(dv, ys)) / S0
print(f" {su:4.1f} | {lam:.4f} {b:.4f} | {post:.3f} |"
f" {math.sqrt(S0) * su / 2:.3f} / {fmean(prof):.3f}")
# 250 auctions (about a year of daily data): regress price change on order flow
lam = equilibrium(S0, 2.0)[1]
for noise in (1.0, 3.0): # unrelated price noise (news, other flows)
est = []
for rep in range(400):
ys, dv, _ = simulate(S0, 2.0, 250, rng)
dp = [lam * y + rng.gauss(0, noise) for y in ys]
est.append(ols_slope(ys, dp)[0])
est.sort()
print(f"250 auctions, extra noise sd {noise:.0f}: lam (true {lam:.2f})"
f" median {est[200]:.3f}, 90 % in {est[20]:.3f} to {est[379]:.3f}")
# noise sd | theory lam simulated | Var(v|p)/S0 | insider profit theory / sim
# 0.5 | 2.0000 2.0040 | 0.502 | 0.500 / 0.503
# 1.0 | 1.0000 0.9987 | 0.502 | 1.000 / 1.002
# 2.0 | 0.5000 0.4996 | 0.499 | 2.000 / 1.993
# 250 auctions, extra noise sd 1: lam (true 0.50) median 0.500, 90 % in 0.464 to 0.538
# 250 auctions, extra noise sd 3: lam (true 0.50) median 0.498, 90 % in 0.395 to 0.611The simulation agrees with the formulas: as the noise-trading standard deviation rises from 0.5 to 2, λ falls from 2.0 to 0.5 and the insider’s expected profit rises from 0.5 to 2.0 (that profit is exactly the noise traders’ loss), while the price always absorbs half the information. When estimating λ, if the price responds only to order flow plus a little unrelated noise, the 90 % range from 250 observations is about 0.46 to 0.54; with unrelated noise of standard deviation 3 it widens to about 0.40 to 0.61. Kyle’s λ is an equilibrium concept; real “λ estimates” also absorb news, co-movement with other assets and changes in the book itself.
Evidence
Order-flow imbalance and depth. Using trades and quotes for 50 US stocks on the New York Stock Exchange, Cont, Kukanov and Stoikov found that over short intervals the “order-flow imbalance” at the best bid and ask explains most price changes; the relation is linear, with a slope inversely proportional to market depth (Cont et al. 2014). This agrees with the qualitative result of Kyle’s model, “more depth, smaller λ”, but the mechanism is different: here it is a mechanical property of the book and needs no assumption of inside information.
The square-root impact law
A linear λ fits only small orders. For large institutional trades, the regularity that keeps reappearing in the data is concave.
Evidence
The square-root impact law. A “metaorder” of total size , split into many small orders and executed over a period, has an average price impact of roughly , where is daily volatility, daily volume and the constant is of order one (Tóth et al. 2011). In the studies collected by Tóth and colleagues the exponent lies between about 0.4 and 0.7; their own data, nearly 500,000 futures trades from 2007 to 2010, gave about 0.5 for small-tick contracts and about 0.6 for large-tick contracts. Using equity trades from a large bank, Almgren and colleagues fixed the exponent of temporary impact at 3/5 (Almgren et al. 2005). In 2025 Sato and Kanazawa used account-level order records for the whole Tokyo Stock Exchange from 2012 to 2019, split into two periods and restricted to sufficiently liquid stocks (2,299 stock–period data points in all), and estimated the exponent stock by stock: the cross-sectional mean was 0.489 (cross-sectional standard deviation 0.071), and they concluded that each stock’s exponent equals 1/2 within statistical error (Sato and Kanazawa 2025). For reviews see Bouchaud, Farmer and Lillo (Bouchaud et al. 2009) and the monograph by Bouchaud and colleagues (Bouchaud et al. 2018).
The square-root law is often misread in two ways. First, it is the average impact of a metaorder, not the impact of one market order walking through the book. Second, it does not follow directly from the shape of the visible book. Tóth and colleagues explain it by the latent supply and demand near the price (orders not yet posted but ready to appear when the price arrives), whose profile is “V-shaped”, vanishing at the current price and growing linearly with distance (Tóth et al. 2011); the authors themselves call this argument “quite naïve”. The visible book often looks different: average depth peaks not at the best price but some levels away from it (Bouchaud et al. 2002), and total visible depth is finite.
Decaying depth and gaps
Reduce the book to three shapes and see how deep a market sell order goes. Flat: 10 lots per level. V-shaped: lots at level . Decaying: lots at level , a total visible depth of only about 150 lots; beyond the visible part, the next resting bids are 60 levels down.
Calculation
# A market sell of Q lots walks down a static bid side; depth q(k) at k ticks below best.
# Beyond the visible book the next resting bids sit 60 ticks down. Illustrative shapes.
import math
GAP = 60
def walk(Q, depth, levels=40):
"""Fill Q against levels 1..levels; return (ticks moved, average fill in ticks)."""
left, cost, k = Q, 0.0, 0
while left > 1e-12 and k < levels:
k += 1
take = min(left, depth(k))
left -= take; cost += take * k
if left > 1e-12: # visible book exhausted: price gaps down
cost += left * GAP; k = GAP
return k, cost / Q
books = {"flat": lambda k: 10.0, "V-shaped": lambda k: 2.0 * k,
"decaying": lambda k: 20.0 * math.exp(-k / 8)}
print("visible depth in 40 levels:",
", ".join(f"{n} {sum(f(k) for k in range(1, 41)):.0f}" for n, f in books.items()))
print("order Q |" + "|".join(f" {n:>8s} move/avg " for n in books))
Qs = (5, 20, 80, 140, 160, 200, 400)
for Q in Qs:
cells = []
for f in books.values():
m, a = walk(Q, f)
cells.append(f" {m:5d} / {a:5.1f} ")
print(f" {Q:5d} |" + "|".join(cells))
def slope(f, q1, q2): # log-log slope of the final price move
return math.log(walk(q2, f)[0] / walk(q1, f)[0]) / math.log(q2 / q1)
print("log-log slope of move vs Q, Q = 20 -> 160: " +
", ".join(f"{n} {slope(f, 20, 160):.2f}" for n, f in books.items()))
# "Kyle lambda" read off small orders: ticks per lot for the first few lots
for n, f in books.items():
print(f"{n:>9s}: depth at best level {f(1):5.1f} lots -> small-order lambda"
f" ~ {1 / f(1):.3f} ticks per lot")
# visible depth in 40 levels: flat 400, V-shaped 1640, decaying 149
# order Q | flat move/avg | V-shaped move/avg | decaying move/avg
# 5 | 1 / 1.0 | 2 / 1.6 | 1 / 1.0
# 20 | 2 / 1.5 | 4 / 3.0 | 2 / 1.1
# 80 | 8 / 4.5 | 9 / 6.0 | 7 / 3.2
# 140 | 14 / 7.5 | 12 / 7.9 | 22 / 6.9
# 160 | 16 / 8.5 | 13 / 8.4 | 60 / 11.7
# 200 | 20 / 10.5 | 14 / 9.4 | 60 / 21.4
# 400 | 40 / 20.5 | 20 / 13.3 | 60 / 40.7
# log-log slope of move vs Q, Q = 20 -> 160: flat 1.00, V-shaped 0.57, decaying 1.64
# flat: depth at best level 10.0 lots -> small-order lambda ~ 0.100 ticks per lot
# V-shaped: depth at best level 2.0 lots -> small-order lambda ~ 0.500 ticks per lot
# decaying: depth at best level 17.6 lots -> small-order lambda ~ 0.057 ticks per lotThe three shapes give three laws. The flat book gives linear impact (log-log slope 1.00), a constant λ. The V-shaped book gives concave impact (slope about 0.57, a little above the continuous value of 0.5 because of discrete levels). The decaying book deserves the closest look: small orders have the smallest impact (its “small-order λ” is only 0.057 ticks per lot, “deeper” than the flat book), but once an order exceeds the total visible depth of about 150 lots, the price jumps straight down 60 levels; at 140 lots the price has moved 22 levels, at 160 lots it moves 60. Looking only at depth near the best price badly underestimates the impact of large orders and of streams of liquidation orders. This is the starting point of the cascade models in Chapters 2 and 3.
Evidence
The Flash Crash. Kirilenko, Kyle, Samadi and Tuzun used audit-trail transaction data to study the E-mini S&P 500 futures market on 6 May 2010 and the three preceding days: on that day a large automated selling programme was executed rapidly in that market and the price fell sharply within minutes before recovering; they found that the most active intraday intermediaries (high-frequency traders) did not change their trading pattern as prices fell (Kirilenko et al. 2017). It is a real example of selling pressure exceeding available depth, but it concerns stock-index futures, not the highly leveraged perpetual contracts of Chapter 2, and the two mechanisms should not be equated.
Note
Limits of the model. The order book in this chapter is static. Real books partly recover within seconds to minutes, and resting orders may be cancelled or added as the price falls, so real “gaps” may be smaller or larger.
Chapter summary
Kyle’s model gives the price-impact coefficient : more noise trading makes a deeper market. Empirically, the impact of small order flow is roughly linear and inversely proportional to depth; the impact of large metaorders roughly follows a square-root law, with exponents between about 0.4 and 0.7, and recent complete account-level data support 1/2. The square-root law describes latent liquidity, while visible depth is finite; when a large order or a stream of liquidation orders uses it up, the price gaps. The next chapter asks where such streams of selling come from: leverage and forced liquidation in perpetual contracts.
References
Fan, Y. (2026). Liquidation Cascades, Order-Book Depth Depletion and Cointegrated Statistical Arbitrage: Ornstein-Uhlenbeck Processes and Kalman-Filter Dynamic Hedging [高杠杆衍生品清算瀑布、订单簿深度衰竭与协整统计套利] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.23796776 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).