What does Dealer Gamma and Volatility Harvesting conclude, in numbers, about “A Four-Step Check and a Pre-Registered Test”?

Answer: Chapter 8 gives a four-step check and a pre-registered test (773 trading days), and states that testing "no directional effect" would need 17,316 days. Boxes separate evidence, runnable Python (16 programs), sources and hypotheses; all data are synthetic unless cited.

Scope of the numbers: It is not investment advice. Boxes separate evidence, runnable Python (16 programs), sources and hypotheses; all data are synthetic unless cited.

中文版

Data table

The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 17316, 773

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.
Show the full program
# 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."
    )

Single source and citation

Fan, Y. (2026). Dealer Gamma Exposure, Zero-Day Options and Volatility Harvesting Dynamics (Version 1.0.0), Chapter 8: A Four-Step Check and a Pre-Registered Test. 5D Library. https://doi.org/10.5281/zenodo.24090160

DOI: 10.5281/zenodo.24090160 · Read the monograph · 5DL-B-056 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026056,
  author    = {Fan, Yafu},
  title     = {Dealer Gamma Exposure, Zero-Day Options and Volatility Harvesting Dynamics},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  doi       = {10.5281/zenodo.24090160},
  url       = {https://doi.org/10.5281/zenodo.24090160}
}

Other chapter answers in this book