5D Library › Dealer Gamma Exposure, Zero-Day Options and Volatility Harvesting Dynamics · 中文

Chapter 3. What a GEX Chart Can Know: the Sign Is Not in the Data

Open interest is the same whoever is long

Every option contract has a buyer and a seller. Open interest counts contracts outstanding, so it is the same number whichever side the customer is on. The chart therefore needs an assumption about direction. The usual one is that customers are short calls (covered-call writing) and long puts (protection), so dealers are long calls and short puts.

Let aa be the share of open interest in which the customer is the long side. The dealer is then net long OI×(1−2a)\text{OI}\times(1-2a) contracts, and the chart’s convention is acall=0a_{\text{call}} = 0, aput=1a_{\text{put}} = 1. Any other value of aa is consistent with exactly the same open interest. The fifth program makes this concrete.

Calculation

# Chapter 3. What open interest can and cannot tell you about dealer gamma.
# Open interest counts contracts outstanding. Every contract has a long side
# and a short side, so OI is the same number whoever is long. The popular
# "GEX" chart assumes the customer is SHORT every call (dealer long calls) and
# LONG every put (dealer short puts). Let a = the share of OI in which the
# customer is the long side. The dealer is then net long OI x (1 - 2a)
# contracts. The convention is a_call = 0, a_put = 1. Synthetic chain: S =
# 100, strikes 90..110, expiries 1, 7 and 30 trading days. GEX is reported in
# "dollars of hedge per 1 % move" = gamma x S^2 x 0.01 x 100 x OI.
import math

def gamma(S, K, sig, T):
    d1 = (math.log(S / K) + 0.5 * sig * sig * T) / (sig * math.sqrt(T))
    return math.exp(-0.5 * d1 * d1) / (
        math.sqrt(2 * math.pi) * S * sig * math.sqrt(T)
    )

SIG = 0.20
EXPIRIES = (1 / 252, 7 / 252, 30 / 252)
STRIKES = list(range(90, 111))

def oi(K, kind, T):
    # stylised OI: calls heavier just above spot, puts heavier below; more OI
    # far out
    centre = 103.0 if kind == "C" else 96.0
    base = 4000.0 * math.exp(-((K - centre) / 4.0) ** 2) + 300.0
    return base * (1.0 + 2.0 * T * 252 / 30)

def gex(S, a_call, a_put, extra=None):
    tot = 0.0
    for T in EXPIRIES:
        for K in STRIKES:
            g = gamma(S, K, SIG, T) * S * S * 0.01 * 100
            tot += g * oi(K, "C", T) * (1 - 2 * a_call)
            tot += g * oi(K, "P", T) * (1 - 2 * a_put)
    if extra:
        tot += extra(S)
    return tot / 1e6

def zero_level(a_call, a_put, extra=None):
    prev_s, prev_g = 85.0, gex(85.0, a_call, a_put, extra)
    s = 85.0
    while s < 115.0:
        s += 0.05
        g = gex(s, a_call, a_put, extra)
        if (g > 0) != (prev_g > 0):
            return prev_s + (s - prev_s) * prev_g / (prev_g - g)
        prev_s, prev_g = s, g
    return None

WORLDS = [
    ("convention (calls sold, puts bought)", 0.0, 1.0),
    ("half of call OI customer-long", 0.5, 1.0),
    ("call buyers 70 %, put buyers 60 %", 0.7, 0.6),
    ("everything reversed", 1.0, 0.0),
]

