5D Library › Dealer Gamma Exposure, Zero-Day Options and Volatility Harvesting Dynamics · 中文
Chapter 1. Gamma Near Expiry: a Spike, Not a Wall
What gamma is, and why dealers care
An option’s delta is the number of shares that move with it; its gamma is how fast that number changes as the price moves. A dealer who has sold or bought options and wants to carry no directional risk holds the opposite of the delta in shares, and must trade the gamma every time the price moves. That trade is the whole subject of this book. Chapter 2 asks what it does to the price; this chapter only asks how large it is and where it sits.
Everything below uses the Black-Scholes formulas (Black and Scholes 1973) with the interest rate set to zero, a price of 100, volatility 0.20 a year, and a year of 252 trading days of 6.5 hours. Nothing in the argument depends on those numbers; they make the tables readable.
Evidence
The formulas used. With , a call’s delta is , its gamma is , and with its time decay is , where and are the standard normal density and distribution function. These are textbook results (Black and Scholes 1973); the programs compute them with the error function from Python’s standard library.
Gamma rises as one over the square root of time
At the money , so : gamma rises as . The first program tabulates it.
Calculation
# Chapter 1. Black-Scholes Greeks from first principles (standard library
# only).
# Question: how does the gamma of an at-the-money option scale as expiry
# approaches, and how wide is the strike range over which that gamma is large?
# Conventions: S = 100, sigma = 0.20 a year, r = 0, 252 trading days of 6.5
# hours.
import math
def phi(x):
return math.exp(-0.5 * x * x) / math.sqrt(2.0 * math.pi)
def Phi(x):
return 0.5 * (1.0 + math.erf(x / math.sqrt(2.0)))
def d1(S, K, sig, T):
return (math.log(S / K) + 0.5 * sig * sig * T) / (sig * math.sqrt(T))
def gamma(S, K, sig, T):
return phi(d1(S, K, sig, T)) / (S * sig * math.sqrt(T))
def theta_per_day(S, K, sig, T):
# call theta with r = 0, per trading day
return -S * phi(d1(S, K, sig, T)) * sig / (2.0 * math.sqrt(T)) / 252.0
S, SIG = 100.0, 0.20
HOURS = 252 * 6.5
TENORS = [("30 trading days", 30 / 252), ("7 trading days", 7 / 252),
("1 trading day", 1 / 252), ("2 hours", 2 / HOURS),
("30 minutes", 0.5 / HOURS)]
if __name__ == "__main__":
print("A. At-the-money gamma and theta as expiry approaches")
print(" tenor gamma x 30-day theta/day 1-sd move")
g30 = gamma(S, S, SIG, 30 / 252)
for name, T in TENORS:
g = gamma(S, S, SIG, T)
print(
" {:<16}{:8.4f}{:10.2f}{:12.3f}{:10.3f} %".format(
name,
g,
g / g30,
theta_per_day(S, S, SIG, T),
100 * SIG * math.sqrt(T),
)
)
print(
" gamma ratio 30 days / 30 minutes predicted by 1/sqrt(T): {:.2f}"
.format(math.sqrt((30 / 252) / (0.5 / HOURS)))
)
print(
"\nB. Gamma at strikes away from the money, as a share of ATM gamma"
)
print(" strike offset 30 days 1 day 2 hours 30 minutes")
for off in (0.0, 0.5, 1.0, 2.0, 3.0):
K = S * (1 + off / 100)
row = [gamma(S, K, SIG, T) / gamma(S, S, SIG, T) for _, T in
(TENORS[0], TENORS[2], TENORS[3], TENORS[4])]
print(
" {:>5.1f} % {:8.3f}{:8.3f}{:10.3f}{:12.5f}".format(
off, *row
)
)
print("\nC. Strike half-width at which gamma falls to half its ATM value")
for name, T in TENORS:
lo, hi = 0.0, 50.0
for _ in range(80):
mid = 0.5 * (lo + hi)
if gamma(S, S * (1 + mid / 100), SIG, T) > 0.5 * gamma(
S, S, SIG, T
):
lo = mid
else:
hi = mid
print(" {:<16} +{:.3f} %".format(name, lo))
print(
"\nReading: 0DTE gamma is a spike, not a wall. It is larger at the"
" money"
)
print("and narrower in strike by the same factor, 1/sqrt(T).")
# A. At-the-money gamma and theta as expiry approaches
# tenor gamma x 30-day theta/day 1-sd move
# 30 trading days 0.0578 1.00 -0.046 6.901 %
# 7 trading days 0.1197 2.07 -0.095 3.333 %
# 1 trading day 0.3166 5.48 -0.251 1.260 %
# 2 hours 0.5708 9.88 -0.453 0.699 %
# 30 minutes 1.1417 19.76 -0.906 0.349 %
# gamma ratio 30 days / 30 minutes predicted by 1/sqrt(T): 19.75
#
# B. Gamma at strikes away from the money, as a share of ATM gamma
# strike offset 30 days 1 day 2 hours 30 minutes
# 0.0 % 1.000 1.000 1.000 1.00000
# 0.5 % 1.000 0.927 0.777 0.36198
# 1.0 % 0.995 0.736 0.365 0.01743
# 2.0 % 0.969 0.294 0.018 0.00000
# 3.0 % 0.926 0.065 0.000 0.00000
#
# C. Strike half-width at which gamma falls to half its ATM value
# 30 trading days +8.726 %
# 7 trading days +4.061 %
# 1 trading day +1.503 %
# 2 hours +0.829 %
# 30 minutes +0.413 %
#
# Reading: 0DTE gamma is a spike, not a wall. It is larger at the money
# and narrower in strike by the same factor, 1/sqrt(T).Section A is the part everyone quotes. A one-day option has 5.48 times the gamma of a 30-day option, and an option with thirty minutes left has 19.76 times as much; the rule predicts 19.75. Time decay rises in step, which is the bill for that gamma.
Sections B and C are the part that is usually left out. The width of the strike range over which gamma is large shrinks by the same factor. The half-width at which gamma falls to half its at-the-money value is +8.726 % for 30 days, +1.503 % for one day and +0.413 % for thirty minutes. Two percent away from the money, a one-day option keeps 0.294 of its peak gamma and a two-hour option keeps 0.018.
So the popular picture of zero-days-to-expiry (0DTE) options as a “gamma wall” is half right. The gamma is enormous, but only in a strike band that is a fraction of one percent wide late in the day. Whether that matters for the price depends entirely on whether the price is inside the band, and on who holds the options — which is the subject of Chapter 3.
Charm: the hedge moves when nothing moves
A second, quieter source of hedge flow is the clock. With the price unchanged, an option’s delta still drifts as expiry approaches: an out-of-the-money call’s delta decays toward zero, an in-the-money call’s toward one. The rate is called charm. The second program compares it, for one call, with the gamma part of the hedge change produced by a typical move over the same window.
Calculation
# Chapter 1. Where expiry-day hedge flow comes from: price (gamma) or clock
# (charm)? A dealer holding one call hedges with -delta shares. Over one hour
# the hedge must change by d(delta). We split that change into the part caused
# by a typical price move (gamma x one-hour 1-sd move) and the part caused
# purely by the passage of time with the price unchanged (charm). S = 100,
# sigma = 0.20, r = 0, 6.5-hour session ends 16:00.
import math
def Phi(x):
return 0.5 * (1.0 + math.erf(x / math.sqrt(2.0)))
def phi(x):
return math.exp(-0.5 * x * x) / math.sqrt(2.0 * math.pi)
def delta(S, K, sig, T):
if T <= 0:
return 1.0 if S > K else 0.0
d1 = (math.log(S / K) + 0.5 * sig * sig * T) / (sig * math.sqrt(T))
return Phi(d1)
def gamma(S, K, sig, T):
d1 = (math.log(S / K) + 0.5 * sig * sig * T) / (sig * math.sqrt(T))
return phi(d1) / (S * sig * math.sqrt(T))
S, SIG = 100.0, 0.20
YEAR_H = 252 * 6.5
def hm(h):
return "{:02d}:{:02d}".format(int(h), int(round((h - int(h)) * 60)))
# clock in hours, e.g. 10.0 -> 6 hours to the 16:00 close
def T_at(clock):
return (16.0 - clock) / YEAR_H
if __name__ == "__main__":
move = S * SIG * math.sqrt(1.0 / YEAR_H)
print("One-hour 1-sd price move: {:.3f} (= {:.3f} %)".format(move, move))
print("\nChange in the hedge of ONE call over each window")
print(
" strike window delta |gamma part| charm part "
" charm/gamma"
)
for K in (100.25, 100.5, 101.0):
for a, b in ((10.0, 11.0), (14.0, 15.0), (15.0, 15.75), (15.5, 15.9)):
Ta, Tb = T_at(a), T_at(b)
d_a = delta(S, K, SIG, Ta)
charm = delta(S, K, SIG, Tb) - d_a
gpart = gamma(S, K, SIG, Ta) * move * (b - a) ** 0.5
print(
" {:6.2f} {}-{} {:7.4f} {:11.4f} {:+10.4f} {:9.2f}"
.format(
K, hm(a), hm(b), d_a, gpart, charm, abs(charm) / gpart
)
)
print(
"\nReading: at 10:00 the clock term is 5-19 % of the price term;"
" in the"
)
print(
"last hour it is of the same order. An out-of-the-money call loses"
" delta on"
)
print(
"the clock alone, so a dealer long calls buys back hedge shares with"
" no price"
)
print(
"move at all. In this grid the clock term never exceeds the price"
" term."
)
# One-hour 1-sd price move: 0.494 (= 0.494 %)
#
# Change in the hedge of ONE call over each window
# strike window delta |gamma part| charm part charm/gamma
# 100.25 10:00-11:00 0.4207 0.1596 -0.0079 0.05
# 100.25 14:00-15:00 0.3617 0.2650 -0.0542 0.20
# 100.25 15:00-15:45 0.3076 0.3045 -0.1511 0.50
# 100.25 15:30-15:54 0.2380 0.2768 -0.1829 0.66
# 100.50 10:00-11:00 0.3424 0.1500 -0.0145 0.10
# 100.50 14:00-15:00 0.2388 0.2192 -0.0818 0.37
# 100.50 15:00-15:45 0.1570 0.2081 -0.1352 0.65
# 100.50 15:30-15:54 0.0770 0.1292 -0.0763 0.59
# 101.00 10:00-11:00 0.2073 0.1167 -0.0219 0.19
# 101.00 14:00-15:00 0.0778 0.1029 -0.0556 0.54
# 101.00 15:00-15:45 0.0222 0.0457 -0.0221 0.48
# 101.00 15:30-15:54 0.0022 0.0062 -0.0022 0.36
#
# Reading: at 10:00 the clock term is 5-19 % of the price term; in the
# last hour it is of the same order. An out-of-the-money call loses delta on
# the clock alone, so a dealer long calls buys back hedge shares with no price
# move at all. In this grid the clock term never exceeds the price term.At 10:00 the clock term is a small fraction of the price term: 0.05 to 0.19 of it across the three strikes. In the last hour it becomes of the same order: for the call struck at 100.25, just out of the money, the ratio is 0.50 between 15:00 and 15:45 and 0.66 between 15:30 and 15:54. In this grid it never exceeds the price term.
The direction matters for Chapter 2. A dealer long an out-of-the-money call is short the hedge; as the delta decays on the clock, the dealer buys back shares with no price move at all. The mechanism of strike pinning in the next chapter is partly this flow.
Note
What these tables do not say. They describe the hedge of one option. The flow a market sees is the sum over every dealer’s book, with signs that depend on whether the dealer is long or short each option. A table of one option’s gamma says nothing about that sign, and the sign is the whole question in Chapter 3.
Summary
Gamma near expiry rises as — about twenty times higher with thirty minutes left than with thirty days — and the strike band over which it is large narrows by the same factor, to a fraction of one percent. Expiry-day gamma is a spike, not a wall. In the last hour the clock alone (charm) moves the hedge by an amount of the same order as a typical price move does. None of this says who holds the gamma; that is the next two chapters.
References
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).