What does Liquidation Cascades and Cointegration conclude, in numbers, about “Liquidation Cascades, Branching Processes and Hawkes Self-Exciting Point Processes”?
Answer: The Hawkes process describes how far events trigger events through the branching ratio \(n\): when \(n < 1\) the mean intensity is \(\mu/(1-n)\), and as \(n\) approaches 1 events cluster strongly with occasional huge chains. The branching ratio can be estimated by recursive likelihood but is extremely sensitive to model specification: data without self-excitation, only with baseline switches, can be fitted with a branching ratio of 0.92, which is the heart of the dispute over whether markets are at criticality. The author writes liquidation cascades as an effective branching ratio in price, \(n_{\text{eff}} = \rho/d\), set jointly by the leverage distribution and depth, and local in character. The next chapter turns to the other side of trading: mean reversion.
Scope of the numbers: This book presents mathematical models for teaching and research and is not investment, trading, tax or legal advice; leverage and derivatives can lose all of the money put in and more, and backtests and simulations do not represent future returns. Marked boxes separate published evidence, runnable Python calculations (16 programs, all checked), classical sources and the author's hypotheses.
Data table
The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 0.92
| data | | events | fitted mu | n | beta | ||
| Hawkes, mu 0.3, n 0.70, beta 1.0 (#1) | | | 4104 | | 0.298 | 0.71 | 0.946 |
| Hawkes, mu 0.3, n 0.70, beta 1.0 (#2) | | | 3803 | | 0.284 | 0.70 | 0.997 |
| Hawkes, mu 0.3, n 0.70, beta 1.0 (#3) | | | 4290 | | 0.325 | 0.70 | 1.052 |
| Poisson, constant rate 1.0 | | | 4102 | | 1.011 | 0.02 | 0.001 |
| Poisson, 0.5/2.0, regimes of 400 (#1) | | | 5062 | | 0.099 | 0.93 | 0.076 |
| Poisson, 0.5/2.0, regimes of 400 (#2) | | | 4877 | | 0.103 | 0.92 | 0.074 |
| Poisson, 0.5/2.0, regimes of 40 (#1) | 5049 | 0.297 0.77 0.297 | |||||
| Poisson, 0.5/2.0, regimes of 40 (#2) | 5006 | 0.308 0.75 0.298 | |||||
Key formula
Show the full program
# Hawkes maximum likelihood (Ozaki 1979 recursion), Nelder-Mead over
# (log mu, logit n, log beta). Fitted to Hawkes data and to Poisson data with no
# self-excitation, constant or switching between rates 0.5 and 2.0.
import math, random
def ogata(mu, alpha, beta, T, rng):
t, ex, ts = 0.0, 0.0, []
while True:
lb = mu + ex; w = rng.expovariate(lb); t += w
if t > T: return ts
ex *= math.exp(-beta * w)
if rng.random() * lb <= mu + ex: ts.append(t); ex += alpha
def switching_poisson(rates, seg, T, rng):
t, ts = 0.0, []
while t < T:
k = int(t // seg); end = (k + 1) * seg
w = rng.expovariate(rates[k % len(rates)])
if t + w >= end: t = end; continue # memoryless: restart at the regime boundary
t += w
if t < T: ts.append(t)
return ts
def loglik(p, ts, T):
mu, n, beta = math.exp(p[0]), 1 / (1 + math.exp(-p[1])), math.exp(p[2])
alpha, A, prev, s = n * beta, 0.0, None, 0.0
for t in ts:
if prev is not None: A = math.exp(-beta * (t - prev)) * (1 + A)
s += math.log(mu + alpha * A); prev = t
comp = mu * T + n * sum(1 - math.exp(-beta * (T - t)) for t in ts)
return s - comp
def nelder_mead(f, x0, step=0.5, iters=250):
pts = [list(x0)] + [[x + (step if i == j else 0) for j, x in enumerate(x0)]
for i in range(len(x0))]
vals = [f(p) for p in pts]
for _ in range(iters):
order = sorted(range(len(pts)), key=lambda i: vals[i])
pts = [pts[i] for i in order]; vals = [vals[i] for i in order]
c = [sum(p[j] for p in pts[:-1]) / (len(pts) - 1) for j in range(len(x0))]
def at(k): return [c[j] + k * (pts[-1][j] - c[j]) for j in range(len(x0))]
r = at(-1); fr = f(r)
if fr < vals[0]:
e = at(-2); fe = f(e)
pts[-1], vals[-1] = (e, fe) if fe < fr else (r, fr)
elif fr < vals[-2]: pts[-1], vals[-1] = r, fr
else:
k = at(0.5); fk = f(k)
if fk < vals[-1]: pts[-1], vals[-1] = k, fk
else:
pts = [pts[0]] + [[(a + b) / 2 for a, b in zip(pts[0], p)]
for p in pts[1:]]
vals = [vals[0]] + [f(p) for p in pts[1:]]
return pts[0]
def fit(ts, T):
p = nelder_mead(lambda q: -loglik(q, ts, T), [math.log(len(ts) / T / 2), 0.0, 0.0])
return math.exp(p[0]), 1 / (1 + math.exp(-p[1])), math.exp(p[2])
def row(label, ts, T):
mu, n, b = fit(ts, T)
print(f"{label:38s} | {len(ts):6d} | {mu:5.3f} {n:5.2f} {b:6.3f}")
rng = random.Random(1979)
T = 4000.0
print("data | events | fitted mu n beta")
for rep in range(3):
row(f"Hawkes, mu 0.3, n 0.70, beta 1.0 (#{rep + 1})", ogata(0.3, 0.7, 1.0, T, rng), T)
row("Poisson, constant rate 1.0", switching_poisson((1.0,), T, T, rng), T)
for seg in (400.0, 40.0):
for rep in range(2):
row(f"Poisson, 0.5/2.0, regimes of {seg:3.0f} (#{rep + 1})",
switching_poisson((0.5, 2.0), seg, T, rng), T)Single source and citation
Fan, Y. (2026). Liquidation Cascades, Order-Book Depth Depletion and Cointegrated Statistical Arbitrage (Version 1.0.0), Chapter 3: Liquidation Cascades, Branching Processes and Hawkes Self-Exciting Point Processes. 5D Library. https://doi.org/10.5281/zenodo.23796776
DOI: 10.5281/zenodo.23796776 · Read the monograph · 5DL-B-039 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026039,
author = {Fan, Yafu},
title = {Liquidation Cascades, Order-Book Depth Depletion and Cointegrated Statistical Arbitrage},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
doi = {10.5281/zenodo.23796776},
url = {https://doi.org/10.5281/zenodo.23796776}
}Other chapter answers in this book
- Chapter 1 · Order-Book Depth and Price Impact
- Chapter 2 · Perpetual Contracts, Funding and Forced Liquidation
- Chapter 4 · The Ornstein–Uhlenbeck Process: Mean Reversion and Its Estimation
- Chapter 5 · Cointegration, Pairs Trading and Broken Relationships
- Chapter 6 · The Kalman Filter and Dynamic Hedge Ratios
- Chapter 8 · Practice and a Pre-Registered Test