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

Chapter 5. Buying the Tail Back, Hedging in Discrete Time, and the Net Sharpe Ratio

Protection that costs more than it is worth

Chapter 4 ended with a strategy whose expectation is positive and whose sizing is fragile. The usual remedy is to buy back the tail: long wings that turn a strangle into an iron condor, or a small position in far out-of-the-money options that pays off convexly in a crash. Traders often implement the second with VIX calls bought in a ratio against the short options. This book does not model VIX options themselves, which would need a model of the term structure of volatility; it represents their crash-day payoff with far out-of-the-money index puts, which is the part of their behaviour that matters here.

To make the comparison fair, the tenth program prices every option, sold or bought, at its true value under the model plus the same 25 % markup. Selling therefore earns a premium, and every protective wing costs more than it is worth on average. If protection still helps, it helps despite being overpriced.

Calculation

# Chapter 5. Buying the tail back. Same true model as p07-p09. Every option,
# sold or bought, is quoted at its true (Merton) value plus the same 25 %
# markup, so selling earns a premium and every protective wing costs more than
# it is worth on average. (With a 25 % markup the short strangle's premium is
# close to p07's 0.17 quote.) Compared on the same 200 simulated years: mean
# P&L, Sharpe, worst day, skew, and the growth-optimal leverage with its
# growth rate - the fair yardstick for a skewed bet, because a hedge that
# lowers the mean can still raise what can safely be levered.
import math
import random

T = 1 / 252
SIG, LAM, MJ, SJ = 0.15, 3.0, -0.03, 0.015
SD = SIG * math.sqrt(T)

def Phi(x):
    return 0.5 * (1.0 + math.erf(x / math.sqrt(2.0)))

MARKUP = 0.25

def bs_s(S, K, sig, call):
    sd = sig * math.sqrt(T)
    d1 = (math.log(S / K) + 0.5 * sd * sd) / sd
    d2 = d1 - sd
    return S * Phi(d1) - K * Phi(d2) if call else K * Phi(-d2) - S * Phi(-d1)

def merton(K, call):
    k = math.exp(MJ + 0.5 * SJ * SJ) - 1
    tot = 0.0
    for n in range(8):
        w = math.exp(-LAM * T) * (LAM * T) ** n / math.factorial(n)
        sig_n = math.sqrt(SIG * SIG + n * SJ * SJ / T)
        S_n = 100.0 * math.exp(n * (MJ + 0.5 * SJ * SJ) - LAM * k * T)
        tot += w * bs_s(S_n, K, sig_n, call)
    return tot

# z = distance in diffusive sd; qty > 0 bought
def leg(z, call, qty):
    K = 100.0 * math.exp(z * SD if call else -z * SD)
    return (K, call, qty, merton(K, call) * (1 + MARKUP))

STRUCTURES = {
    "naked strangle":            [leg(1.45, False, -1), leg(1.45, True, -1)],
    "condor, wings 3.0 sd":      [leg(1.45, False, -1), leg(1.45, True, -1),
                                  leg(3.0, False, 1), leg(3.0, True, 1)],
    "condor, wings 2.2 sd":      [leg(1.45, False, -1), leg(1.45, True, -1),
                                  leg(2.2, False, 1), leg(2.2, True, 1)],
    "strangle + 2 puts 4.5 sd":  [leg(1.45, False, -1), leg(1.45, True, -1),
                                  leg(4.5, False, 2)],
}

def pnl(struct, ST):
    tot = 0.0
    for K, call, q, px in struct:
        pay = max(ST - K, 0) if call else max(K - ST, 0)
        tot += q * (pay - px)
    return tot

def kelly(sample):
    best = (0.0, 0.0)
    for i in range(1, 1200):
        L = i * 0.05
        g, ok = 0.0, True
        for p in sample:
            y = 1 + L * p / 100
            if y <= 0:
                ok = False
                break
            g += math.log(y)
        if not ok:
            break
        g = g / len(sample) * 252
        if g > best[1]:
            best = (L, g)
    return best

