Handbook of Financial Risk Management Simulations and Case Studies N.H. Chan H.Y. Wong The Chinese University of Hong Kong WILEY
Contents Preface xi 1 An Introduction to Excel VBA 1 1.1 How to Start Excel VBA / 1 1.1.1 Introduction / 1 1.1.2 Visual Basic Editor / 2 1.1.3 The Macro Recorder / 3 1.1.4 Insert a Command Button / 5 1.2 VBA Programming Fundamentals / 8 1.2.1 Declaration of Variables / 8 1.2.2 Types of Variables / 9 1.2.3 Multivariable Declaration / 10 1.2.4 Declaration of Constants /, 10 1.2.5 Operators / 11 1.2.6 User-Defined Data Types / 11 1.2.7 Arrays and Matrices / 13 1.2.8 Data Input and Output / 14 1.2.9 Conditional Statements / 14 1.2.10 Loops / 16
VI CONTENTS 1.3 Linking VBA to C++ / 18 1.4 Sub Procedures and Function Procedures / 19 1.4.1 VBA Built-in Functions / 22 1.4.2 Multiple Linear Regression / 23 1.5 Random Number Generation / 25 1.5.1 Inverse Transform / 25 1.5.2 Acceptance-Rejection Method / 26 1.6 List of Functions Defined in the Book / 28 1.6.1 Constants / 28 v - - 1.6.2 Types / 28 1.6.3 General Functions / 28 1.6.4 Asset Path Simulation Functions / 30 1.6.5 Other Functions / 32 1.6.6 Remarks / 32 2 Background 33 2.1 A Brief Review of Martingales and Ito's Calculus / 34 2.1.1 Martingales / 34 2.1.2 Brownian Motion / 35 2.1.3 Ito's Process and Ito's Lemma / 39 2.1.4 Discretization Methods / 41 2.1.5 The Black-Scholes Equation and Risk-Neutral Valuation / 43 2.1.6 Change of Measures / 47 2.2 Volatility / 50 2.3 Mark to Market and Calibration / 53 2.3.1 Marking to Market / 53 2.3.2 Calculation of MTM Values / 54 2.3.3 Calibration / 55 2.4 Variance Reduction Techniques / 55 2.4.1 A Brief Review of Variance Reduction Techniques / 55 2.4.2 Pricing a Call Option / 68 3 Structured Products 71 3.1 When Is Simulation Unnecessary? / 72 3.1.1 Portfolio Replication Pricing / 72 3.1.2 Equity-Linked Notes / 72 3.2 Simulation of Black-Scholes Model and European Options / 73
CONTENTS VII 3.3 American Options / 79 3.3.1 Empirical Martingale Correction / 87 3.4 Range Accrual Notes / 89 3.4.1 Possible Design and Sample Term Sheet / 89 3.4.2 Closed-Form Solution for European RAN Under Black-Scholes Model / 89 3.4.3 Callable and American Features / 91 3.5 FX Accumulator: The Case of Citic Pacific LTD / 95 3.5.1 Event Playback / 95. 3.5.2 Structure of an Accumulator / 97 3.5.3 Accumulator Valuation / 97 3.5.4 Sensitivity Analysis / 103 3.6 Life Insurance Contracts / 105 3.6.1 Introduction / 105 3.6.2 Typical Contract Structures / 105 3.6.3 Simulation Algorithms / 107 3.7 Multi-Asset Instruments / 108 3.7.1 Multi-Asset Range Accrual Equity-Linked Notes / 112 3.7.2 Currency-Translated Products / 116 4 Volatility Modeling 121 4.1 Local Volatility Models: Simulation and Binomial Tree / 122 4.1.1 Calibration of Local Volatility Function and Dupire Equation / 123 4.1.2 Implied Binomial Tree / 130 4.2 The Heston Stochastic Volatility Model / 135 4.2.1 The Heston Model and Option Pricing / 136 4.2.2 Model Calibration and Implementation / 138 4.2.3 Calibration to European Options: Differential Evolution 1 / 139 4.3 Simulation of Exotic Option Prices under Heston Model / 143 4.3.1 Heston Stochastic Volatility Model Simulation Methods: Quadratic-Exponential Discretization Scheme / 143 4.3.2 QE Discretization Scheme for V(i) I 145 4.3.3 QE Discretization Scheme for S(0 / 146 4.3.4 Performance Analysis of the QE Scheme / 148 4.3.5 CITIC Case Study Revisited / 150 4.4 The GARCH Option Pricing Model / 156 4.4.1 Estimation of Model Parameters / 157
Vlll CONTENTS 4.4.2 Identification of the Risk-Neutral Process / 161 4.4.3 Pricing Exotics / 163 4.5 Jump-Diffusion Model / 164 4.5.1 Simulation of Asset Price Paths and Product Valuation / 167 4.5.2 Estimation of Jump-Diffusion / 171 5 Fixed-Income Derivatives I: Short-Rate Models 177 5.1 Yield Curve Building / 179 5.1.1 Building the Forward Rate Curve / 192 5.2 The Hull-White Model / 194 5.2.1 Calibration of the Hull-White Model / 197 5.3 Pricing Interest Rate Products Using the Direction Simulation Approach / 204 5.3.1 Target Redemption Notes / 206 5.3.2 Interest Rate Range Accrual Notes / 207 5.4 Pricing Interest Rate Products Using the Trinomial Tree Approach / 209 5.4.1 Bond Price / 214 5.4.2 Generalized Hull-White Model: The Tree Approach / 214 5.4.3 Simulation Using the Trinomial Tree / 215 5.4.4 Pricing Target Redemption Notes / 216 5.4.5 Pricing Interest Rate Range Accrual Notes / 216 6 Fixed-Income Derivatives II: LIBOR Market Models 217 6.1 LIBOR Market Models / 219 6.1.1 Pricing Formula for Caplets/Caps / 222 6.1.2 Swaption Formula / 224 6.2 Calibration to Caps and Swaptions / 227 6.3 Simulation Across Different Forward Measures / 241 6.4 Bermudan Swaptions in a Three-Factor Model / 249 6.5 Epilogue / 252 7 Credit Derivatives and Counterparty Credit Risk 255 7.1 Structural Models of Credit Risk / 256 7.1.1 The Merton Model / 256 7.1.2 First Passage Time Model / 259 7.2 The Vasicek Single-Factor Model / 260 7.2.1 Credit Portfolio Management / 261 7.2.2 Pricing Collateralized Debt Obligations / 266
CONTENTS IX 7.3 Copula Approach to Credit Derivative Pricing / 272 7.3.1 Basic Concepts of Copulas / 273 7.3.2 The Gaussian Copula and f-copula / 274 7.3.3 Modeling Joint Default Times with Copulas / 278 7.3.4 Pricing Basket Default Swaps / 280 7.4 Counterparty Credit Risk / 286 7.4.1 Exposure in Trading Derivatives with a Counterparty / 287 7.4.2 Counterparty-Level Exposure / 288 7.4.3 Collateral Modeling for Margined Portfolios / 289 7.4.4 Credit Value Adjustment / 290 7.4.5 Independence of Probability of Default and Exposure / 291 7.4.6 Modeling Right-Way and Wrong-Way Risks / 298 8 Value-at-Risk and Related Risk Measures 303 8.1 Value-at-Risk / 304 8.2 Parametric VaR / 305 8.2.1 Two-Asset Case / 306 8.2.2 Heavy-Tailed Distribution / 307 8.2.3 Holding Period Adjustment / 312-8.2.4 Portfolio VaR / 312 8.3 Delta-Normal Approximation / 314 8.3.1 Option VaR / 314 8.3.2 Fixed-Income VaR / 316 8.4 Delta-Gamma Approximation / 317 8.4.1 Option VaR / 317 8.4.2 Fixed-Income VaR / 318 8.5 VaR Simulation Methods / 319 8.5.1 Historical Simulation / 319 8.5.2 Advantages and Disadvantages / 322 8.5.3 Monte Carlo Simulation / 323 8.5.4 Gibbs Sampling and Multivariate Normal Distribution / 327 8.5.5 Advantages and Disadvantages / 331 8.6 VaR-Related Risk Measures / 332 8.6.1 Conditional Value-at-Risk / 333 8.6.2 CVaR Distribution / 335 8.6.3 Marginal, Incremental, and Component VaRs / 335 8.6.4 VaR and CVaR in Local Volatility Models / 337
X CONTENTS 8.7 VaR Back-Testing / 339 8.7.1 Back-Testing of VaR Models / 340 9 The Greeks 343 9.1 Black-Scholes Greeks / 346 9.2 Greeks in a Binomial Tree / 348 9.3 Finite Difference Approximation / 350 9.4 Likelihood Ratio Method / 355 9.5 Pathwise Derivative Estimates / 360 - - 9.5.1 Application to European Options / 360 9.5.2 Application to Multi-Asset Derivatives / 365 9.5.3 Application to Interest Rate Derivatives in LIBOR Market Model / 367 9.5.4 Problem with the Adjoint Method / 373 9.6 Greek Calculation with Discontinuous Payoffs / 374 9.6.1 Functional Approximation for Digital Options / 374 9.6.2 Vibrato Method for Digital Options / 376 9.6.3 Multivariate Generalization / 379 Appendix 381 References 401 Author Index 405 Subject Index 407