
The Heston Model and Its Extensions in VBA
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
More details
Other editions
Additional editions


Persons
Content
Foreword xi
Preface xiii
Acknowledgments xv
About This Book xvii
VBA Library for Complex Numbers xix
Chapter 1 The Heston Model for European Options 1
Model Dynamics 1
The Heston European Call Price 2
Dividend Yield and the Put Price 8
Consolidating the Integrals 9
Black-Scholes as a Special Case 10
Conclusion 12
Chapter 2 Integration Issues, Parameter Effects, and Variance Modeling 13
Remarks on the Characteristic Functions 14
Problems with the Integrand 16
The Little Heston Trap 18
Effect of the Heston Parameters 20
Variance Modeling in the Heston Model 26
Moment Explosions 38
Bounds on Implied Volatility Slope 40
Conclusion 42
Chapter 3 Derivations Using the Fourier Transform 45
Derivation of Gatheral (2006) 46
Attari (2004) Representation 47
Carr and Madan (1999) Representation 49
Conclusion 61
Chapter 4 The Fundamental Transform for Pricing Options 63
The Payoff Transform 64
Option Prices Using Parseval's Identity 70
Volatility of Volatility Series Expansion 75
Conclusion 81
Chapter 5 Numerical Integration Schemes 83
The Integrand in Numerical Integration 84
Newton-Cotes Formulas 85
Gaussian Quadrature 90
Integration Limits, Multidomain Integration, and Kahl and Jäckel Transformation 98
Illustration of Numerical Integration 103
Fast Fourier Transform 106
Fractional Fast Fourier Transform 108
Conclusion 114
Chapter 6 Parameter Estimation 115
Estimation Using Loss Functions 116
Speeding Up the Estimation 126
Differential Evolution 128
Maximum Likelihood Estimation 132
Risk-Neutral Density and Arbitrage-Free Volatility Surface 135
Conclusion 140
Chapter 7 Simulation in the Heston Model 143
General Setup 144
Euler Scheme 146
Milstein Scheme 147
Implicit Milstein Scheme 149
Transformed Volatility Scheme 152
Balanced, Pathwise, and IJK Schemes 155
Quadratic-Exponential Scheme 157
Alfonsi Scheme for the Variance 161
Moment-Matching Scheme 165
Conclusion 167
Chapter 8 American Options 169
Least-Squares Monte Carlo 169
The Explicit Method 174
Beliaeva-Nawalkha Bivariate Tree 178
Medvedev-Scaillet Expansion 191
Chiarella and Ziogas American Call 200
Conclusion 208
Chapter 9 Time-Dependent Heston Models 209
Generalization of the Riccati Equation 209
Bivariate Characteristic Function 210
Linking the Bivariate CF and the General Riccati Equation 212
Mikhailov and Nögel Model 214
Elices Model 219
Benhamou-Miri-Gobet Model 223
Black-Scholes Derivatives 231
Conclusion 232
Chapter 10 Methods for Finite Differences 235
The PDE in Terms of an Operator 236
Building Grids 236
Finite Difference Approximation of Derivatives 239
Boundary Conditions for the PDE 240
The Weighted Method 241
Explicit Scheme 248
ADI Schemes 251
Conclusion 256
Chapter 11 The Heston Greeks 257
Analytic Expressions for European Greeks 258
Finite Differences for the Greeks 263
Numerical Implementation of the Greeks 264
Greeks under the Attari and Carr-Madan Formulations 267
Greeks under the Lewis Formulations 273
Greeks Using the FFT and FRFT 276
American Greeks Using Simulation 279
American Greeks Using the Explicit Method 281
American Greeks from Medvedev and Scaillet 284
Conclusion 285
Chapter 12 The Double Heston Model 287
Multidimensional Feynman-Kac Theorem 288
Double Heston Call Price 288
Double Heston Greeks 292
Parameter Estimation 297
Simulation in the Double Heston Model 301
American Options in the Double Heston Model 306
Conclusion 308
Bibliography 309
About the Website 317
Index 319
CHAPTER 1
The Heston Model for European Options
Abstract
Here, we present the European call price under the Heston model. We first present the model and then illustrate that the call price in the Heston model can be expressed as the sum of two terms that each contains an in-the-money probability but obtained under a separate measure, a result demonstrated by Bakshi and Madan (2000). We then show how to incorporate a continuous dividend yield and how to compute the price of a European put, and demonstrate that the numerical integration can be speed up by consolidating the two numerical integrals into a single integral. Finally, we derive the Black-Scholes model as a special case of the Heston model.
CIR process, European call, characteristic function, dividend yield, put-call parity, Black-Scholes
In this chapter, we present the European call price under the Heston model. We first present the model and then illustrate that the call price in the Heston model can be expressed as the sum of two terms that each contains an in-the-money probability, but obtained under a separate measure, a result demonstrated by Bakshi and Madan (2000). We then show how to incorporate a continuous dividend yield and how to compute the price of a European put, and demonstrate that the numerical integration can be speeded up by consolidating the two numerical integrals into a single integral. Finally, we derive the Black-Scholes model as a special case of the Heston model.
MODEL DYNAMICS
The Heston model assumes that the underlying stock price, St, follows a Black-Scholes-type stochastic process, but with a stochastic variance, vt, that follows a Cox, Ingersoll, and Ross (1985) process. Hence, the Heston model is represented by the bivariate system of stochastic differential equations (SDEs),
where . We will sometimes drop the time index and write S = St, v = vt, W1 = W1, t and W2 = W2, t for notational convenience. The parameters of the model are
- µ the drift of the process for the stock;
- ? > 0 the mean reversion speed for the variance;
- ? > 0 the mean reversion level for the variance;
- s > 0 the volatility of the variance;
- v0 > 0 the initial (time zero) level of the variance;
- ? ? [ - 1, 1] the correlation between the two Brownian motion W1 and W2; and
- ? the volatility risk parameter (discussed below).
We will see in Chapter 2 that these parameters affect the distribution of the terminal stock price in a manner that is intuitive. Some authors refer to v0 as an unobserved initial state variable rather than a parameter. Because volatility cannot be observed, only estimated, and because v0 represents this state variable at time zero, this characterization is sensible. For the purposes of estimation, however, many authors treat v0 as a parameter like any other. Parameter estimation is covered in Chapter 6.
The stock price and variance follow the processes in Equation (1.1) under the historical measure , also called the physical measure. For pricing purposes, however, we need the processes for (St, vt) under the risk-neutral measure . The risk-neutral process is
(1.2)
where . The risk-neutral parameters of the variance process are where ?* = ? + ? and ?* = ??/(? + ?).
Note that when ? = 0, we have ?* = ? and ?* = ? so that the parameters under the physical and risk-neutral measures are the same. Throughout this book, we set ? = 0, but this is not always needed. Indeed, ? is embedded in the risk-neutral parameters ?* and ?*. Hence, when we estimate the risk-neutral parameters to price options, we do not need to estimate ?. Estimation of ? is the subject of its own research, such as that by Bollerslev et al. (2011). For notational simplicity, throughout this book we will drop the asterisk on the parameters and the tilde on the Brownian motion when it is obvious that we are dealing with the risk-neutral measure.
For details on how the risk-neutral process is constructed, see Rouah (2013).
THE HESTON EUROPEAN CALL PRICE
In this section, we show that the call price in the Heston model can be expressed in a manner that resembles the call price in the Black-Scholes model, which we present in Equation (1.16). Authors sometimes refer to this characterization of the call price as "Black-Scholes-like" or "à la Black-Scholes." The time-t price of a European call on a non-dividend-paying stock with spot price St, when the strike is K and the time to maturity is t = T - t, is the discounted expected value of the payoff under the risk-neutral measure
The last line of (1.3) is the "Black-Scholes-like" call price formula, with P1 replacing F(d1), and P2 replacing F(d2) in the Black-Scholes call price (1.16).
By introducing two measures, and , the European call price of Equation (1.3) can be written
The measure uses the bond Bt as the numeraire, while the measure uses the stock price St. Bakshi and Madan (2000) present a derivation of the call price expressed as (1.4), but under a general setup. As shown in their paper, the change of measure that leads to (1.4) is valid for a wide range of models, including the Black-Scholes and Heston models. We will see later in this chapter that when ST follows the lognormal distribution specified in the Black-Scholes model, then and . Hence, the characteristic function approach to pricing options, pioneered by Heston (1993), applies to the Black-Scholes model also.
In the Heston model, it can be shown that P1 and P2 in (1.3) can be written
(1.5)
where is the imaginary unit, Pr1 = , Pr2 = , and fj(?; x, v) are the characteristic functions for the logarithm of the terminal stock price xT = ln ST. Heston (1993) postulates that these characteristic functions are of the log linear form,
(1.6)
where Cj and Dj are constant coefficients and t = T - t is the time to maturity.
The coefficients can be shown to be
and
where a = ??,
and with , , b1 = ? + ? - ?s, and b2 = ? + ?. See Rouah (2013) for a complete derivation of the coefficients (1.7) and (1.8).
We use two functions to implement the Heston call price in VBA using the trapezoidal rule, HestonProb and HestonPriceTrapz. The first function calculates the characteristic functions and returns the real part of the integrand. The functions allow to price calls or puts, and allow for a dividend yield, as explained in the following section. The following code snippet is taken from the Excel file Ch1Trapz.xls. To conserve space, parts of the functions have been omitted.
Function HestonProb(phi As Double,.) As Double ' C = (r-q)*phi*tau*i + a/sigma^2*((b - rho*sigma*i*phi + d). bigC = cAdd(Term3, term4) ' D = (b - rho*sigma*i*phi + d)/sigma^2 * ((1-exp(d*tau)). bigD = cProd(Term5, Term6) ' The characteristic function. ' f = cExp(C + D*v0 + phi*x*i) f = cExp(cAdd(cAdd(bigC, dv0), phixi)) ' Return the real part of the integrand. ' HestonProb = real(Exp(-i * phi * Log(K)) * f / i / phi) philogKi = cProd(Complex(-Log(K) * phi, 0), i) E = cDiv(e2, cProd(i, Complex(phi, 0))) HestonProb = cReal(E) End Function The second function calculates the price of a European call C(K), or European put P(K), by put-call parity in Equation (1.13). The function calls the HestonProb function at every point of the integration grid and uses the trapezoidal rule for integration when all the integration points have been calculated.
Function HestonPriceTrapz(PutCall As String,.) As Double ' Integration increment and integration grid dphi = (Uphi - Lphi) / (N - 1) phi(1) = Lphi For j = 2 To N phi(j) = phi(j - 1) + dphi Next j ' Weights for trapezoidal rule W(1) = 0.5 * dphi W(N) = 0.5 * dphi For j = 2 To N - 1 W(j) = dphi Next j ' Build the integrands for P1 and P2; For j = 1 To N int1(j) = HestonProb(phi(j), ., 1) * W(j) int2(j) = HestonProb(phi(j), ., 2) * W(j) Next j ' The integrals and the probabilities I1 = Sum(int1) I2 = Sum(int2) P1 = 0.5 + 1 / pi * I1 P2 = 0.5 + 1 / pi * I2 ' The call price and put price by put call parity HestonC = S * Exp(-q * T) * P1 - K * Exp(-r * T) * P2 HestonP = HestonC - S * Exp(-q * T) + K * Exp(-r * T) End Function Pricing European calls and puts is straightforward. For example, the price of a six-month European put with...
System requirements
File format: ePUB
Copy protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePub works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our ebook Help page.