This book is the definitive and most comprehensive guide to modeling derivatives in C++ today. Providing readers with not only the theory and math behind the models, as well as the fundamental concepts of financial engineering, but also actual robust object-oriented C++ code, this is a practical introduction to the most important derivative models used in practice today, including equity (standard and exotics including barrier, lookback, and Asian) and fixed income (bonds, caps, swaptions, swaps, credit) derivatives. The book provides complete C++ implementations for many of the most important derivatives and interest rate pricing models used on Wall Street including Hull-White, BDT, CIR, HJM, and LIBOR Market Model. London illustrates the practical and efficient implementations of these models in real-world situations and discusses the mathematical underpinnings and derivation of the models in a detailed yet accessible manner illustrated by many examples with numerical data as well as real market data. A companion CD contains quantitative libraries, tools, applications, and resources that will be of value to those doing quantitative programming and analysis in C++. Filled with practical advice and helpful tools, Modeling Derivatives in C++ will help readers succeed in understanding and implementing C++ when modeling all types of derivatives.
Justin London is the founder and visionary of GlobalMaxTrading.com (GMT), The World’s Online Financial Supermarket®, a global online trading and financial technology company, as well as GlobalMaxAuctions.com, The World’s Online Trading Exchange ®, a global B2C and B2B auction and trading company. He has analyzed and managed bank corporate loan portfolios using credit derivatives in the Asset Portfolio Management Group of a large bank in Chicago, Illinois. He has developed fixed-income and equity models for trading companies and his own quantitative consulting firm. London has written code and algorithms in C++ to price and hedge various equity and fixed-income derivatives with a focus on building interest rate models. A graduate of the University of Michigan, London has five degrees, including a BA in economics and mathematics, an MA in applied economics, and an MS in financial engineering, computer science, and mathematics, respectively.
Preface.
Acknowledgments.
CHAPTER 1: Black-Scholes and Pricing Fundamentals.
1.1 Forward Contracts.
1.2 Black-Scholes Partial Differential Equation.
1.3 Risk-Neutral Pricing.
1.4 Black-Scholes and Diffusion Process Implementation.
1.5 American Options.
1.6 Fundamental Pricing Formulas.
1.7 Change of Numeraire.
1.8 Girsanov’s Theorem.
1.9 The Forward Measure.
1.10 The Choice of Numeraire.
CHAPTER 2: Monte Carlo Simulation.
2.1 Monte Carlo.
2.2 Generating Sample Paths and Normal Deviates.
2.3 Generating Correlated Normal Random Variables.
2.4 Quasi-Random Sequences.
2.5 Variance Reduction and Control Variate Techniques.
2.6 Monte Carlo Implementation.
2.7 Hedge Control Variates.
2.8 Path-Dependent Valuation.
2.9 Brownian Bridge Technique.
2.10 Jump-Diffusion Process and Constant Elasticity of Variance Diffusion Model.
2.11 Object-Oriented Monte Carlo Approach.
CHAPTER 3: Binomial Trees.
3.1 Use of Binomial Trees.
3.2 Cox-Ross-Rubinstein Binomial Tree.
3.3 Jarrow-Rudd Binomial Tree.
3.4 General Tree.
3.5 Dividend Payments.
3.6 American Exercise.
3.7 Binomial Tree Implementation.
3.8 Computing Hedge Statistics.
3.9 Binomial Model with Time-Varying Volatility.
3.10 Two-Variable Binomial Process.
3.11 Valuation of Convertible Bonds.
CHAPTER 4: Trinomial Trees.
4.1 Use of Trinomial Trees.
4.2 Jarrow-Rudd Trinomial Tree.
4.3 Cox-Ross-Rubinstein Trinomial Tree.
4.4 Optimal Choice of Λ.
4.5 Trinomial Tree Implementations.
4.6 Approximating Diffusion Processes with Trinomial Trees.
4.7 Implied Trees.
CHAPTER 5: Finite-Difference Methods.
5.1 Explicit Difference Methods.
5.2 Explicit Finite-Difference Implementation.
5.3 Implicit Difference Method.
5.4 LU Decomposition Method.
5.5 Implicit Difference Method Implementation.
5.6 Object-Oriented Finite-Difference Implementation.
5.7 Iterative Methods.
5.8 Crank-Nicolson Scheme.
5.9 Alternating Direction Implicit Method.
CHAPTER 6: Exotic Options.
6.1 Barrier Options.
6.2 Barrier Option Implementation.
6.3 Asian Options.
6.4 Geometric Averaging.
6.5 Arithmetic Averaging.
6.6 Seasoned Asian Options.
6.7 Lookback Options.
6.8 Implementation of Floating Lookback Option.
6.9 Implementation of Fixed Lookback Option.
CHAPTER 7: Stochastic Volatility.
7.1 Implied Volatility.
7.2 Volatility Skews and Smiles.
7.3 Empirical Explanations.
7.4 Implied Volatility Surfaces.
7.5 One-Factor Models.
7.6 Constant Elasticity of Variance Models.
7.7 Recovering Implied Volatility Surfaces.
7.8 Local Volatility Surfaces.
7.9 Jump-Diffusion Models.
7.10 Two-Factor Models.
7.11 Hedging with Stochastic Volatility.
CHAPTER 8: Statistical Models.
8.1 Overview.
8.2 Moving Average Models.
8.3 Exponential Moving Average Models.
8.4 GARCH Models.
8.5 Asymmetric GARCH.
8.6 GARCH Models for High-Frequency Data.
8.7 Estimation Problems.
8.8 GARCH Option Pricing Model.
8.9 GARCH Forecasting.
CHAPTER 9: Stochastic Multifactor Models.
9.1 Change of Measure for Independent Random Variables.
9.2 Change of Measure for Correlated Random Variables.
9.3 N-Dimensional Random Walks and Brownian Motion.
9.4 N-Dimensional Generalized Wiener Process.
9.5 Multivariate Diffusion Processes.
9.6 Monte Carlo Simulation of Multivariate Diffusion Processes.
9.7 N-Dimensional Lognormal Process.
9.8 Ito’s Lemma for Functions of Vector-Valued Diffusion Processes.
9.9 Principal Component Analysis.
CHAPTER 10: Single-Factor Interest Rate Models.
10.1 Short Rate Process.
10.2 Deriving the Bond Pricing Partial Differential Equation.
10.3 Risk-Neutral Drift of the Short Rate.
10.4 Single-Factor Models.
10.5 Vasicek Model.
10.6 Pricing Zero-Coupon Bonds in the Vasicek Model.
10.7 Pricing European Options on Zero-Coupon Bonds with Vasicek.
10.8 Hull-White Extended Vasicek Model.
10.9 European Options on Coupon-Bearing Bonds.
10.10 Cox-Ingersoll-Ross Model.
10.11 Extended (Time-Homogenous) CIR Model.
10.12 Black-Derman-Toy Short Rate Model.
10.13 Black’s Model to Price Caps.
10.14 Black’s Model to Price Swaptions.
10.15 Pricing Caps, Caplets, and Swaptions with Short Rate Models.
10.16 Valuation of Swaps.
10.17 Calibration in Practice.
CHAPTER 11: Tree-Building Procedures.
11.1 Building Binomial Short Rate Trees for Black, Derman, and Toy.
11.2 Building the BDT Tree Calibrated to the Yield Curve.
11.3 Building the BDT Tree Calibrated to the Yield and Volatility Curve.
11.4 Building a Hull-White Tree Consistent with the Yield Curve.
11.5 Building a Lognormal Hull-White (Black-Karasinski) Tree.
11.6 Building Trees Fitted to Yield and Volatility Curves.
11.7 Vasicek and Black-Karasinski Models.
11.8 Cox-Ingersoll-Ross Implementation.
11.9 A General Deterministic-Shift Extension.
11.10 Shift-Extended Vasicek Model.
11.11 Shift-Extended Cox-Ingersoll-Ross Model.
11.12 Pricing Fixed Income Derivatives with the Models.
CHAPTER 12: Two-Factor Models and the Heath-Jarrow-Morton Model.
12.1 The Two-Factor Gaussian G2++ Model.
12.2 Building a G2++ Tree.
12.3 Two-Factor Hull-White Model.
12.4 Heath-Jarrow-Morton Model.
12.5 Pricing Discount Bond Options with Gaussian HJM.
12.6 Pricing Discount Bond Options in General HJM.
12.7 Single-Factor HJM Discrete-State Model.
12.8 Arbitrage-Free Restrictions in a Single-Factor Model.
12.9 Computation of Arbitrage-Free Term Structure Evolutions.
12.10 Single-Factor HJM Implementation.
12.11 Synthetic Swap Valuation.
12.12 Two-Factor HJM Model.
12.13 Two-Factor HJM Model Implementation.
12.14 The Ritchken and Sankarasubramanian Model.
12.15 RS Spot Rate Process 623
12.16 Li-Ritchken-Sankarasubramanian Model.
12.17 Implementing an LRS Trinomial Tree.
CHAPTER 13: LIBOR Market Models.
13.1 LIBOR Market Models.
13.2 Specifications of the Instantaneous Volatility of Forward Rates.
13.3 Implementation of Hull-White LIBOR Market Model.
13.4 Calibration of LIBOR Market Model to Caps.
13.5 Pricing Swaptions with Lognormal Forward-Swap Model.
13.6 Approximate Swaption Pricing with Hull-White Approach.
13.7 LFM Formula for Swaption Volatilities.
13.8 Monte Carlo Pricing of Swaptions Using LFM.
13.9 Improved Monte Carlo Pricing of Swaptions with a Predictor-Corrector.
13.10 Incompatibility between LSM and LSF.
13.11 Instantaneous and Terminal Correlation Structures.
13.12 Calibration to Swaption Prices.
13.13 Connecting Caplet and S x 1-Swaption Volatilities.
13.14 Including Caplet Smile in LFM.
13.15 Stochastic Extension of LIBOR Market Model.
13.16 Computing Greeks in Forward LIBOR Models.
CHAPTER 14: Bermudan and Exotic Interest Rate Derivatives.
14.1 Bermudan Swaptions.
14.2 Implementation for Bermudan Swaptions.
14.3 Andersen’s Method.
14.4 Longstaff and Schwartz Method.
14.5 Stochastic Mesh Method.
14.6 Valuation of Range Notes.
14.7 Valuation of Index-Amortizing Swaps.
14.8 Valuation of Trigger Swaps.
14.9 Quanto Derivatives.
14.10 Gaussian Quadrature.
APPENDIX A: Probability Review.
A.1 Probability Spaces.
A.2 Continuous Probability Spaces.
A.3 Single Random Variables.
A.4 Binomial Random Variables.
A.5 Normal Random Variables.
A.6 Conditional Expectations.
A.7 Probability Limit Theorems.
A.8 Multidimensional Case.
A.9 Dirac’s Delta Function.
APPENDIX B: Stochastic Calculus Review.
B.1 Brownian Motion.
B.2 Brownian Motion with Drift and Volatility.
B.3 Stochastic Integrals.
B.4 Ito’s Formula.
B.5 Geometric Brownian Motion.
B.6 Stochastic Leibnitz Rule.
B.7 Quadratic Variation and Covariation.
References.
About the CD-ROM.
GNU General Public License.
Index.