Paul Glasserrnan Monte Carlo Methods in Financial Engineering With 99 Figures 'Springer Paul Glasserman 403 Uris Hall Graduate School of Business Columbia University New York, NY 10027, USA [email protected] Managing Editors B. Rozovskii M. Yor Denney Research Building 308 Laboratoire de Probabiliu~s Center for Applied Mathematical et Modeles Alcatoires Sciences Universitc de Paris VI University of Southern California 175, rue du Chevaleret 1042 West Thirty-Sixth Place 7 50 13 Paris. France Los Angeles, CA 90089, USA [email protected] Co••er illustration: Cover pauern by courtesy of Rick Durrell, Cornell University, Ithaca, New York. Mathematics Subject Classification (2000): 65C05. 91 Bxx Library of Congress Cataloging-in-Publication Data Glasserrnan. Paul, 1962- Monte Carlo methods in linancial engineering I Paul Glasserman. p. em.-(Applications of mathematics; 53) Includes bibliographical references and index. ISBN 0-387-00451-3 (alk. paper) I. Financial engineering. 2. Derivative securities. 3. Monte Carlo method. I Tttle. II. Series. HGI76.7.G57 2003 658.ts·s·ot519282 -dc21 2003050499 ISBN 0-387-00451-3 Printed on acid-free paper. © 2004 Springer-Verlag New York, Inc. All rights reserved. This work may not be translated or copied in whole or in part without the wriuen permission of the publisher (Springer-Verlag New York. Inc., 175 Fifth Avenue, New York. NY 10010. USA), except for brief excerpts in connection with reviews or scholarly aualysis. Use in connection with any form of information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed is forbidden. The use in this publication of trade names, trademarks. service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights. Primed in the United States of America. (EB) I) 8 7 6 5 4 3 Spnngcr-Verlag is part of Springer Science+Business Media springeronline.com Preface This is a book about Monte Carlo methods from the perspective of financial engineering.Monte Carlosimulationhas become anessentialtoolin the pric- ing of derivative securities and in risk management; these applications have, in turn, stimulated research into new Monte Carlo techniques and renewed interest in some old techniques. This is also a book about financial engineer- ing from the perspective of Monte Carlo methods. One of the best ways to develop an understanding of a model of, say, the term structure of interest rates is to implement a simulation of the model; and finding ways to improve the efficiency of a simulation motivates a deeper investigationinto properties of a model. My intended audience is a mix of graduate students in financial engi- neering, researchers interested in the application of Monte Carlo methods in finance, and practitioners implementing models in industry. This book has grown out of lecture notes I have used over several years at Columbia, for a semester at Princeton, and for a short course at Aarhus University. These classes have been attended by masters and doctoral students in engineering, the mathematical and physical sciences, and finance. The selection of topics has also been influenced by my experiences in developing and delivering pro- fessionaltraining courseswith Mark Broadie,often in collaborationwith Leif Andersen and Phelim Boyle. The opportunity to discuss the use of Monte Carlo methods in the derivatives industry with practitioners and colleagues has helped shaped my thinking about the methods and their application. Students and practitioners come to the area of financial engineering from diverse academic fields and with widely ranging levels of training in mathe- matics, statistics, finance, and computing. This presents a challenge in set- ting the appropriate level for discourse. The most important prerequisite for reading this book is familiarity with the mathematical tools routinely used to specify and analyze continuous-time models in finance. Prior exposure to the basic principles of option pricing is useful but less essential. The tools ofmathematicalfinanceincludeItoˆcalculus,stochasticdifferentialequations, and martingales. Perhaps the most advanced idea used in many places in vi this book is the concept of a change of measure. This idea is so central both to derivatives pricing and to Monte Carlo methods that there is simply no avoidingit.TheprerequisitestounderstandingthestatementoftheGirsanov theorem should suffice for reading this book. Whereasthelanguageofmathematicalfinanceisessentialtoourtopic,its technicalsubtleties areless so for purposes of computationalwork.My use of mathematical tools is often informal: I may assume that a local martingale is a martingale or that a stochastic differential equation has a solution, for example, without calling attention to these assumptions. Where convenient, I take derivatives without first assuming differentiability and I take expecta- tions without verifying integrability. My intent is to focus on the issues most important to Monte Carlo methods and to avoid diverting the discussion to spell out technical conditions. Where these conditions are not evident and where they are essential to understanding the scope of a technique, I discuss themexplicitly.Inaddition,anappendix givesprecisestatementsofthe most important tools from stochastic calculus. This book divides roughly into three parts. The first part, Chapters 1–3, develops fundamentals of Monte Carlo methods. Chapter 1 summarizes the theoretical foundations of derivatives pricing and Monte Carlo. It explains the principles by which a pricing problem can be formulated as an integra- tion problem to which Monte Carlo is then applicable. Chapter 2 discusses random number generation and methods for sampling from nonuniform dis- tributions, tools fundamental to every application of Monte Carlo.Chapter 3 provides an overview of some of the most important models used in financial engineeringanddiscussestheirimplementationbysimulation.Ihaveincluded more discussion of the models in Chapter 3 and the financial underpinnings in Chapter 1 than is strictly necessary to run a simulation. Students often come to a course in Monte Carlo with limited exposure to this material, and the implementationofa simulationbecomes more meaningfulif accompanied by an understanding of a model and its context. Moreover, it is precisely in model details that many of the most interesting simulation issues arise. If the first three chapters deal with running a simulation, the next three deal with ways of running it better. Chapter 4 presents methods for increas- ing precision by reducing the variance of Monte Carlo estimates. Chapter 5 discusses the application of deterministic quasi-Monte Carlo methods for nu- merical integration. Chapter 6 addresses the problem of discretization error that results fromsimulating discrete-time approximationsto continuous-time models. The lastthree chaptersaddresstopics specific to the applicationofMonte Carlomethods in finance.Chapter 7 coversmethods for estimatingprice sen- sitivities or “Greeks.” Chapter 8 deals with the pricing of American options, whichentailssolvinganoptimalstoppingproblemwithinasimulation.Chap- ter9isanintroductiontotheuseofMonteCarlomethodsinriskmanagement. It discusses the measurement of market risk and credit risk in financial port- folios. The models and methods of this final chapter are rather different from vii thoseintheotherchapters,whichdealprimarilywiththepricingofderivative securities. Several people have influenced this book in various ways and it is my pleasure to express my thanks to them here. I owe a particular debt to my frequent collaborators and co-authors Mark Broadie, Phil Heidelberger, and Perwez Shahabuddin. Working with them has influenced my thinking as well as the book’s contents. With Mark Broadie I have had several occasions to collaborateonteachingaswellasresearch,andIhavebenefitedfromourmany discussionsonmostofthe topicsinthisbook.Mark,PhilHeidelberger,Steve Kou, Pierre L’Ecuyer, Barry Nelson, Art Owen, Philip Protter, and Jeremy Staum each commented on one or more draft chapters; I thank them for their comments and apologize for the many good suggestions I was unable to incorporatefully. I have also benefited from workingwith currentand former ColumbiastudentsJingyiLi,NicolasMerener,JeremyStaum,HuiWang,Bin Yu, and Xiaoliang Zhao on some of the topics in this book. Several classes of students helped uncover errors in the lecture notes from which this book evolved. Paul Glasserman New York, 2003 Contents 1 Foundations ............................................... 1 1.1 Principles of Monte Carlo ................................ 1 1.1.1 Introduction ...................................... 1 1.1.2 First Examples.................................... 3 1.1.3 Efficiency of Simulation Estimators .................. 9 1.2 Principles of Derivatives Pricing........................... 19 1.2.1 Pricing and Replication ............................ 21 1.2.2 Arbitrage and Risk-Neutral Pricing.................. 25 1.2.3 Change of Numeraire .............................. 32 1.2.4 The Market Price of Risk........................... 36 2 Generating Random Numbers and Random Variables ..... 39 2.1 Random Number Generation.............................. 39 2.1.1 General Considerations............................. 39 2.1.2 Linear Congruential Generators ..................... 43 2.1.3 Implementation of Linear Congruential Generators .... 44 2.1.4 Lattice Structure.................................. 47 2.1.5 Combined Generators and Other Methods ............ 49 2.2 General Sampling Methods ............................... 53 2.2.1 Inverse Transform Method.......................... 54 2.2.2 Acceptance-Rejection Method....................... 58 2.3 Normal Random Variables and Vectors..................... 63 2.3.1 Basic Properties................................... 63 2.3.2 Generating Univariate Normals ..................... 65 2.3.3 Generating Multivariate Normals.................... 71 3 Generating Sample Paths.................................. 79 3.1 Brownian Motion........................................ 79 3.1.1 One Dimension ................................... 79 3.1.2 Multiple Dimensions............................... 90 3.2 Geometric Brownian Motion .............................. 93 x Contents 3.2.1 Basic Properties................................... 93 3.2.2 Path-Dependent Options ........................... 96 3.2.3 Multiple Dimensions...............................104 3.3 Gaussian Short Rate Models ..............................108 3.3.1 Basic Models and Simulation .......................108 3.3.2 Bond Prices ......................................111 3.3.3 Multifactor Models ................................118 3.4 Square-Root Diffusions...................................120 3.4.1 Transition Density.................................121 3.4.2 Sampling Gamma and Poisson ......................125 3.4.3 Bond Prices ......................................128 3.4.4 Extensions .......................................131 3.5 Processes with Jumps....................................134 3.5.1 A Jump-Diffusion Model ...........................134 3.5.2 Pure-Jump Processes ..............................142 3.6 Forward Rate Models: Continuous Rates ...................149 3.6.1 The HJM Framework ..............................150 3.6.2 The Discrete Drift.................................155 3.6.3 Implementation ...................................160 3.7 Forward Rate Models: Simple Rates .......................165 3.7.1 LIBOR Market Model Dynamics ....................166 3.7.2 Pricing Derivatives ................................172 3.7.3 Simulation........................................174 3.7.4 Volatility Structure and Calibration .................180 4 Variance Reduction Techniques............................185 4.1 Control Variates.........................................185 4.1.1 Method and Examples .............................185 4.1.2 Multiple Controls .................................196 4.1.3 Small-Sample Issues ...............................200 4.1.4 Nonlinear Controls ................................202 4.2 Antithetic Variates ......................................205 4.3 Stratified Sampling ......................................209 4.3.1 Method and Examples .............................209 4.3.2 Applications ......................................220 4.3.3 Poststratification..................................232 4.4 Latin Hypercube Sampling ...............................236 4.5 Matching Underlying Assets ..............................243 4.5.1 Moment Matching Through Path Adjustments ........244 4.5.2 Weighted Monte Carlo .............................251 4.6 Importance Sampling ....................................255 4.6.1 Principles and First Examples ......................255 4.6.2 Path-Dependent Options ...........................267 4.7 Concluding Remarks.....................................276