5D Library › 做市商伽马敞口、零日到期期权与波动率收割动力学 · English

第八章 四步核查与一项预注册检验

依据伽马故事行动之前的四个问题

本章把全书变成四个问题。它们不是交易规则,而是对任何以做市商伽马或卖波动率记录为证据的论证——包括自己的论证——应当提出的问题。

一、符号从哪里来? 如果关于做市商伽马的陈述建立在未平仓量上,它的符号就是一个假设(第三章),这个陈述的好坏只取决于该假设对该标的、该时期是否成立。要问:来源是否使用带方向的成交数据,是否包含日内 0DTE 头寸,以及如果把惯例反过来,结论会怎样。如果结论在反转后依然成立,它本来就没有用到符号。

二、这是关于幅度的说法,还是关于方向的说法? 对冲反馈改变的是价格在某个给定时段上走多远(第二章)。关于方向的说法——顶、底、收盘往哪走——必须另有来源,应当作为一个独立的主张来检验,有它自己的样本外记录,并把试过的每一条规则都计算在内(第三章)。

三、这份记录里有什么? 对任何卖波动率的记录,数一数它包含多少次缺口,并与它应当包含的次数比较(第四章)。没有缺口的记录高估优势;缺口多的记录低估优势。注码要按一个大于记录中最差一天的亏损来定,而不是等于它,因为增长最优的规模挨着一道由单个观测值确定位置的悬崖。

四、每张合约的净值是多少? 写下策略每张合约的盈亏平衡成本,与实际的半个价差加佣金比较(第五章)。毛夏普比率更好、合约更多的结构,净夏普比率可能更差。然后记住标准误:一年只能把年化夏普比率测到约 ±1 的精度。

一项预注册检验

第二、三章之后只剩下一个主张站得住:基于未平仓量的做市商伽马符号,若其符号惯例与现实相符,可能携带关于次日波动率的信息,而不携带任何关于方向的信息。这个主张可以检验,而且检验方案可以在数据出现之前写下来。

假说 · 尚未验证

研究方案。 数据:一个宽基股票指数,从注册日起逐日收集;每天晚上用固定、公开的脚本,从当天的未平仓量计算惯例的 GEX。主要结局:由 5 分钟收益计算的次日对数已实现方差。主要估计量 DD:在次日对数已实现方差对该指示变量加滞后已实现方差(HAR)项的回归中,「估计 GEX 为负」的系数,使用对序列相关稳健的标准误。预测:D>0D > 0。最小关注效应:0.10,约高 10% 的已实现方差。次要结局(等效性):两组之间次日收益之差在每天 ±0.05% 之内(双单侧检验)。符号惯例与未平仓量来源都事先固定;改动其中任何一个,结果即不可解释。

推导

# Chapter 8. Pre-registered test of the one claim the book's model supports:
# an OI-based dealer-gamma sign carries information about NEXT-DAY VOLATILITY
# (not about direction). Primary outcome: log realised variance from 5-minute
# returns, next day. Primary estimate D = coefficient on "estimated GEX
# negative" in a regression of next- day log RV on that indicator plus the
# usual lagged-RV (HAR) terms; POSITIVE D supports the mechanism. SESOI 0.10
# (about 10 % higher realised variance). Assumed residual sd of log RV after
# the HAR terms 0.35, a design effect of 1.5 for serial correlation, half the
# days in each sign group, two-sided alpha 0.05, power 0.90. Secondary
# (equivalence) test: next-day RETURN difference between the groups lies
# inside +/- 0.05 % a day (TOST), daily return sd 1.0 %.
import math

# inverse normal CDF by bisection (standard library only)
def z(p):
    lo, hi = -10.0, 10.0
    for _ in range(100):
        mid = 0.5 * (lo + hi)
        if 0.5 * (1 + math.erf(mid / math.sqrt(2))) < p:
            lo = mid
        else:
            hi = mid
    return 0.5 * (lo + hi)

def days_needed(delta, sd, alpha_two_sided, power, deff, tost=False):
    za = z(1 - alpha_two_sided / 2) if not tost else z(1 - alpha_two_sided)
    zb = z(power) if not tost else z(1 - (1 - power) / 2)
    per_group = 2 * (za + zb) ** 2 * sd * sd / (delta * delta)
    return math.ceil(2 * per_group * deff)

SESOI = 0.10

def verdict(d, lo, hi, n_days, n_planned, sign_rule_changed=False,
            oi_source_changed=False, share_negative=0.5):
    for bad, why in (
        (
            sign_rule_changed,
            "the sign convention was changed after the data were seen",
        ),
        (oi_source_changed, "the open-interest source changed mid-study"),
        (
            n_days < 0.9 * n_planned,
            "only {:,} of {:,} planned days".format(n_days, n_planned),
        ),
    ):
        if bad:
            return "D = {:+.3f}: NOT INTERPRETABLE -\n    {}".format(d, why)
    if lo >= SESOI:
        v = "supports the mechanism at or above the SESOI"
    elif lo > 0:
        v = "positive, but not shown to reach the SESOI"
    elif hi < 0:
        v = (
            "the OPPOSITE sign:\n    the convention, or the mechanism, is"
            " wrong"
        )
    elif lo >= -SESOI and hi <= SESOI:
        v = "no difference worth acting on"
    else:
        v = "unclear: the interval is too wide to decide"
    out = "D = {:+.3f} ({:+.3f} to {:+.3f}): {}".format(d, lo, hi, v)
    if not 0.2 <= share_negative <= 0.8:
        out += (
            "\n    qualifier: only {:.0%} of days fell in the negative group;"
            "\n      the comparison rests on few days".format(share_negative)
        )
    return out

