关于「实证闭环:月度链上仓位体检、蒸馏小工具与预注册证伪」,《做市损耗与三明治上界》给出的定量结论是什么?

结论:第八章给出月度链上仓位体检、蒸馏小工具「做市损耗与滑点体检器」与预注册证伪方案,主检验需要 56 个头寸月。本书只做防御与风险度量,不写任何抢跑或三明治机器人的搭建与运营。书中以标注框区分已发表的证据、可运行的 Python 计算(20 段程序)、原典与作者的假说。

数据口径:书中参数为示意,全部计算由书中程序生成。 本书是非个人化投资风险分析,不构成投资建议,不推荐任何代币、协议或交易;加密资产高风险,可能全部损失。

English version

对照数据表

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

Test 1: mean ln(coverage) < 0, sd 0.6, alpha 0.05, power 0.80
delta n (indep.) design effect (m3) n positions x 3
0.1223 1.6 119
0.256 1.6 30
0.325 1.6 14
Test 2: sign test on coverage < 1
p1 0.60: n158, reject if at least 90 below 1
p1 0.65: n69, reject if at least 42 below 1
p1 0.70: n37, reject if at least 24 below 1
Test 3: simulated power of test 1 at delta 0.2
n56, power 0.790
查看完整验算程序
# Chapter 8. p82: sample sizes for the pre-registered refutation test.
# Test 1 (core claim): over registered position-months, the mean of
# ln(coverage ratio) is below 0. One-sided test at alpha = 0.05 with
# power 0.80 against a true mean of -delta, monthly sd 0.6 (assumed):
#   n = ((z_a + z_b) sd / delta)^2, inflated by the design effect
#   1 + (m - 1) rho for m months per position, rho = 0.3.
# Test 2 (sign test): share of position-months with coverage below 1;
# null 0.5, alternative p1; smallest n with exact binomial size <= 0.05
# and power >= 0.80. Test 3: a fixed-seed simulation checks the power
# of test 1 at the computed n. All inputs illustrative.
import math
import random
import statistics

ZA, ZB = 1.6449, 0.8416


def n_mean(delta, sd):
    return math.ceil(((ZA + ZB) * sd / delta) ** 2)


def binom_tail(n, k, p):
    terms = [math.comb(n, i) * p ** i * (1 - p) ** (n - i)
             for i in range(k, n + 1)]
    return math.fsum(terms)


def n_sign(p1):
    for n in range(10, 2000):
        k = next(k for k in range(n + 1) if binom_tail(n, k, 0.5) <= 0.05)
        if binom_tail(n, k, p1) >= 0.80:
            return n, k
    return None, None


def sim_power(rng, n, delta, sd, reps=4000):
    hits = 0
    for _ in range(reps):
        xs = [rng.gauss(-delta, sd) for _ in range(n)]
        t = statistics.fmean(xs) / (statistics.stdev(xs) / math.sqrt(n))
        if t < -ZA:
            hits += 1
    return hits / reps


if __name__ == "__main__":
    rng = random.Random(20261120)
    print("Test 1: mean ln(coverage) < 0, sd 0.6, alpha 0.05, power 0.80")
    print("  delta   n (indep.)   design effect (m=3)   n positions x 3")
    for delta in (0.1, 0.2, 0.3):
        n = n_mean(delta, 0.6)
        deff = 1 + (3 - 1) * 0.3
        npos = math.ceil(n * deff / 3)
        print("  {:.1f}  {:>11,}  {:>20.1f}  {:>17,}".format(
            delta, n, deff, npos))
    print("Test 2: sign test on coverage < 1")
    for p1 in (0.60, 0.65, 0.70):
        n, k = n_sign(p1)
        print("  p1 {:.2f}: n = {:>4,}, reject if at least {:>4,} below 1"
              .format(p1, n, k))
    print("Test 3: simulated power of test 1 at delta 0.2")
    n = n_mean(0.2, 0.6)
    print("  n = {}, power {:.3f}".format(n, sim_power(rng, n, 0.2, 0.6)))

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《集中流动性做市商重平衡损耗(LVR)、链上三明治抢跑边界与去中心化金库风控母典》第 8 章「实证闭环:月度链上仓位体检、蒸馏小工具与预注册证伪」(版本 1.0.0). 5D Library. DOI 待发布

DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-344 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026344,
  author    = {Fan, Yafu},
  title     = {Concentrated-Liquidity Loss-Versus-Rebalancing, On-Chain Sandwich Bounds and Decentralised Vault Risk Control},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

本书其他章节结论