Day 253 — The greeks, analytically and by finite difference
Friday, 16 April 2027 · Week 37 of 52 · Derivatives · Study day · 60 min
Five sensitivities, each with a closed form and each computable numerically, and having both means every one of them is checked rather than trusted.
What you should be able to do tonight
- Implement delta, gamma, vega, theta and rho analytically and confirm each against a central finite difference.
- Say what each greek is a sensitivity to and which two are not derivatives with respect to a market variable.
Tasks 60 min
35 min Implement all five in qlib/derivatives/greeks.py and check each against a central finite difference of your own pricer across a grid of moneyness and maturity. Report the maximum relative discrepancy. The check catches the sign and factor errors that are otherwise invisible until a hedge loses money.
25 min Note what vega and rho are: sensitivities to model parameters rather than to state variables, which means they measure model risk rather than market risk in a strict reading. Then plot delta and gamma against moneyness for three maturities and describe the shapes in words, since you will be asked to sketch them.
Resources
Deliverable
qlib/derivatives/greeks.py with five greeks agreeing with finite differences, and delta and gamma plotted against moneyness at three maturities.
Checkpoint
Sketch gamma against moneyness for a one-week and a one-year option, and say which is taller and why.
Prepare for tomorrow
Ten minutes tonight so Day 254, Saturday, 17 April 2027 starts clean. This is what the evening email sends you.
Simulate one price path and hedge a short call along it, rebalancing daily to be delta neutral.
Record the final profit and loss.
One path is not a result. Tomorrow you run ten thousand.