if __name__ == "__main__":
    rng = random.Random(56010)
    P_JUMP = 1 - math.exp(-LAM * T)
    COMP = -LAM * (math.exp(MJ + 0.5 * SJ * SJ) - 1) * T
    days = []
    for _ in range(252 * 200):
        x = -0.5 * SIG * SIG * T + COMP + rng.gauss(0, SIG * math.sqrt(T))
        if rng.random() < P_JUMP:
            x += rng.gauss(MJ, SJ)
        days.append(100 * math.exp(x))
    print(
        "leg prices (true value x 1.25): put 1.45 sd {:.4f}, put 3.0 sd"
        " {:.4f},\nput 4.5 sd {:.5f}".format(
            STRUCTURES["naked strangle"][0][3],
            STRUCTURES["condor, wings 3.0 sd"][2][3],
            STRUCTURES["strangle + 2 puts 4.5 sd"][2][3],
        )
    )
    print("\nprem = net premium, mean = mean P&L, SR = Sharpe a year,")
    print("L* = Kelly fraction, growth = log growth at L*")
    print("{:<24} {:>6} {:>7} {:>5} {:>5} {:>6} {:>6} {:>6}".format(
        "structure", "prem", "mean", "SR", "skew", "worst", "L*", "growth"))
    for name, st in STRUCTURES.items():
        prem = -sum(q * px for _, _, q, px in st)
        p = [pnl(st, s) for s in days]
        m = sum(p) / len(p)
        sd = math.sqrt(sum((x - m) ** 2 for x in p) / (len(p) - 1))
        sk = sum((x - m) ** 3 for x in p) / len(p) / sd ** 3
        L, g = kelly(p[:252 * 60])
        print(
            "{:<24} {:6.4f} {:+7.4f} {:+5.2f} {:+5.2f} {:6.3f} {:6.2f}"
            " {:+6.3f}".format(
                name, prem, m, m / sd * math.sqrt(252), sk, min(p), L, g
            )
        )
    print(
        "\n(Kelly computed on the first 60 of the 200 years to keep the run"
    )
    print("short.)")
# leg prices (true value x 1.25): put 1.45 sd 0.0608, put 3.0 sd 0.0116,
# put 4.5 sd 0.00357
#
# prem = net premium, mean = mean P&L, SR = Sharpe a year,
# L* = Kelly fraction, growth = log growth at L*
# structure                  prem    mean    SR  skew  worst     L* growth
# naked strangle           0.1027 +0.0192 +0.94 -7.61 -6.689  12.70 +0.404
# condor, wings 3.0 sd     0.0906 +0.0171 +1.15 -3.95 -1.405  25.20 +0.620
# condor, wings 2.2 sd     0.0733 +0.0140 +1.31 -2.98 -0.648  40.30 +0.781
# strangle + 2 puts 4.5 sd 0.0956 +0.0182 +1.09 -5.04 -2.740  19.35 +0.516
#
# (Kelly computed on the first 60 of the 200 years to keep the run
# short.)

The protective structures all have lower means than the naked strangle (+0.0171, +0.0140 and +0.0182 against +0.0192): overpriced insurance costs money, as it must. But they have higher Sharpe ratios (+1.15, +1.31, +1.09 against +0.94), much smaller worst days (−1.405 for the 3.0-sd condor against −6.689), and — the decisive column — higher growth at their own optimal leverage: +0.620 for the 3.0-sd condor and +0.781 for the 2.2-sd condor, against +0.404 for the naked strangle.

The mechanism is the one Chapter 4 identified. The naked strangle’s safe size is capped by its worst day. Capping the worst day lets the same capital carry more of the edge: the optimal leverage rises from 12.70 to 25.20 and 40.30. Protection does not raise the return per unit of notional; it raises the notional that can be carried.

Note

