Contents
Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1. Quantlib Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Instruments and pricing engines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3. Numerical Greeks calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4. Market quotes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Interest-rate curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5. Term structures and their reference dates . . . . . . . . . . . . . . . . . . . . . . . . . 36
6. EONIA curve bootstrapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
7. Euribor curve bootstrapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
8. Constructing Yield Curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
9. Implied term structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
10. Interest-rate sensitivities via zero spread . . . . . . . . . . . . . . . . . . . . . . . . . 97
11. A glitch in forward-rate curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Interest-rate models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
12. Simulating Interest Rates using Hull White Model . . . . . . . . . . . . . . . . . . . . 111
13. Thoughts on the Convergence of Hull-White Model Monte-Carlo Simulations . . . . 116
14. Short Interest Rate Model Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
15. Par versus indexed coupons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
16. Caps and Floors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Equity models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
17. Valuing European Option Using the Heston Model . . . . . . . . . . . . . . . . . . . . 144
18. Valuing European and American Options . . . . . . . . . . . . . . . . . . . . . . . . . 147
19. Valuing Options on Commodity Futures Using The Black Formula . . . . . . . . . . . 152
20. Defining rho for the Black process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
Bonds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
21. Modeling Fixed Rate Bonds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
22. Modeling Callable Bonds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
23. Duration of floating-rate bonds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
24. Treasury Futures Contract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
25. Mischievous pricing conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
26. More mischievous conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
Appendix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Translating QuantLib Python examples to C++ . . . . . . . . . . . . . . . . . . . . . . . . 198