5D Library › Dealer Gamma Exposure, Zero-Day Options and Volatility Harvesting Dynamics · 中文
Chapter 6. Variance Swaps: Replication, Skew, Jumps and Convexity
Trading variance directly
Chapters 4 and 5 traded volatility through options with strikes, which mixes a view on volatility with a view on where the price ends up. A variance swap removes the second: at expiry it pays the difference between the realised variance of daily log returns and a strike fixed at the start. It is the cleanest instrument for “volatility harvesting”, and its theory is also the cleanest place to see where the harvest comes from and what it costs.
Calculation
Replication. With zero rates and forward , the payoff of realised variance can be replicated by a static portfolio of out-of-the-money options with weights plus a dynamic position in the forward, which gives the fair variance strike (Carr and Madan 1998; Demeterfi et al. 1999; Britten-Jones and Neuberger 2000). The weights put more on low strikes: per dollar of option price, a strike at 80 counts times as much as a strike at 100.
Calculation
# Chapter 6. Replicating a variance swap with a strip of options (Carr-Madan /
# Demeterfi- Derman-Kamal-Zou). With r = 0 and forward F, the fair variance
# strike is
# K_var = (2 / T) x [ integral_0^F P(K) / K^2 dK + integral_F^inf C(K) / K^2
# dK ].
# A: with a flat smile the strip must return sigma^2; we check the error from
# strike
# spacing and from truncating the strike range.
# B: with a skew the strip prices variance ABOVE at-the-money variance.
# C: the strip replicates realised variance only for continuous paths. A jump
# J in the
# log price pays the hedged strip 2 (e^J - 1 - J), but realised variance
# counts J^2.
import math
F, T = 100.0, 30 / 252
def Phi(x):
return 0.5 * (1.0 + math.erf(x / math.sqrt(2.0)))
def bs(K, sig, call):
sd = sig * math.sqrt(T)
d1 = (math.log(F / K) + 0.5 * sd * sd) / sd
d2 = d1 - sd
return F * Phi(d1) - K * Phi(d2) if call else K * Phi(-d2) - F * Phi(-d1)
def kvar(vol, lo, hi, dk):
n = int(round((hi - lo) / dk))
tot = 0.0
for i in range(n + 1):
K = lo + i * dk
w = 0.5 if i in (0, n) else 1.0
px = bs(K, vol(K), K >= F)
tot += w * px / (K * K) * dk
return 2.0 / T * tot
if __name__ == "__main__":
flat = lambda K: 0.20
print(
"A. Flat 0.20 smile: fair variance strike should be 0.040000 (vol"
" 0.2000)"
)
print(
" strike range spacing K_var implied vol error in vol"
" points"
)
for lo, hi in ((95, 105), (90, 110), (80, 120), (50, 150)):
for dk in (5.0, 1.0, 0.25):
kv = kvar(flat, lo, hi, dk)
print(
" {:>3}-{:<3} {:5.2f} {:.6f} {:.4f} "
" {:+.2f}".format(
lo,
hi,
dk,
kv,
math.sqrt(kv),
100 * (math.sqrt(kv) - 0.20),
)
)
print(
"\nB. Skewed smile: vol(K) = 0.20 - b x ln(K / F), kept between 0.05"
" and 0.60"
)
print(" skew b ATM vol variance-swap vol difference")
for b in (0.0, 0.25, 0.5, 1.0):
sk = lambda K, b=b: min(0.60, max(0.05, 0.20 - b * math.log(K / F)))
kv = kvar(sk, 20, 300, 0.25)
print(" {:5.2f} {:.4f} {:.4f} {:+.4f}".format(
b, sk(F), math.sqrt(kv), math.sqrt(kv) - sk(F)))
print("\nC. One jump of size J in the log price")
print(
" J realised J^2 strip pays 2(e^J-1-J) strip / realised"
)
for J in (-0.20, -0.10, -0.05, 0.05, 0.10):
strip = 2 * (math.exp(J) - 1 - J)
print(
" {:+.2f} {:.6f} {:.6f} {:.4f}".format(
J, J * J, strip, strip / (J * J)
)
)
print(
"\nReading: a down-jump pays the hedged strip LESS than the variance"
" it adds"
)
print(
"(the gap is about J^3 / 3), so the seller of a variance swap who"
" hedges with"
)
print(
"options loses on crashes even when perfectly hedged against"
" diffusion."
)
# A. Flat 0.20 smile: fair variance strike should be 0.040000 (vol 0.2000)
# strike range spacing K_var implied vol error in vol points
# 95-105 5.00 0.031074 0.1763 -2.37
# 95-105 1.00 0.029280 0.1711 -2.89
# 95-105 0.25 0.029211 0.1709 -2.91
# 90-110 5.00 0.040923 0.2023 +0.23
# 90-110 1.00 0.038049 0.1951 -0.49
# 90-110 0.25 0.037937 0.1948 -0.52
# 80-120 5.00 0.043455 0.2085 +0.85
# 80-120 1.00 0.040109 0.2003 +0.03
# 80-120 0.25 0.039978 0.1999 -0.01
# 50-150 5.00 0.043497 0.2086 +0.86
# 50-150 1.00 0.040140 0.2003 +0.03
# 50-150 0.25 0.040009 0.2000 +0.00
#
# B. Skewed smile: vol(K) = 0.20 - b x ln(K / F), kept between 0.05 and 0.60
# skew b ATM vol variance-swap vol difference
# 0.00 0.2000 0.2000 +0.0000
# 0.25 0.2000 0.2030 +0.0030
# 0.50 0.2000 0.2120 +0.0120
# 1.00 0.2000 0.2590 +0.0590
#
# C. One jump of size J in the log price
# J realised J^2 strip pays 2(e^J-1-J) strip / realised
# -0.20 0.040000 0.037462 0.9365
# -0.10 0.010000 0.009675 0.9675
# -0.05 0.002500 0.002459 0.9835
# +0.05 0.002500 0.002542 1.0169
# +0.10 0.010000 0.010342 1.0342
#
# Reading: a down-jump pays the hedged strip LESS than the variance it adds
# (the gap is about J^3 / 3), so the seller of a variance swap who hedges with
# options loses on crashes even when perfectly hedged against diffusion.Section A shows that the formula is exact in principle and fragile in practice. With a flat smile at 0.20, a strip from 50 to 150 at a spacing of 0.25 returns the right answer to two decimal places of a vol point; the same range at a spacing of 5.00 overstates it by +0.86 vol points. Truncation matters more than spacing: a strip from 95 to 105 understates variance by −2.91 vol points however finely it is sampled, because it leaves out the wings that carry the replication. A narrow strip is not a variance swap.
Section B shows where the extra price of variance comes from. With a skewed smile the strip prices variance above at-the-money variance: by +0.0030 at a skew of 0.25 per unit of log-moneyness, +0.0120 at 0.50 and +0.0590 at 1.00. The difference is the market’s price for downside moves, collected through the weight on puts.
Section C is the result that matters most for a seller. The replication holds for continuous paths. A jump in the log price adds to realised variance but pays the hedged strip only , a shortfall of about . A −20 % jump pays the strip 0.9365 of the variance it adds; a −10 % jump, 0.9675. So a variance-swap seller who hedges with the strip loses on every crash even when perfectly hedged against diffusion — the hedge underpays exactly in the event the seller fears. Up-jumps overpay slightly (1.0169 at +5 %), but index jumps are mostly down.
Variance is not volatility squared on average
A volatility swap pays realised volatility rather than variance. A common shortcut quotes its strike as the square root of the variance strike. The fourteenth program shows why that is wrong.
Calculation
# Chapter 6. The variance premium and the convexity of variance. Realised
# 30-day volatility sigma_R is uncertain: ln sigma_R ~ Normal(ln 0.15,
# 0.35^2), plus with probability 0.10 a month contains a gap that adds 0.03^2
# x 12 to annualised variance. A variance swap pays sigma_R^2 - K_var; a
# volatility swap pays sigma_R - K_vol. Question 1: is the fair vol-swap
# strike the square root of the fair variance strike? Question 2: if the
# market quotes variance at the fair value plus a premium, what
# does a SHORT variance swap look like, and a short vol swap at
# the same implied level? 200,000 simulated months, fixed seed.
import math
import random
def months(n, rng):
out = []
for _ in range(n):
s = math.exp(rng.gauss(math.log(0.15), 0.35))
v = s * s + (0.03 ** 2 * 12 if rng.random() < 0.10 else 0.0)
out.append(v)
return out
def summary(p):
n = len(p)
m = sum(p) / n
sd = math.sqrt(sum((x - m) ** 2 for x in p) / (n - 1))
sk = sum((x - m) ** 3 for x in p) / n / sd ** 3
return m, sd, sk, sum(x > 0 for x in p) / n, min(p)
if __name__ == "__main__":
rng = random.Random(56014)
v = months(200000, rng)
ev = sum(v) / len(v)
evol = sum(math.sqrt(x) for x in v) / len(v)
print("1. Fair strikes with no premium")
print(
" fair variance strike E[sigma^2] {:.5f} (vol {:.4f})"
.format(ev, math.sqrt(ev))
)
print(" fair vol-swap strike E[sigma] {:.4f}".format(evol))
print(
" convexity gap sqrt(E[s^2]) - E[s] {:+.4f} ({:.1f} vol"
" points)".format(math.sqrt(ev) - evol, 100 * (math.sqrt(ev) - evol))
)
kvar = ev * 1.30
print("\n2. Market quotes variance 30 % above its fair value:")
print(
" K_var = {:.5f} (implied vol {:.4f})".format(kvar, math.sqrt(kvar))
)
print(
" payoff per month, scaled so each position has vega 1 at the"
" implied vol"
)
print(
" position mean sd skew win rate "
" worst"
)
var_p = [(kvar - x) / (2 * math.sqrt(kvar)) for x in v]
vol_p = [math.sqrt(kvar) - math.sqrt(x) for x in v]
vol_fair = [
evol * (math.sqrt(kvar) / math.sqrt(ev)) - math.sqrt(x) for x in v
]
for name, p in (("short variance swap at K_var", var_p),
("short vol swap at sqrt(K_var)", vol_p),
("short vol swap, same % premium", vol_fair)):
m, sd, sk, w, lo = summary(p)
print(
" {:<32}{:+.4f} {:.4f} {:+5.2f} {:6.3f} {:+.4f}".format(
name, m, sd, sk, w, lo
)
)
print(
"\nReading: quoting a vol swap at the square root of the variance"
" strike"
)
print(
"overprices it by the convexity gap, which a seller collects as if it"
" were"
)
print(
"premium. At a like-for-like premium the short variance swap"
" carries the"
)
print("heavier left tail, because variance is convex in volatility.")
# 1. Fair strikes with no premium
# fair variance strike E[sigma^2] 0.02991 (vol 0.1729)
# fair vol-swap strike E[sigma] 0.1630
# convexity gap sqrt(E[s^2]) - E[s] +0.0099 (1.0 vol points)
#
# 2. Market quotes variance 30 % above its fair value:
# K_var = 0.03888 (implied vol 0.1972)
# payoff per month, scaled so each position has vega 1 at the implied vol
# position mean sd skew win rate worst
# short variance swap at K_var +0.0228 0.0588 -2.79 0.766 -1.4574
# short vol swap at sqrt(K_var) +0.0342 0.0578 -1.08 0.766 -0.5862
# short vol swap, same % premium +0.0228 0.0578 -1.08 0.709 -0.5975
#
# Reading: quoting a vol swap at the square root of the variance strike
# overprices it by the convexity gap, which a seller collects as if it were
# premium. At a like-for-like premium the short variance swap carries the
# heavier left tail, because variance is convex in volatility.With no premium at all, the fair variance strike corresponds to a volatility of 0.1729, but the fair volatility-swap strike is 0.1630: a convexity gap of +0.0099, about 1.0 vol points. By Jensen’s inequality, , with equality only if volatility is certain. A volatility swap quoted at is overpriced by that gap, and a seller collects it as if it were premium.
Part 2 then quotes variance 30 % above its fair value and compares three short positions with the same vega. The short variance swap and the short volatility swap at a like-for-like premium have the same mean, +0.0228 a month, but the variance swap’s skew is −2.79 against −1.08 and its worst month is −1.4574 against −0.5975. Because variance is convex in volatility, the seller of variance is short that convexity: the same premium, a heavier left tail.
Evidence
What is known. Carr and Wu synthesised variance-swap rates from option prices and found the variance risk premium strongly negative for the S&P 500 and the S&P 100 — sellers of variance were paid on average — with the premium varying over time and not explained by standard risk factors (Carr and Wu 2009). The replication formula and its jump error are derived in Demeterfi, Derman, Kamal and Zou (Demeterfi et al. 1999); the model-free implied variance it rests on is due to Carr and Madan and to Britten-Jones and Neuberger (Carr and Madan 1998; Britten-Jones and Neuberger 2000).
What “volatility harvesting” harvests
Put together, the arithmetic of Chapters 4 to 6 says what the harvest is. A seller of variance earns, on average, the difference between implied and realised variance — a real premium for index options over long samples. That premium is paid for carrying three things: the jumps that the replication cannot hedge, the convexity of variance in volatility, and the estimation risk of Chapter 4. A harvest that is quoted without its jump error, its convexity gap and its sizing is not a harvest but a description of the good years.
Hypothesis · not established
The author’s hypothesis (not established): in index data, the realised P&L of a short variance swap hedged with a listed strip, measured over many years, is close to the synthesised variance premium minus a jump-error term that is concentrated in a small number of months; and the share of the total shortfall attributable to those months is larger than the share of months they represent. What would show it to be wrong: a shortfall spread evenly across months, or no shortfall beyond what strip truncation explains.
Summary
A variance swap can be replicated by a strip of options weighted , and the replication is exact for continuous paths but sensitive to the strike range (a narrow strip understates variance by several vol points) and to spacing. Skew raises the fair variance strike above at-the-money variance. A down-jump pays the hedged strip less than the variance it adds, by about , so a hedged seller loses in crashes. A volatility swap is not the square root of a variance swap: Jensen’s inequality opens a convexity gap of about 1.0 vol points in the example, and at a like-for-like premium the short variance position carries the heavier tail. The variance premium is real; it is the price of carrying jumps, convexity and estimation risk, not a free yield.
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).