Two cautions on that column. First, the higher optimal leverages are themselves estimated from a sample, and Chapter 4 showed how unstable such estimates are; a book that runs a condor at 40 times notional is betting on the wings being where the sample says the tail is. Second, a condor’s maximum loss is capped only at expiry and only if the wings can be bought at all; in a gap the wings’ price is irrelevant, but in a slow decline the margin on 40 times notional is not.

Hedging in discrete time

The options in Chapter 4 were not delta-hedged; that is how retail strangles are usually run. A dealer who sells an option and hedges it faces a different cost: the hedge can only be adjusted at discrete times, and every adjustment pays a spread. The eleventh program sells a 30-day at-the-money call at a fair Black-Scholes price and hedges it NN times in a world where the price really follows geometric Brownian motion, so any P&L is hedging error.

Calculation

# Chapter 5. The cost of hedging in discrete time. A dealer sells one
# 30-trading-day at-the-money call at a Black-Scholes price with sigma = 0.20
# and hedges its delta N times over the option's life. The underlying really
# is geometric Brownian motion with sigma = 0.20, so the option is fairly
# priced and any P&L is hedging error. Each share traded costs a proportional
# fee c (one-way, as a fraction of price). 4,000 simulated paths per N, fixed
# seed. Compared with the approximation
#   sd(P&L) ~ sqrt(pi / 4) x vega x sigma / sqrt(N)   (Kamal and Derman).
import math
import random

S0, K, SIG, TT = 100.0, 100.0, 0.20, 30 / 252

def Phi(x):
    return 0.5 * (1.0 + math.erf(x / math.sqrt(2.0)))

def d1(S, T):
    return (math.log(S / K) + 0.5 * SIG * SIG * T) / (SIG * math.sqrt(T))

def call(S, T):
    a = d1(S, T)
    return S * Phi(a) - K * Phi(a - SIG * math.sqrt(T))

def run(N, c, rng, paths=4000):
    dt = TT / N
    res, costs = [], []
    for _ in range(paths):
        S = S0
        cash = call(S0, TT)
        h = Phi(d1(S0, TT))
        cash -= h * S
        cost = c * h * S
        for i in range(1, N):
            S *= math.exp(
                -0.5 * SIG * SIG * dt + SIG * math.sqrt(dt) * rng.gauss(0, 1)
            )
            h_new = Phi(d1(S, TT - i * dt))
            cash -= (h_new - h) * S
            cost += c * abs(h_new - h) * S
            h = h_new
        S *= math.exp(
            -0.5 * SIG * SIG * dt + SIG * math.sqrt(dt) * rng.gauss(0, 1)
        )
        res.append(cash + h * S - max(S - K, 0) - cost)
        costs.append(cost)
    m = sum(res) / paths
    sd = math.sqrt(sum((x - m) ** 2 for x in res) / (paths - 1))
    return m, sd, sum(costs) / paths

if __name__ == "__main__":
    rng = random.Random(56011)
    vega = (
        S0
        * math.sqrt(TT)
        * math.exp(-0.5 * d1(S0, TT) ** 2)
        / math.sqrt(2 * math.pi)
    )
    print(
        "option price {:.4f}; vega {:.3f} per unit of volatility".format(
            call(S0, TT), vega
        )
    )
    print("\nA. No trading costs")
    print("   rebalances N   sd of P&L   approximation   ratio")
    for N in (5, 10, 30, 120, 480):
        m, sd, _ = run(N, 0.0, rng)
        ap = math.sqrt(math.pi / 4) * vega * SIG / math.sqrt(N)
        print(
            "   {:>8}       {:7.4f}      {:7.4f}      {:5.2f}".format(
                N, sd, ap, sd / ap
            )
        )
    print("\nB. With a one-way cost of 2 basis points per share traded")
    print("   rebalances N   mean P&L   mean cost   sd of P&L   mean - 1 sd")
    for N in (5, 10, 30, 120, 480, 1920):
        m, sd, cst = run(N, 0.0002, rng)
        print(
            "   {:>8}      {:+8.4f}    {:7.4f}    {:7.4f}     {:+8.4f}"
            .format(N, m, cst, sd, m - sd)
        )
    print(
        "\nReading: halving the hedging error needs four times the"
        " rebalancing, while"
    )
    print(
        "the trading cost keeps rising with N; past some point more hedging"
        " buys"
    )
    print("less risk than it costs.")