if __name__ == "__main__":
    n = days_needed(SESOI, 0.35, 0.05, 0.90, 1.5)
    print(
        "Primary (volatility): trading days needed = {:,}  (about {:.1f}"
        " years)".format(n, n / 252)
    )
    m = days_needed(0.0005, 0.010, 0.05, 0.90, 1.0, tost=True)
    print("Secondary (no directional effect, TOST +/- 0.05 %/day):")
    print("  days needed = {:,}  (about {:.0f} years)".format(m, m / 252))
    print(
        "  -> the secondary test is reported but cannot be powered; a 'no"
        " effect'"
    )
    print("     verdict on direction would need decades of daily data.")
    print("\nDecision rule, fixed before the data are examined:")
    PLAN = n
    for c in ((0.180, 0.110, 0.250, PLAN, PLAN),
              (0.070, 0.010, 0.130, PLAN, PLAN),
              (0.010, -0.060, 0.080, PLAN, PLAN),
              (-0.120, -0.190, -0.050, PLAN, PLAN),
              (0.050, -0.150, 0.250, PLAN, PLAN),
              (0.150, 0.080, 0.220, PLAN, PLAN, False, False, 0.12),
              (0.150, 0.080, 0.220, PLAN, PLAN, True),
              (0.150, 0.080, 0.220, PLAN, PLAN, False, True),
              (0.150, 0.080, 0.220, int(0.7 * PLAN), PLAN)):
        print(verdict(*c))
    print(
        "\nThe example numbers above are invented, to show what each branch"
        " prints."
    )
# Primary (volatility): trading days needed = 773  (about 3.1 years)
# Secondary (no directional effect, TOST +/- 0.05 %/day):
#   days needed = 17,316  (about 69 years)
#   -> the secondary test is reported but cannot be powered; a 'no effect'
#      verdict on direction would need decades of daily data.
#
# Decision rule, fixed before the data are examined:
# D = +0.180 (+0.110 to +0.250): supports the mechanism at or above the SESOI
# D = +0.070 (+0.010 to +0.130): positive, but not shown to reach the SESOI
# D = +0.010 (-0.060 to +0.080): no difference worth acting on
# D = -0.120 (-0.190 to -0.050): the OPPOSITE sign:
#     the convention, or the mechanism, is wrong
# D = +0.050 (-0.150 to +0.250): unclear: the interval is too wide to decide
# D = +0.150 (+0.080 to +0.220): positive, but not shown to reach the SESOI
#     qualifier: only 12% of days fell in the negative group;
#       the comparison rests on few days
# D = +0.150: NOT INTERPRETABLE -
#     the sign convention was changed after the data were seen
# D = +0.150: NOT INTERPRETABLE -
#     the open-interest source changed mid-study
# D = +0.150: NOT INTERPRETABLE -
#     only 541 of 773 planned days
#
# The example numbers above are invented, to show what each branch prints.

主要检验需要 773 个交易日,约 3.1 年。次要检验的数字更有启发:要证明方向效应在每天 ±0.05% 之内不存在,需要 17,316 天,约 69 年。所以本书关于方向的主张——那里什么都没有——是来自模型的理论主张,不是任何可行样本上的研究能证实的主张。预注册方案把这一点写明,而不是把一个不显著的次要检验当作「不存在」的证据来报告。

判定规则对每个分支打印一行。区间为正且高于最小关注效应,支持机制;区间为负,说明对该指数而言惯例或机制是错的;区间落在 ±0.10 之内,说明没有值得据以行动的差别。有三种情况使结果不可解释而不是否定:看过数据后改了符号惯例、研究中途换了未平仓量来源、或收集到的天数不足计划的 90%。若任一组的天数不足五分之一,判定附带限定条件。

注

正面结果意味着什么、不意味着什么。 它意味着,对该指数与该时期,惯例的符号对得足够多,足以携带波动率信息。它不意味着做市商在任何其他市场是多头或空头伽马,不意味着这张图能预测方向,也不意味着基于它的策略在扣除成本后有利可图。负面结果——D<0D < 0——同样有信息量:按第三章,最可能的解释是客户站在了惯例的另一边。

小结

四个问题概括了全书:符号从哪里来,主张是关于幅度还是方向,记录里有什么,每张合约的净值是多少。前几章之后只有一个主张站得住并可以前瞻地检验——基于未平仓量的伽马符号携带关于次日波动率的信息——预注册的设计需要约 3.1 年的日数据。本书关于「符号不携带方向信息」的主张无法被任何可行的研究证实;它依赖于模型,预注册方案如实说明了这一点。

Fan, Y. (2026). Dealer Gamma Exposure, Zero-Day Options and Volatility Harvesting Dynamics: Delta-Hedging Feedback Loops, Strike Pinning, Iron Condor Tail Ruin and Variance Swap Replication [做市商伽马敞口、零日到期期权与波动率收割动力学] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090160 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).