CONTENTS

Exercise: Delta Hedging P&L Simulation

Problem

A trader sells one ATM European call (S0=K=100S_0 = K = 100, T=0.5T = 0.5 years, σ=0.2\sigma = 0.2, r=0.05r = 0.05, q=0q = 0) and dynamically delta-hedges. They discretise the hedging into NN equally-spaced rebalancing times over [0,T][0, T].

  1. Simulate M=10,000M = 10{,}000 GBM paths of the underlying. For each path, compute the terminal hedged P&L:

    • Initially short 1 call, hold Δ0\Delta_0 shares, cash balance C0Δ0S0C_0 - \Delta_0 S_0.
    • At each rebalancing, update delta to Δt\Delta_t (buy/sell to match). Cash accrues at rate rr.
    • At expiry, pay out (STK)+(S_T - K)_+ on the short call, close the share position at STS_T.

    The final P&L is the remaining cash balance minus the option payoff.

  2. For three discretisation levels N{10,50,250}N \in \{10, 50, 250\}, report the mean and standard deviation of terminal P&L. Verify that mean is close to zero (cost of hedging absorbs the option premium) and std shrinks as NN grows.

  3. Convergence rate. The theoretical hedging-error scaling is std(P&L)1/N\text{std}(\text{P\&L}) \sim 1/\sqrt N. Verify this by plotting std\text{std} vs. NN.
  4. Discussion. What source of residual P&L remains at any finite NN? (Hint: this is the gamma risk — the curvature that first-order delta hedging misses.)

Hint

For simulation, use rng = np.random.default_rng(0) and generate log-returns (μσ2/2)dt+σdtZ(\mu - \sigma^2/2)dt + \sigma\sqrt{dt}Z with ZN(0,1)Z \sim \mathcal{N}(0, 1). Use μ=r\mu = r for risk-neutral pricing and hedging.
Jump to the solution when you're ready.