Contents
Founded in 1807, John Wiley & Sons is the oldest independent publishing company in the United States. With offices in North America, Europe, Australia, and Asia, Wiley is globally committed to developing and marketing print and electronic products and services for our customers professional and personal knowledge and understanding.
The Wiley Finance series contains books written specifically for finance and investment professionals as well as sophisticated individual investors and their financial advisors. Book topics range from portfolio management to e-commerce, risk management, financial engineering, valuation, and financial instrument analysis, as well as much more.
For a list of available titles, visit our Web site at www.WileyFinance.com .
Copyright 2007 by Fabrice Douglas Rouah and Gregory Vainberg. All rights reserved.
Published by John Wiley & Sons, Inc., Hoboken, New Jersey.
Published simultaneously in Canada.
Wiley Bicentennial Logo: Richard J. Pacifico
No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning, or otherwise, except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 750-4470, or on the Web at www.copyright.com . Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at www.wiley.com/go/permissions .
Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their best efforts in preparing this book, they make no representations or warranties with respect to the accuracy or completeness of the contents of this book and specifically disclaim any implied warranties of merchantability or fitness for a particular purpose. No warranty may be created or extended by sales representatives or written sales materials. The advice and strategies contained herein may not be suitable for your situation. You should consult with a professional where appropriate. Neither the publisher nor author shall be liable for any loss of profit or any other commercial damages, including but not limited to special, incidental, consequential, or other damages.
For general information on our other products and services or for technical support, please contact our Customer Care Department within the United States at (800) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books. For more information about Wiley products, visit our Web site at www.wiley.com .
Designations used by companies to distinguish their products are often claimed as trademarks. In all instances where John Wiley & Sons, Inc. is aware of a claim, the product names appear in initial capital or all capital letters. Readers, however, should contact the appropriate companies for more complete information regarding trademarks and registration.
Library of Congress Cataloging-in-Publication Data:
Rouah, Fabrice, 1964
Option pricing models and volatility using Excel-VBA / Fabrice Douglas Rouah, Gregory Vainberg.
p. cm. (Wiley finance series)
Includes bibliographical references and index.
ISBN: 978-0-471-79464-6 (paper/cd-rom)
1. Options (Finance)Prices. 2. Capital investmentsMathematicalMathematical models. 3. Options (Finance)Mathematical models. 4. Microsoft Excel (Computer file) 5. Microsoft Visual Basic for applications. I. Vainberg, Gregory, 1978-II. Title.
HG6024.A3 R678 2007
332.6453dc22
2006031250
If this e-book refers to media such as a CD or DVD, you may download this material at http://booksupport.wiley.com . For more information about Wiley products, visit www.wiley.com
To Jacqueline, Jean, and Gilles
Fabrice
To Irina, Bryanne, and Stephannie
Greg
Preface
This book constitutes a guide for implementing advanced option pricing models and volatility in Excel/VBA. It can be used by MBA students specializing in finance and risk management, by practitioners, and by undergraduate students in their final year. Emphasis has been placed on implementing the models in VBA, rather than on the theoretical developments underlying the models. We have made every effort to explain the models and their coding in VBA as simply as possible. Every model covered in this book includes one or more VBA functions that can be accessed on the CD-ROM. We have focused our attention on equity options, and we have chosen not to include interest rate options. The particularities of interest rate options place them in a separate class of derivatives.
The first part of the book covers mathematical preliminaries that are used throughout the book. In Chapter 1 we explain complex numbers and how to implement them in VBA. We also explain how to write VBA functions for finding roots of functions, the Nelder-Mead algorithm for finding the minimum of a multivariate function, and cubic spline interpolation. All of these methods are used extensively throughout the book. Chapter 2 covers numerical integration. Many of option pricing and volatility models require that an integral be evaluated for which no closed-form solution exists, which requires a numerical approximation to the integral. In Chapter 2 we present various methods that have proven to be extremely accurate and efficient for numerical integration.
The second part of this book covers option pricing formulas. In Chapter 3 we cover lattice methods. These include the well-known binomial and trinomial trees, but also refinements such as the implied binomial and trinomial trees, the flexible binomial tree, the Leisen-Reimer tree, the Edgeworth binomial tree, and the adapted mesh method. Most of these methods approximate the Black-Scholes model in discrete time. One advantage they have over the Black-Scholes model, however, is that they can be used to price American options. In Chapter 4 we cover the Black-Scholes, Gram-Charlier, and Practitioner Black-Scholes models, and introduce implied volatility. The Black-Scholes model is presented as a platform upon which other models are built. The Gram-Charlier model is an extension of the Black-Scholes model that allows for skewness and excess kurtosis in the distribution of the return on the underlying asset. The Practitioner Black-Scholes model uses implied volatility fitted from a deterministic volatility function (DVF) regression, as an input to the Black-Scholes model. It can be thought of as an ad hoc method that adapts the Black-Scholes model to account for the volatility smile in option prices. In Chapter 5 we cover the Heston (1993) model, which is an extension of the Black-Scholes model that allows for stochastic volatility, while in Chapter 6 we cover the Heston and Nandi (2000) GARCH model, which in its simplest form is a discrete-time version of the model in Chapter 5. The call price in each model is available in closed form, up to a complex integral that must be evaluated numerically. In Chapter 6 we also show how to identify the correlation and dependence in asset returns, which the GARCH model attempts to incorporate. We also show how to implement the GARCH(1,1) model in VBA, and how GARCH volatilities can be used for long-run volatility forecasting and for constructing the term structure of volatility. Chapter 7 covers the option sensitivities, or Greeks, from the option pricing models covered in this book. The Greeks for the Black-Scholes and Gram-Charlier models are available in closed form. The Greeks from Heston (1993), and Heston and Nandi (2000) models are available in closed form also, but require a numerical approximation to a complex integral. The Greeks from tree-based methods can be approximated from option and asset prices at the beginning nodes of the tree. In Chapter 7 we also show how to use finite differences to approximate the Greeks, and we show that these approximations are all close to their closed-form values. In Chapter 8 we cover exotic options. Most of the methods we present for valuing exotic options are tree-based. Particular emphasis is placed on single-barrier options, and the various methods that have been proposed to deal with the difficulties that arise when tree-based methods are adapted to barrier options. In Chapter 8 we also cover Asian options, floating-strike lookback options, and digital options. Finally, in Chapter 9 we cover basic estimation methods for parameters that are used as inputs to the option pricing models covered in this book. Particular emphasis is placed on loss function estimation, which estimates parameters by minimizing the difference between market and model prices.