if __name__ == "__main__":
    print(
        "A. The data are identical in every world: OI at three strikes, 7-day"
        " expiry"
    )
    for K in (95, 100, 105):
        print(
            "   K = {:3d}: calls {:7.0f}   puts {:7.0f}".format(
                K, oi(K, "C", 7 / 252), oi(K, "P", 7 / 252)
            )
        )
    print(
        "\nB. Dealer gamma implied by the same OI under different customer"
        " directions"
    )
    print(
        "   world                              GEX at S=100       zero-gamma"
    )
    print("                                      ($m per 1 %)       level")
    for name, ac, ap in WORLDS:
        z = zero_level(ac, ap)
        print(
            "   {:<36}{:+11.1f}            {}".format(
                name,
                gex(100.0, ac, ap),
                "none in 85-115" if z is None else "{:.2f}".format(z),
            )
        )
    intraday = lambda S: -(
        gamma(S, 100.0, SIG, 3 / (252 * 6.5)) * S * S * 0.01 * 100 * 60000.0
    )
    print(
        "\nC. Add 0DTE contracts opened and closed within the day (never in"
        " any OI):"
    )
    print(
        "   60,000 ATM contracts bought by customers at 13:00, dealer short"
        " them"
    )
    print(
        "   convention GEX at S=100, from OI only:    {:+.1f}".format(
            gex(100.0, 0.0, 1.0)
        )
    )
    print("   true GEX at 13:00 including that flow:    {:+.1f}".format(
        gex(100.0, 0.0, 1.0, intraday)))
    print(
        "\nReading: OI fixes the gross gamma outstanding, not the dealers'"
        " net share of"
    )
    print(
        "it. Worlds with identical OI carry dealer gamma of either sign, and"
        " 0DTE"
    )
    print(
        "positions opened and closed before the OI snapshot are invisible"
        " to it."
    )
# A. The data are identical in every world: OI at three strikes, 7-day expiry
#    K =  95: calls     547   puts    5951
#    K = 100: calls    3783   puts    2598
#    K = 105: calls    5009   puts     477
#
# B. Dealer gamma implied by the same OI under different customer directions
#    world                              GEX at S=100       zero-gamma
#                                       ($m per 1 %)       level
#    convention (calls sold, puts bought)      +18.9            99.37
#    half of call OI customer-long             -94.5            none in 85-115
#    call buyers 70 %, put buyers 60 %         -64.3            none in 85-115
#    everything reversed                       -18.9            99.37
#
# C. Add 0DTE contracts opened and closed within the day (never in any OI):
#    60,000 ATM contracts bought by customers at 13:00, dealer short them
#    convention GEX at S=100, from OI only:    +18.9
#    true GEX at 13:00 including that flow:    -260.7
#
# Reading: OI fixes the gross gamma outstanding, not the dealers' net share of
# it. Worlds with identical OI carry dealer gamma of either sign, and 0DTE
# positions opened and closed before the OI snapshot are invisible to it.

Section A shows that the data are fixed. Section B shows that the conclusion is not. Under the convention, dealer gamma at a price of 100 is +18.9 million dollars of hedge per 1 % move, with a zero-gamma level at 99.37. If only half of call open interest is customer-long, the same data imply −94.5 and no zero-gamma level anywhere between 85 and 115. If customers are net buyers of both calls and puts, −64.3. If every direction is reversed, −18.9, with the same zero-gamma level — the chart’s line is unchanged while the sign of everything on both sides of it is flipped.

This is not an estimation problem that more data would fix. It is a problem of identification: the quantity of interest is not a function of the observed data, so no estimator built on those data alone can recover it.

Evidence

What is known about customer direction. Using data that do record who opened each position, Gârleanu, Pedersen and Poteshman found that end users were net long S&P 500 index options, with especially large net demand for out-of-the-money puts, so that dealers were net short (Gârleanu et al. 2009). Lakonishok, Lee, Pearson and Poteshman found that in equity options a large share of non-market-maker activity was option writing, including covered calls (Lakonishok et al. 2007). Both directions occur; which dominates differs by underlying, by strike and by period. A fixed convention is a guess about a quantity that is measured, where it is measured at all, only in data the chart does not use.

The intraday positions OI never sees

Section C adds a second gap. Open interest is a snapshot taken once a day. A 0DTE contract bought at 13:00 and sold at 15:30 never appears in any snapshot. In the program, 60,000 such at-the-money contracts bought by customers at 13:00 turn the dealers’ gamma from the convention’s +18.9 to −260.7: an order of magnitude larger, and of the opposite sign.

Evidence

