关于「协整、配对交易与关系断裂」,《清算瀑布与协整套利》给出的定量结论是什么?

结论:两条随机游走之间的回归会产生伪关系;协整要求存在平稳的线性组合,用恩格尔—格兰杰两步法检验时必须使用残差检验的临界值(两变量、带常数,5% 约 −3.34,250 个观测约 −3.36),用普通迪基—富勒的 −2.86 会使错判率接近 15%。即使临界值正确,大规模筛选也会制造数以百计的假配对,而一年数据检出真协整的把握度很低。配对交易的历史收益确实存在,但持续衰减,计入成本后大幅缩小。协整关系断裂时,规则的收益趋于零或为负,止损只能截尾。下一章讨论另一种思路:不假设对冲比率固定,而让它随时间变化。

数据口径:本书是教学与研究用的数学模型,不是投资、交易、税务或法律建议;杠杆与衍生品可能造成全部本金甚至超出本金的损失,回测与模拟不代表未来收益。 书中以标注框区分已发表的证据、可运行的 Python 计算(16 段程序,全部核对)、原典与作者的假说。

English version

对照数据表

下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 250

two independent random walks, T250, 20,000 replications
reject 'no cointegration' at Dickey-Fuller -2.86 (wrong table)14.8%
reject 'no cointegration' at MacKinnon asymptotic -3.3365.0%
reject 'no cointegration' at MacKinnon T250 -3.361 : 4.7%
simulated 5 % critical value-3.339
screening 100 unrelated series (4,950 pairs), four universes:
[356, 224, 323, 351] pairs 'cointegrated' at 5 %
truly cointegrated, spread half-life 10 days: detected in 49.5%
truly cointegrated, spread half-life 40 days: detected in 8.7%
查看完整验算程序
# Engle-Granger: OLS of y on x, then ADF (one lag) on the residuals. Residual critical
# values (MacKinnon 2010, N = 2, constant): 5 % -3.336; T = 250: -3.361.
import math, random
rng = random.Random(1987)
T = 250

def ols(ys, xs):                          # y = a + b x
    n = len(xs); mx, my = sum(xs) / n, sum(ys) / n
    sxy = sum((x - mx) * (y - my) for x, y in zip(xs, ys))
    b = sxy / sum((x - mx) ** 2 for x in xs)
    return my - b * mx, b

def adf_t(e):                             # regression without constant, one lag of de
    d = [e[i] - e[i - 1] for i in range(1, len(e))]
    Y, X1, X2 = d[1:], e[1:-1], d[:-1]
    s11 = sum(a * a for a in X1); s22 = sum(a * a for a in X2)
    s12 = sum(a * b for a, b in zip(X1, X2))
    s1y = sum(a * y for a, y in zip(X1, Y)); s2y = sum(a * y for a, y in zip(X2, Y))
    det = s11 * s22 - s12 * s12
    g = (s22 * s1y - s12 * s2y) / det; c = (s11 * s2y - s12 * s1y) / det
    rss = sum((y - g * a - c * b) ** 2 for y, a, b in zip(Y, X1, X2))
    return g / math.sqrt(rss / (len(Y) - 2) * s22 / det)

def eg(y, x):
    a, b = ols(y, x)
    return adf_t([v - a - b * u for v, u in zip(y, x)])

def walk(n):
    w = [0.0]
    for _ in range(n - 1): w.append(w[-1] + rng.gauss(0, 1))
    return w

R = 20000
null = sorted(eg(walk(T), walk(T)) for _ in range(R))
print(f"two independent random walks, T = {T}, {R:,} replications")
for name, cv in (("Dickey-Fuller -2.86 (wrong table)", -2.86),
                 ("MacKinnon asymptotic -3.336", -3.336),
                 ("MacKinnon T = 250 -3.361", -3.361)):
    rate = sum(t < cv for t in null) / R
    print(f"   reject 'no cointegration' at {name:34s}: {rate:5.1%}")
print(f"   simulated 5 % critical value: {null[R // 20]:.3f}")
counts = []
for _ in range(4):                        # four universes of 100 unrelated series
    w = [walk(T) for _ in range(100)]
    counts.append(sum(eg(w[i], w[j]) < -3.361
                      for i in range(100) for j in range(i + 1, 100)))
print(f"screening 100 unrelated series (4,950 pairs), four universes:")
print(f"   {counts} pairs 'cointegrated' at 5 %")
for hl in (10, 40):
    b = 0.5 ** (1 / hl); power = 0
    for _ in range(1000):
        x = walk(T); s = [rng.gauss(0, 1 / math.sqrt(1 - b * b))]
        for _ in range(T - 1): s.append(b * s[-1] + rng.gauss(0, 1))
        power += eg([u + v for u, v in zip(x, s)], x) < -3.361
    print(f"truly cointegrated, spread half-life {hl} days: detected in"
          f" {power / 1000:.1%}")

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《高杠杆衍生品清算瀑布、订单簿深度衰竭与协整统计套利》第 5 章「协整、配对交易与关系断裂」(版本 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}
}

本书其他章节结论