关于「清算瀑布、分支过程与霍克斯自激点过程」,《清算瀑布与协整套利》给出的定量结论是什么?
结论:霍克斯过程用分支比 \(n\) 描述事件引发事件的程度:\(n < 1\) 时平均强度为 \(\mu/(1-n)\),接近 1 时事件高度成簇、偶有巨大连锁。分支比可以用递推似然估计,但对模型设定极其敏感:没有自激、只有基线切换的数据也能拟合出 0.92 的分支比,这正是关于「市场是否处于临界」的争论的核心。作者把清算瀑布写成价格上的有效分支比 \(n_{\text{eff}} = \rho/d\),它由杠杆分布与深度共同决定,并且是局部的。下一章转向交易的另一面:均值回复。
数据口径:本书是教学与研究用的数学模型,不是投资、交易、税务或法律建议;杠杆与衍生品可能造成全部本金甚至超出本金的损失,回测与模拟不代表未来收益。 书中以标注框区分已发表的证据、可运行的 Python 计算(16 段程序,全部核对)、原典与作者的假说。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 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 | |||||
核心公式
\[\lambda(t) = \mu + \sum_{t_i < t} \alpha\, e^{-\beta (t - t_i)}.\]
查看完整验算程序
# 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)唯一数据源与引用
范雅福(Fan, Y.). (2026). 《高杠杆衍生品清算瀑布、订单簿深度衰竭与协整统计套利》第 3 章「清算瀑布、分支过程与霍克斯自激点过程」(版本 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.23796776
DOI: 10.5281/zenodo.23796776 · 阅读本章所在专著 · 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}
}