What the 0DTE studies use. Studies that do estimate dealers’ 0DTE gamma use trade-level data with an inferred or recorded direction, not open interest. Dim, Eraker and Vilkov, using such data for S&P 500 0DTE options, reported that market makers’ aggregate 0DTE gamma was on average positive in their sample and did not find that 0DTE trading amplified intraday volatility (Dim et al. 2024); it is a working paper and the result rests on how trade direction is classified. Barbon and Buraschi, also with signed data, related negative dealer gamma imbalance to higher intraday volatility and momentum (Barbon and Buraschi 2021). These are the studies the weak claim needs; neither can be reproduced from an open-interest chart.

Does the estimate predict anything?

Suppose, generously, that the Chapter 2 mechanism is exactly true. The sixth program builds that world: true dealer gamma sets each day’s volatility, returns have mean zero whatever gamma is, and the analyst sees the gamma with the sign convention right on a share qq of days.

Calculation

# Chapter 3. Does an OI-based GEX estimate predict anything? A simulated world
# in which the Chapter 2 mechanism is TRUE by construction: true dealer gamma
# kappa_t sets the day's volatility, sigma_t = sigma0 / (1 + kappa_t) x
# exp(noise). Returns have mean zero whatever kappa is, because hedging
# changes how far prices move, not which way. The analyst sees est_t = s_t x
# kappa_t + measurement noise, where s_t = +1 when the sign convention happens
# to be right that day (probability q) and -1 otherwise.
import math
import random

def corr(x, y):
    n = len(x)
    mx, my = sum(x) / n, sum(y) / n
    sxy = sum((a - mx) * (b - my) for a, b in zip(x, y))
    sxx = sum((a - mx) ** 2 for a in x)
    syy = sum((b - my) ** 2 for b in y)
    return sxy / math.sqrt(sxx * syy)

def world(q, n, rng):
    est, logrv, ret = [], [], []
    for _ in range(n):
        k = rng.uniform(-0.5, 0.5)
        sig = 0.0126 / (1 + k) * math.exp(rng.gauss(0, 0.25))
        r = rng.gauss(0, sig)
        s = 1 if rng.random() < q else -1
        est.append(s * k + rng.gauss(0, 0.15))
        logrv.append(math.log(abs(r) + 1e-9))
        ret.append(r)
    return est, logrv, ret

def rule_sharpe(est, ret, thr, side):
    pnl = [side * (r if e > thr else -r) for e, r in zip(est, ret)]
    m = sum(pnl) / len(pnl)
    sd = math.sqrt(sum((p - m) ** 2 for p in pnl) / (len(pnl) - 1))
    return m / sd * math.sqrt(252)

if __name__ == "__main__":
    rng = random.Random(56006)
    print("A. 5,000 simulated days per row")
    print("   q (sign right)   corr(est, log|ret|)   corr(est, ret)")
    for q in (1.0, 0.8, 0.6, 0.5):
        est, lrv, ret = world(q, 5000, rng)
        print(
            "   {:9.1f}        {:+12.3f}         {:+10.3f}".format(
                q, corr(est, lrv), corr(est, ret)
            )
        )

    print(
        "\nB. Data mining a directional rule (q = 1, the most favourable"
        " case)"
    )
    print(
        "   42 rules (21 thresholds x 2 directions) tried on 1,000 days, the"
        " best one"
    )
    print(
        "   then traded on the next 1,000 days; repeated on 200 simulated"
        " histories"
    )
    ins_best, outs = [], []
    for rep in range(200):
        est, lrv, ret = world(1.0, 2000, rng)
        ie, ir, oe, orr = est[:1000], ret[:1000], est[1000:], ret[1000:]
        b = max((rule_sharpe(ie, ir, t / 20.0, sd), t / 20.0, sd)
                for t in range(-10, 11) for sd in (1, -1))
        ins_best.append(b[0])
        outs.append(rule_sharpe(oe, orr, b[1], b[2]))
    ins_best.sort()
    print(
        "   best in-sample Sharpe: mean {:+.2f}, middle 90 % {:+.2f} to"
        " {:+.2f}".format(sum(ins_best) / 200, ins_best[10], ins_best[189])
    )
    print("   same rule out of sample: mean {:+.2f}".format(sum(outs) / 200))
    print(
        "   share of histories with best in-sample Sharpe above 1.0: {:.3f}"
        .format(sum(x > 1.0 for x in ins_best) / 200)
    )
    print(
        "\nReading: a correctly signed GEX carries information about how"
        " large the"
    )
    print(
        "move will be, and that information fades as the sign convention"
        " fails."
    )
    print("It carries none about direction even when the mechanism is true.")