# option price 2.7524; vega 13.757 per unit of volatility
#
# A. No trading costs
#    rebalances N   sd of P&L   approximation   ratio
#           5        1.0157       1.0904       0.93
#          10        0.7373       0.7711       0.96
#          30        0.4347       0.4452       0.98
#         120        0.2205       0.2226       0.99
#         480        0.1117       0.1113       1.00
#
# B. With a one-way cost of 2 basis points per share traded
#    rebalances N   mean P&L   mean cost   sd of P&L   mean - 1 sd
#           5       -0.0188     0.0224     1.0148      -1.0336
#          10       +0.0087     0.0289     0.7188      -0.7102
#          30       -0.0501     0.0447     0.4429      -0.4930
#         120       -0.0760     0.0798     0.2228      -0.2987
#         480       -0.1503     0.1503     0.1265      -0.2767
#        1920       -0.2889     0.2893     0.1180      -0.4069
#
# Reading: halving the hedging error needs four times the rebalancing, while
# the trading cost keeps rising with N; past some point more hedging buys
# less risk than it costs.

Section A confirms the classical result (Boyle and Emanuel 1980; Kamal and Derman 1999): the standard deviation of the hedging error falls as 1/N1/\sqrt N, and the approximation π/4νσ/N\sqrt{\pi/4}\,\nu\,\sigma/\sqrt N, with ν\nu the option’s vega, is within 7 % at N=5N = 5 (ratio 0.93) and essentially exact by N=480N = 480 (ratio 1.00). Halving the error needs four times as many trades.

Section B adds a one-way cost of 2 basis points per share. The mean cost rises from 0.0224 at N=5N = 5 to 0.1503 at N=480N = 480 and 0.2893 at N=1920N = 1920, growing roughly as N\sqrt N, the scaling Leland identified (Leland 1985). Taking “mean minus one standard deviation” as a crude risk-adjusted score, the best of the six frequencies tried is N=480N = 480 (−0.2767); at N=1920N = 1920 the score worsens to −0.4069, because the extra trades cost more than the risk they remove — and the cost itself, being path-dependent, adds variance (the standard deviation stops falling, 0.1180 against 0.1265).

For a 0DTE seller the same arithmetic is harsher: a one-day option has hours, not weeks, over which to spread its rebalancing, and its gamma is concentrated (Chapter 1), so each rebalance is larger.

The net Sharpe ratio

The twelfth program puts the remaining cost in: every option contract traded pays a fixed amount per 100 of underlying (half the bid-ask spread plus commission).

Calculation

# Chapter 5. Net Sharpe after trading costs, and how precisely one year can
# measure it. Same model and the same four structures as p10 (every option at
# true value + 25 %). Each option contract traded costs a fixed amount per 100
# of underlying (half-spread plus commission), counted per contract: strangle
# 2, condor 4, strangle plus two puts 4. Sharpe standard error over one year
# of daily trades: iid-normal formula, and the version that allows for
# skewness g3 and kurtosis g4 of the per-trade P&L (Mertens):
#   Var(SR per trade) = (1 - g3 SR + (g4 - 1) / 4 x SR^2) / n
import math
import random

T = 1 / 252
SIG, LAM, MJ, SJ = 0.15, 3.0, -0.03, 0.015
SD = SIG * math.sqrt(T)
MARKUP = 0.25

def Phi(x):
    return 0.5 * (1.0 + math.erf(x / math.sqrt(2.0)))

