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

第一章 临近到期的伽马:是尖峰,不是墙

伽马是什么,做市商为什么在乎

期权的 Delta 是与它同步变动的股数;伽马(Gamma)是这个股数随价格变化的速度。一个卖出或买入了期权、又不想承担方向风险的做市商,会持有与 Delta 相反的股票头寸,于是价格每动一次,他就必须按伽马交易一次。这笔交易是全书的主题。第二章问它对价格做了什么;本章只问它有多大、落在哪里。

下文全部使用布莱克-斯科尔斯公式 (Black and Scholes 1973),利率取零,价格 100,年波动率 0.20,一年 252 个交易日、每日 6.5 小时。论证不依赖这些数字,它们只是让表格好读。

证据

所用公式。 令 d1=[ln⁡(S/K)+12σ2T]/(σT)d_1 = [\ln(S/K) + \tfrac12\sigma^2 T]/(\sigma\sqrt T),认购期权的 Delta 为 Φ(d1)\Phi(d_1),伽马为 Γ=φ(d1)/(SσT)\Gamma = \varphi(d_1)/(S\sigma\sqrt T);r=0r = 0 时时间衰减为 Θ=−Sφ(d1)σ/(2T)\Theta = -S\varphi(d_1)\sigma/(2\sqrt T),其中 φ\varphi、Φ\Phi 是标准正态的密度与分布函数。这些是教科书结果 (Black and Scholes 1973);程序用 Python 标准库的误差函数计算。

伽马按时间平方根的倒数上升

平值时 d1≈0d_1 \approx 0,所以 Γ≈1/(Sσ2πT)\Gamma \approx 1/(S\sigma\sqrt{2\pi T}):伽马按 1/T1/\sqrt T 上升。第一段程序把它列成表。

推导

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

A 段是大家常引用的部分。一日期权的伽马是 30 日期权的 5.48 倍,只剩三十分钟的期权是 19.76 倍;1/T1/\sqrt T 规则预测 19.75。时间衰减同步上升——那是为这份伽马付的账单。

B、C 两段是通常被略去的部分:伽马较大的行权价区间宽度以同一个倍数收窄。伽马降到平值一半时的半宽,30 日为 +8.726 %,一日为 +1.503 %,三十分钟为 +0.413 %。偏离平值 2% 处,一日期权保留峰值伽马的 0.294,两小时期权只保留 0.018。

所以把零日到期(0DTE)期权说成「伽马墙」只对了一半。伽马确实极大,但到了尾盘只集中在不到百分之一宽的行权价带里。它对价格是否重要,完全取决于价格是否落在这条带里,以及期权在谁手里——那是第三章的主题。

平值伽马随到期时间的变化(左,对数坐标)与四个期限下伽马在行权价上的分布(右):曲线以同一倍数变高、变窄。

Charm:什么都没动,对冲也在动

对冲流的第二个、更安静的来源是时钟。价格不变时,期权的 Delta 仍随到期临近而漂移:虚值认购的 Delta 衰减向零,实值认购的衰减向一。这个变化率叫 charm。第二段程序对单张认购期权,把它与同一时间窗内一次典型价格波动带来的伽马部分作比较。

推导

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

10:00 时时钟项只是价格项的一小部分:三个行权价上为 0.05 到 0.19。到最后一小时,两者变成同一量级:对行权价 100.25(略虚值)的认购,15:00-15:45 的比值为 0.50,15:30-15:54 为 0.66。在这张表的范围内,时钟项从未超过价格项。

方向对第二章很重要。持有虚值认购的做市商持有空头对冲;Delta 随时钟衰减时,他在价格完全不动的情况下回补股票。下一章行权价钉死的机制,部分就来自这股流量。

注

这两张表没有说的。 它们描述的是一张期权的对冲。市场看到的流量是所有做市商账簿的加总,而符号取决于做市商对每张期权是多头还是空头。单张期权的伽马表对这个符号一无所知,而这个符号正是第三章的全部问题。

小结

临近到期的伽马按 1/T1/\sqrt T 上升——剩三十分钟时约为剩三十天时的二十倍——而伽马较大的行权价带以同一倍数收窄到不足百分之一。到期日的伽马是尖峰,不是墙。最后一小时里,光是时钟(charm)带来的对冲变化,就与一次典型价格波动带来的同一量级。这些都没有说伽马在谁手里;那是后面两章的事。

参考文献

Black, Fischer, and Myron Scholes. 1973. “The Pricing of Options and Corporate Liabilities.” Journal of Political Economy 81 (3): 637–54. https://doi.org/10.1086/260062.

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