# A. 5,000 simulated days per row
#    q (sign right)   corr(est, log|ret|)   corr(est, ret)
#          1.0              -0.238             +0.013
#          0.8              -0.120             +0.027
#          0.6              -0.048             +0.014
#          0.5              -0.010             -0.019
#
# B. Data mining a directional rule (q = 1, the most favourable case)
#    42 rules (21 thresholds x 2 directions) tried on 1,000 days, the best one
#    then traded on the next 1,000 days; repeated on 200 simulated histories
#    best in-sample Sharpe: mean +0.85, middle 90 % +0.47 to +1.35
#    same rule out of sample: mean +0.01
#    share of histories with best in-sample Sharpe above 1.0: 0.270
#
# Reading: a correctly signed GEX carries information about how large the
# move will be, and that information fades as the sign convention fails.
# It carries none about direction even when the mechanism is true.

Section A gives the honest positive result and the honest negative one together. When the sign is always right (q=1q = 1) the estimate is correlated with the size of the next move: −0.238 with log absolute return (negative because more dealer gamma means a calmer day). That information fades as the convention fails: −0.120 at q=0.8q = 0.8, −0.048 at q=0.6q = 0.6 and −0.010 at q=0.5q = 0.5, where the sign is a coin toss. The correlation with the signed return is indistinguishable from zero in every row (between −0.019 and +0.027), because the mechanism contains no direction to predict.

Even the favourable −0.238 is modest. One day’s absolute return is a noisy measure of that day’s volatility, so even a perfect volatility signal correlates weakly with it.

Section B is the reason the strong claim keeps finding support. Trying 42 directional rules on 1,000 days and keeping the best gives an in-sample Sharpe ratio averaging +0.85, above 1.0 in 0.270 of histories; out of sample the same rule averages +0.01. A chart that is reread every morning until it “works” is a multiple-comparisons machine.

Note

What survives. The chapter does not show that dealer gamma is irrelevant. Chapter 2 shows the mechanism and the evidence boxes show it measured. What fails is the step from open interest to the dealers’ sign, and the step from gamma to direction. A GEX chart can be a crude volatility forecast if, and only if, its sign convention happens to match reality for that underlying and period — which the chart itself cannot tell you.

Summary

Open interest fixes the gross gamma outstanding, not the dealers’ net share of it: worlds with identical open interest carry dealer gamma of either sign, and intraday 0DTE positions are invisible to it. The dealers’ sign is therefore not identified by the data a GEX chart uses. In a world where the hedging mechanism is true by construction, a correctly signed estimate carries modest information about the size of the next day’s move and none about its direction, and the information disappears as the sign convention fails. The “tops and bottoms” claim fails even in the most favourable case; its apparent successes are what searching over many rules produces from noise.

References

Barbon, Andrea, and Andrea Buraschi. 2021. “Gamma Fragility.” Unpublished manuscript.
Dim, Chukwuma, Bjørn Eraker, and Grigory Vilkov. 2024. “0DTEs: Trading, Gamma Risk and Volatility Propagation.” Unpublished manuscript.
Gârleanu, Nicolae, Lasse Heje Pedersen, and Allen M. Poteshman. 2009. “Demand-Based Option Pricing.” The Review of Financial Studies 22 (10): 4259–99.
Lakonishok, Josef, Inmoo Lee, Neil D. Pearson, and Allen M. Poteshman. 2007. “Option Market Activity.” The Review of Financial Studies 20 (3): 813–57.

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).