def bs_s(S, K, sig, call):
    sd = sig * math.sqrt(T)
    d1 = (math.log(S / K) + 0.5 * sd * sd) / sd
    d2 = d1 - sd
    return S * Phi(d1) - K * Phi(d2) if call else K * Phi(-d2) - S * Phi(-d1)

def merton(K, call):
    k = math.exp(MJ + 0.5 * SJ * SJ) - 1
    tot = 0.0
    for n in range(8):
        w = math.exp(-LAM * T) * (LAM * T) ** n / math.factorial(n)
        sig_n = math.sqrt(SIG * SIG + n * SJ * SJ / T)
        S_n = 100.0 * math.exp(n * (MJ + 0.5 * SJ * SJ) - LAM * k * T)
        tot += w * bs_s(S_n, K, sig_n, call)
    return tot

def leg(z, call, qty):
    K = 100.0 * math.exp(z * SD if call else -z * SD)
    return (K, call, qty, merton(K, call) * (1 + MARKUP))

STRUCTURES = {
    "naked strangle":            [leg(1.45, False, -1), leg(1.45, True, -1)],
    "condor, wings 3.0 sd":      [leg(1.45, False, -1), leg(1.45, True, -1),
                                  leg(3.0, False, 1), leg(3.0, True, 1)],
    "condor, wings 2.2 sd":      [leg(1.45, False, -1), leg(1.45, True, -1),
                                  leg(2.2, False, 1), leg(2.2, True, 1)],
    "strangle + 2 puts 4.5 sd":  [leg(1.45, False, -1), leg(1.45, True, -1),
                                  leg(4.5, False, 2)],
}

def moments(p):
    n = len(p)
    m = sum(p) / n
    sd = math.sqrt(sum((x - m) ** 2 for x in p) / (n - 1))
    g3 = sum((x - m) ** 3 for x in p) / n / sd ** 3
    g4 = sum((x - m) ** 4 for x in p) / n / sd ** 4
    return m, sd, g3, g4

if __name__ == "__main__":
    rng = random.Random(56012)
    P_JUMP = 1 - math.exp(-LAM * T)
    COMP = -LAM * (math.exp(MJ + 0.5 * SJ * SJ) - 1) * T
    days = []
    for _ in range(252 * 200):
        x = -0.5 * SIG * SIG * T + COMP + rng.gauss(0, SIG * math.sqrt(T))
        if rng.random() < P_JUMP:
            x += rng.gauss(MJ, SJ)
        days.append(100 * math.exp(x))
    print("A. Annualised net Sharpe by cost per contract (points per 100 of")
    print("underlying). n = contracts, gross = gross mean, breakeven = cost")
    print("per contract at which the net mean is 0")
    print("   {:<24}{:>2} {:>8} {:>6} {:>6} {:>6} {:>6} {:>9}".format(
        "structure", "n", "gross", "0.000", "0.002", "0.005", "0.010",
        "breakeven"))
    gross = {}
    for name, st in STRUCTURES.items():
        p = []
        for S in days:
            tot = 0.0
            for K, call, q, px in st:
                tot += q * ((max(S - K, 0) if call else max(K - S, 0)) - px)
            p.append(tot)
        gross[name] = p
        m, sd, _, _ = moments(p)
        legs = sum(abs(q) for _, _, q, _ in st)
        row = ["{:+6.2f}".format((m - c * legs) / sd * math.sqrt(252))
               for c in (0.0, 0.002, 0.005, 0.010)]
        print("   {:<24}{:>2} {:+8.4f} {} {:9.4f}".format(
            name, legs, m, " ".join(row), m / legs))
    print(
        "\nB. How precisely ONE year (252 trades) measures the gross Sharpe"
    )
    print(
        "   structure                  true SR/yr   SE iid-normal   SE"
        " allowing"
    )
    print(
        "                                                           skew &"
        " kurtosis"
    )
    for name, p in gross.items():
        m, sd, g3, g4 = moments(p)
        sr = m / sd
        se_n = math.sqrt((1 + 0.5 * sr * sr) / 252) * math.sqrt(252)
        se_m = math.sqrt(
            (1 - g3 * sr + (g4 - 1) / 4 * sr * sr) / 252
        ) * math.sqrt(252)
        print("   {:<25}  {:+8.2f}       {:8.2f}          {:8.2f}".format(
            name, sr * math.sqrt(252), se_n, se_m))
