Day 254 — Delta hedging a short option, ten thousand times
Saturday, 17 April 2027 · Week 37 of 52 · Derivatives · Study day · 60 min
The single most instructive simulation in derivatives, because the mean and the variance of the outcome each tell you something different and both are surprising the first time.
What you should be able to do tonight
- Report the distribution of profit from delta hedging a short option when implied and realized volatility are equal.
- Say what the mean should be and what the spread comes from.
Tasks 60 min
35 min Build the simulation in qlib/derivatives/hedge.py: sell a call at an implied volatility, simulate paths at a realized volatility, rebalance delta at a chosen frequency, and accumulate profit and loss including financing on the hedge. Run 10,000 paths with implied equal to realized and report the mean and the standard deviation.
25 min Interpret the two numbers: the mean should be near zero because you sold at fair value, and the spread is entirely discretisation error from hedging at finite frequency. Then vary the rebalancing frequency and show that the spread falls but the mean does not move. That separation is the whole lesson.
Resources
Deliverable
qlib/derivatives/hedge.py with a delta-hedging simulator, and the profit distribution reported across four rebalancing frequencies.
Checkpoint
You hedge a short option and implied equals realized. What is your expected profit, and where does the spread around it come from?
Prepare for tomorrow
Ten minutes tonight so Day 255, Sunday, 18 April 2027 starts clean. This is what the evening email sends you.
Rerun today’s simulation with implied volatility 5 points above realized.
Record the mean profit.
Then guess the formula that predicts it before tomorrow tells you.