关于「实践与预注册检验:四步核查表与盲法置换回测」,《离散周期网络与占位熵》给出的定量结论是什么?

结论:程序按登记的做法生成数据:先用带波动聚集的日度 GARCH(1,1) 模型生成日超额收益(正态冲击与厚尾的 \(t(5)\) 冲击两种,参数为示意值,每个节气月 21 个交易日),再按节气月累计;效应设为把冲月里每一天的收益乘以 \(R\),不改变波动过程本身。年内对比的标准差约为 1.20 与 1.21,于是 \(D\) 的标准误约为 0.122 与 0.123。在单侧 \(\alpha = 0.025\) 下,对 \(R = 1.5\) 的把握度两种模型都是 91%;对 \(R = 1.25\) 只有 45% 与 44%。要达到 90% 的把握度,真实效应至少要为 \(R \approx 1.49\);若要以 90% 的把握度检测 \(R = 1.25\),需要 303 到 308 年的数据,这在任何现存的股市中都不存在。用登记的分层置换检验直接模拟,无效应时拒绝零假设的比例为 2.3%(名义水平 2.5%),\(R = 1.5\) 时为 89.8%;模拟中每次只做 199 次置换,略低于正式分析 9,999 次置换时的把握度,所以「约 90%」是偏保守的说法。

数据口径:本书是教学与研究用的数学模型,不是投资、交易、税务或法律建议。 书中以标注框区分已发表的证据、可运行的 Python 计算(17 段程序,全部核对)、原典与作者的假说。

English version

对照数据表

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

normal daily shocks: SD of yearly contrast 1.20, SE of D 0.122
power at R1.25: 45%, 1.5: 91%, 1.75: 100%
90 % power needs R >1.49; R = 1.25 would need 303 years
t(5) daily shocks: SD of yearly contrast 1.21, SE of D 0.123
power at R1.25: 44%, 1.5: 91%, 1.75: 100%
90 % power needs R >1.49; R = 1.25 would need 308 years
simulated permutation test (normal daily shocks), R1.0: rejects 2.3%
simulated permutation test (normal daily shocks), R1.5: rejects 89.8%
查看完整验算程序
# Power of the Chapter 8 test on a FIXED 96 years of solar-term months built from DAILY
# returns. Synthetic daily GARCH(1,1) excess returns (normal or t(5) shocks, illustrative
# values), 21 trading days per solar-term month; every daily return in the opposition
# month is multiplied by R (the volatility process itself is unchanged). Month outcome
# log|month return|; D = mean yearly contrast; one-sided alpha 0.025; R = 1.5 = 1 + c.
import math, random
from statistics import NormalDist, stdev
YEARS, Y0, DAYS = 96, 6, 21
Z = NormalDist().inv_cdf

def history(rng, R=1.0, df=None, a=0.08, b=0.91):
    s2, ys, sq = 1.0, [], math.sqrt
    for T in range(12 * YEARS):
        y, m = divmod(T, 12); k = R if ((m + 2) - (y + Y0)) % 12 == 6 else 1.0
        tot = 0.0
        for _ in range(DAYS):
            z = rng.gauss(0, 1)
            if df:                                   # t(df) shock scaled to variance 1
                z /= sq(2 * rng.gammavariate(df / 2, 1) / (df - 2))
            x = sq(s2) * z; tot += k * x; s2 = (1 - a - b) + a * x * x + b * s2
        ys.append(math.log(abs(tot) + 1e-12))
    return ys

def contrasts(ys):
    c = [[12 / 11 * (ys[12 * j + m] - sum(ys[12 * j:12 * j + 12]) / 12)
          for m in range(12)] for j in range(YEARS)]
    sel = [next(m for m in range(12) if ((m + 2) - (j + Y0)) % 12 == 6)
           for j in range(YEARS)]
    return c, sel

if __name__ == "__main__":
    rng = random.Random(1930)
    for df in (None, 5):
        sds = []
        for _ in range(200):
            c, sel = contrasts(history(rng, df=df))
            sds.append(stdev([c[j][sel[j]] for j in range(YEARS)]))
        sd = sum(sds) / len(sds); se = sd / math.sqrt(YEARS)
        lab = "normal" if df is None else f"t({df})"
        pw = {r: 1 - NormalDist().cdf(Z(0.975) - math.log(r) / se)
              for r in (1.25, 1.5, 1.75)}
        mde = math.exp((Z(0.975) + Z(0.90)) * se)
        yrs = math.ceil(((Z(0.975) + Z(0.90)) * sd / math.log(1.25)) ** 2)
        print(f"{lab} daily shocks: SD of yearly contrast {sd:.2f}, SE of D {se:.3f}")
        print("   power at R = " + ", ".join(f"{r}: {p:.0%}" for r, p in pw.items()))
        print(f"   90 % power needs R >= {mde:.2f}; R = 1.25 would need {yrs} years")
    # Check by simulation with the pre-registered within-year permutation test.
    for R in (1.0, 1.5):
        rej = 0
        for _ in range(600):
            c, sel = contrasts(history(rng, R))
            d0 = sum(c[j][sel[j]] for j in range(YEARS)) / YEARS
            null = [sum(c[j][rng.randrange(12)] for j in range(YEARS)) / YEARS
                    for _ in range(199)]
            rej += (1 + sum(d >= d0 for d in null)) / 200 <= 0.025
        print(f"simulated permutation test (normal daily shocks), R = {R}:"
              f" rejects {rej / 600:.1%}")

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《离散周期网络中的双尺度重整化、占位数分布熵与推力波叠加定理》第 8 章「实践与预注册检验:四步核查表与盲法置换回测」(版本 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.23796761

DOI: 10.5281/zenodo.23796761 · 阅读本章所在专著 · 5DL-B-037 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026037,
  author    = {Fan, Yafu},
  title     = {Two-Scale Renormalization, Occupancy Entropy and Thrust-Wave Superposition in Discrete Cyclical Networks},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  doi       = {10.5281/zenodo.23796761},
  url       = {https://doi.org/10.5281/zenodo.23796761}
}

本书其他章节结论