Mathematics Hui Wang Monte Carlo Simulation with Applications to Finance M Developed from the author’s course on Monte Carlo simulation at A o Brown University, Monte Carlo Simulation with Applications to p n Finance provides a self-contained introduction to Monte Carlo p t Monte Carlo e l methods in financial engineering. Only requiring some familiarity with i c C probability and statistics, the book keeps much of the mathematics a a at an informal level and avoids technical measure-theoretic jargon to t r Simulation with i l provide a practical understanding of the basics. It includes a large o o number of examples as well as MATLAB® coding exercises that are n S s i designed in a progressive manner so that no prior experience with m Applications to t MATLAB is needed. o u l The author first presents the necessary mathematical tools for F a t simulation, arbitrary free option pricing, and the basic implementation in io Finance of Monte Carlo schemes. He then describes variance reduction a n techniques, including control variates, stratification, conditioning, n w c importance sampling, and cross-entropy. The text concludes with e i t stochastic calculus and the simulation of diffusion processes. h Features • Presents common variance reduction techniques as well as the cross-entropy method • Covers the simulation of diffusion process models • Requires minimal background in mathematics and finance • Contains numerous examples of option pricing, risk analysis, and sensitivity analysis • Includes many hand-and-paper and MATLAB coding exercises at the end of every chapter W a n g K12713 K12713_Cover.indd 1 4/20/12 10:10 AM Monte Carlo Simulation with Applications to Finance K12713_FM.indd 1 4/26/12 5:56 PM CHAPMAN & HALL/CRC Financial Mathematics Series Aims and scope: The field of financial mathematics forms an ever-expanding slice of the financial sector. This series aims to capture new developments and summarize what is known over the whole spectrum of this field. It will include a broad range of textbooks, reference works and handbooks that are meant to appeal to both academics and practitioners. The inclusion of numerical code and concrete real- world examples is highly encouraged. Series Editors M.A.H. Dempster Dilip B. Madan Rama Cont Centre for Financial Research Robert H. Smith School Center for Financial Department of Pure of Business Engineering Mathematics and Statistics University of Maryland Columbia University University of Cambridge New York Published Titles American-Style Derivatives; Valuation and Computation, Jerome Detemple Analysis, Geometry, and Modeling in Finance: Advanced Methods in Option Pricing, Pierre Henry-Labordère An Introduction to Exotic Option Pricing, Peter Buchen Credit Risk: Models, Derivatives, and Management, Niklas Wagner Engineering BGM, Alan Brace Financial Modelling with Jump Processes, Rama Cont and Peter Tankov Interest Rate Modeling: Theory and Practice, Lixin Wu Introduction to Credit Risk Modeling, Second Edition, Christian Bluhm, Ludger Overbeck, and Christoph Wagner Introduction to Stochastic Calculus Applied to Finance, Second Edition, Damien Lamberton and Bernard Lapeyre Monte Carlo Methods and Models in Finance and Insurance, Ralf Korn, Elke Korn, and Gerald Kroisandt Monte Carlo Simulation with Applications to Finance, Hui Wang Numerical Methods for Finance, John A. D. Appleby, David C. Edelman, and John J. H. Miller Option Valuation: A First Course in Financial Mathematics, Hugo D. Junghenn Portfolio Optimization and Performance Analysis, Jean-Luc Prigent Quantitative Fund Management, M. A. H. Dempster, Georg Pflug, and Gautam Mitra Risk Analysis in Finance and Insurance, Second Edition, Alexander Melnikov Robust Libor Modelling and Pricing of Derivative Products, John Schoenmakers Stochastic Finance: A Numeraire Approach, Jan Vecer Stochastic Financial Models, Douglas Kennedy Structured Credit Portfolio Analysis, Baskets & CDOs, Christian Bluhm and Ludger Overbeck Understanding Risk: The Theory and Practice of Financial Risk Management, David Murphy Unravelling the Credit Crunch, David Murphy Proposals for the series should be submitted to one of the series editors above or directly to: CRC Press, Taylor & Francis Group 4th, Floor, Albert House 1-4 Singer Street London EC2A 4BQ UK K12713_FM.indd 2 4/26/12 5:56 PM Monte Carlo Simulation with Applications to Finance Hui Wang Brown University Providence, Rhode Island, USA K12713_FM.indd 3 4/26/12 5:56 PM MATLAB® is a trademark of The MathWorks, Inc. and is used with permission. The MathWorks does not warrant the accuracy of the text or exercises in this book. This book’s use or discussion of MAT- LAB® software or related products does not constitute endorsement or sponsorship by The MathWorks of a particular pedagogical approach or particular use of the MATLAB® software. CRC Press Taylor & Francis Group 6000 Broken Sound Parkway NW, Suite 300 Boca Raton, FL 33487-2742 © 2012 by Taylor & Francis Group, LLC CRC Press is an imprint of Taylor & Francis Group, an Informa business No claim to original U.S. Government works Version Date: 20120518 International Standard Book Number-13: 978-1-4665-6690-3 (eBook - PDF) This book contains information obtained from authentic and highly regarded sources. Reasonable efforts have been made to publish reliable data and information, but the author and publisher cannot assume responsibility for the validity of all materials or the consequences of their use. The authors and publishers have attempted to trace the copyright holders of all material reproduced in this publication and apologize to copyright holders if permission to publish in this form has not been obtained. If any copyright material has not been acknowledged please write and let us know so we may rectify in any future reprint. Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying, microfilming, and recording, or in any information stor- age or retrieval system, without written permission from the publishers. For permission to photocopy or use material electronically from this work, please access www.copy- right.com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization that pro- vides licenses and registration for a variety of users. For organizations that have been granted a pho- tocopy license by the CCC, a separate system of payment has been arranged. Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identification and explanation without intent to infringe. Visit the Taylor & Francis Web site at http://www.taylorandfrancis.com and the CRC Press Web site at http://www.crcpress.com i i “Sim˙textbook” — 2012/4/3 — 11:47 — page v — #1 i i Preface This book can serve as the text for a one-semester course on Monte Carlo simulation. Theintendedaudienceisadvancedundergraduatestudentsor studentsinmaster’sprogramswhowishtolearnthebasicsofthisexciting topicanditsapplications tofinance. The book is largely self-contained. The only prerequisite is some expe- rience with probability and statistics. Prior knowledge on option pricing is helpful but not essential. As in any study of Monte Carlo simulation, codingisanintegralpartandcannotbeignored.Thebookcontainsalarge numberofMATLAB(cid:13)R codingexercises.Theyaredesignedinaprogressive mannersothatnopriorexperiencewithMATLABisrequired. Much of the mathematics in the book is informal. For example, ran- domvariablesaresimplydefinedtobefunctionsonthesamplespace,even though they should bemeasurablewithrespect toappropriateσ-algebras; exchanging theorderofintegrations iscarriedoutliberally,eventhough it should be justified by theTonelli–Fubini Theorem. The motivation for do- ing so is to avoid the technical measure theoretic jargon, which is of little concern in practice and does not help much to further the understanding ofthetopic. The book is an extension of the lecture notes thatI havedevelopedfor an undergraduate course on MonteCarlo simulation at BrownUniversity. Iwouldliketothankthestudentswhohavetakenthecourse,aswellasthe Division ofAppliedMathematicsatBrown,fortheirsupport. HuiWang Providence,RhodeIsland January, 2012 i i i i i i “Sim˙textbook” — 2012/4/3 — 11:47 — page vi — #2 i i vi MATLAB(cid:13)R is a trademark of The MathWorks, Inc. For product informa- tion,pleasecontact: TheMathWorks,Inc. 3AppleHillDrive Natick,MA01760-2098USA Tel:5086477000 Fax: 508-647-7001 E-mail:[email protected] Web:www.mathworks.com i i i i i i “Sim˙textbook” — 2012/4/3 — 11:47 — page vii — #3 i i Contents 1 ReviewofProbability 1 1.1 Probability Space . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 IndependenceandConditional Probability . . . . . . . . . . 2 1.3 RandomVariables . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.4 RandomVectors . . . . . . . . . . . . . . . . . . . . . . . . . . 13 1.5 ConditionalDistributions . . . . . . . . . . . . . . . . . . . . 18 1.6 ConditionalExpectation . . . . . . . . . . . . . . . . . . . . . 21 1.7 ClassicalLimitTheorems . . . . . . . . . . . . . . . . . . . . . 23 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 2 BrownianMotion 31 2.1 BrownianMotion . . . . . . . . . . . . . . . . . . . . . . . . . 31 2.2 Running MaximumofBrownianMotion. . . . . . . . . . . . 33 2.3 DerivativesandBlack–ScholesPrices . . . . . . . . . . . . . . 35 2.4 Multidimensional BrownianMotions . . . . . . . . . . . . . . 43 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 3 ArbitrageFreePricing 51 3.1 ArbitrageFreePrinciple . . . . . . . . . . . . . . . . . . . . . 51 3.2 AssetPricing withBinomialTrees . . . . . . . . . . . . . . . . 53 3.3 TheBlack–ScholesModel . . . . . . . . . . . . . . . . . . . . 61 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 4 MonteCarloSimulation 67 4.1 BasicsofMonteCarloSimulation . . . . . . . . . . . . . . . . 67 4.2 StandardErrorandConfidenceInterval . . . . . . . . . . . . 69 4.3 ExamplesofMonteCarloSimulation . . . . . . . . . . . . . . 72 4.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 i i i i i i “Sim˙textbook” — 2012/4/3 — 11:47 — page viii — #4 i i viii CONTENTS 5 GeneratingRandomVariables 87 5.1 InverseTransformMethod . . . . . . . . . . . . . . . . . . . . 87 5.2 Acceptance-RejectionMethod . . . . . . . . . . . . . . . . . . 90 5.3 SamplingMultivariateNormalDistributions . . . . . . . . . 93 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 6 VarianceReductionTechniques 103 6.1 AntitheticSampling . . . . . . . . . . . . . . . . . . . . . . . . 103 6.2 ControlVariates . . . . . . . . . . . . . . . . . . . . . . . . . . 109 6.3 StratifiedSampling . . . . . . . . . . . . . . . . . . . . . . . . 115 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 7 ImportanceSampling 133 7.1 BasicIdeasofImportanceSampling . . . . . . . . . . . . . . 133 7.2 TheCross-Entropy Method . . . . . . . . . . . . . . . . . . . 144 7.3 Applications toRiskAnalysis . . . . . . . . . . . . . . . . . . 164 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 8 StochasticCalculus 183 8.1 StochasticIntegrals . . . . . . . . . . . . . . . . . . . . . . . . 184 8.2 Itoˆ Formula . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 8.3 StochasticDifferential Equations . . . . . . . . . . . . . . . . 194 8.4 Risk-NeutralPricing . . . . . . . . . . . . . . . . . . . . . . . 197 8.5 Black–ScholesEquation . . . . . . . . . . . . . . . . . . . . . 200 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202 9 SimulationofDiffusions 205 9.1 EulerScheme . . . . . . . . . . . . . . . . . . . . . . . . . . . 205 9.2 EliminatingDiscretizationError. . . . . . . . . . . . . . . . . 207 9.3 RefinementsofEulerScheme . . . . . . . . . . . . . . . . . . 208 9.4 TheLampertiTransform . . . . . . . . . . . . . . . . . . . . . 209 9.5 NumericalExamples . . . . . . . . . . . . . . . . . . . . . . . 211 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 10 SensitivityAnalysis 237 10.1 CommonlyUsedGreeks . . . . . . . . . . . . . . . . . . . . . 238 10.2 MonteCarloSimulationofGreeks . . . . . . . . . . . . . . . 239 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253 A MultivariateNormalDistributions 257 i i i i i i “Sim˙textbook” — 2012/4/3 — 11:47 — page ix — #5 i i CONTENTS ix B AmericanOptionPricing 259 B.1 TheValueofanAmerican Option . . . . . . . . . . . . . . . . 259 B.2 Dynamic ProgrammingandBinomialTrees . . . . . . . . . . 261 B.3 Diffusion Models:BinomialApproximation . . . . . . . . . . 264 C OptionPricingFormulas 269 Bibliography 277 Index 280 i i i i