# A. Annualised net Sharpe by cost per contract (points per 100 of
# underlying). n = contracts, gross = gross mean, breakeven = cost
# per contract at which the net mean is 0
#    structure                n    gross  0.000  0.002  0.005  0.010 breakeven
#    naked strangle           2  +0.0189  +0.93  +0.73  +0.44  -0.05    0.0095
#    condor, wings 3.0 sd     4  +0.0170  +1.15  +0.61  -0.20  -1.56    0.0042
#    condor, wings 2.2 sd     4  +0.0140  +1.31  +0.56  -0.57  -2.44    0.0035
#    strangle + 2 puts 4.5 sd 4  +0.0181  +1.08  +0.60  -0.12  -1.31    0.0045
#
# B. How precisely ONE year (252 trades) measures the gross Sharpe
#    structure                  true SR/yr   SE iid-normal   SE allowing
#                                                            skew & kurtosis
#    naked strangle                +0.93           1.00              1.23
#    condor, wings 3.0 sd          +1.15           1.00              1.14
#    condor, wings 2.2 sd          +1.31           1.00              1.12
#    strangle + 2 puts 4.5 sd      +1.08           1.00              1.18

Section A reverses part of the earlier ranking. With no cost the 2.2-sd condor has the highest Sharpe ratio (+1.31); at a cost of 0.005 per contract it has the lowest (−0.57), because it trades four contracts to collect a small net premium. The naked strangle, with two contracts, survives longest: its break-even cost is 0.0095 per contract against 0.0035 for the narrow condor. Protection that improves the gross Sharpe ratio can destroy the net one, and the cost at which that happens is a few thousandths of a point per contract.

Section B is a warning about the numbers in Section A. Measured over one year, the standard error of an annualised Sharpe ratio is about 1.00 even for normal returns (Lo 2002); allowing for the skewness and kurtosis of these P&L distributions it is 1.12 to 1.23 (Opdyke 2007). Every Sharpe ratio in this chapter is within about one standard error of zero over a single year. One year of a short-volatility record cannot distinguish a strategy with a Sharpe ratio of +1.31 from one with none.

Summary

Priced consistently at more than its true value, tail protection lowers the mean but raises the Sharpe ratio and, more importantly, the growth achievable at optimal size, because capping the worst day lets more of the edge be carried; that benefit depends on leverage estimates that are themselves fragile. Discrete hedging error falls as 1/N1/\sqrt N while trading cost rises roughly as N\sqrt N, so more hedging eventually buys less risk than it costs. After trading costs, the structures with the best gross Sharpe ratios can have the worst net ones, at costs of a few thousandths of a point per contract — and a single year of data measures any of these Sharpe ratios with a standard error of about one.

References

Boyle, Phelim P., and David Emanuel. 1980. “Discretely Adjusted Option Hedges.” Journal of Financial Economics 8 (3): 259–82.
Kamal, Michael, and Emanuel Derman. 1999. “When You Cannot Hedge Continuously: The Corrections of Black–Scholes.” Risk 12 (1): 82–85.
Leland, Hayne E. 1985. “Option Pricing and Replication with Transactions Costs.” The Journal of Finance 40 (5): 1283–301. https://doi.org/10.1111/j.1540-6261.1985.tb02383.x.
Lo, Andrew W. 2002. “The Statistics of Sharpe Ratios.” Financial Analysts Journal 58 (4): 36–52. https://doi.org/10.2469/faj.v58.n4.2453.
Opdyke, J. D. 2007. “Comparing Sharpe Ratios: So Where Are the p-Values?” Journal of Asset Management 8 (5): 308–36.

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