# codefinance.training

Coding for Finance

# The Heston Model

### The Heston Model

In finance, the Heston model, named after Steven L. Heston, is a mathematical model that describes the evolution of the volatility of an underlying asset.[1] It is a stochastic volatility model: such a model assumes that the volatility of the asset is not constant, nor even deterministic, but follows a random process.

## Basic Heston model

The basic Heston model assumes that St, the price of the asset, is determined by a stochastic process,[1][2]

where the volatility follows an Ornstein-Uhlenbeck process

Itô's lemma then shows that , the instantaneous variance, is given by a Feller square-root or CIR process,

and are Wiener processes (i.e., continuous random walks) with correlation ρ.

The model has five parameters:

• , the initial variance.
• , the long variance, or long-run average variance of the price; as t tends to infinity, the expected value of νt tends to θ.
• , the correlation of the two Wiener processes.
• , the rate at which νt reverts to θ.
• , the volatility of the volatility, or 'vol of vol', which determines the variance of νt.

If the parameters obey the following condition (known as the Feller condition) then the process is strictly positive [3]

## Risk-neutral measure

See Risk-neutral measure for the complete article

A fundamental concept in derivatives pricing is the risk-neutral measure; this is explained in further depth in the above article. For our purposes, it is sufficient to note the following:

1. To price a derivative whose payoff is a function of one or more underlying assets, we evaluate the expected value of its discounted payoff under a risk-neutral measure.
2. A risk-neutral measure, also known as an equivalent martingale measure, is one which is equivalent to the real-world measure, and which is arbitrage-free: under such a measure, the discounted price of each of the underlying assets is a martingale. See Girsanov's theorem.
3. In the Black-Scholes and Heston frameworks (where filtrations are generated from a linearly independent set of Wiener processes alone), any equivalent measure can be described in a very loose sense by adding a drift to each of the Wiener processes.
4. By selecting certain values for the drifts described above, we may obtain an equivalent measure which fulfills the arbitrage-free condition.

Consider a general situation where we have underlying assets and a linearly independent set of Wiener processes. The set of equivalent measures is isomorphic to Rm, the space of possible drifts. Consider the set of equivalent martingale measures to be isomorphic to a manifold embedded in Rm; initially, consider the situation where we have no assets and is isomorphic to Rm.

Now consider each of the underlying assets as providing a constraint on the set of equivalent measures, as its expected discount process must be equal to a constant (namely, its initial value). By adding one asset at a time, we may consider each additional constraint as reducing the dimension of by one dimension. Hence we can see that in the general situation described above, the dimension of the set of equivalent martingale measures is .

In the Black-Scholes model, we have one asset and one Wiener process. The dimension of the set of equivalent martingale measures is zero; hence it can be shown that there is a single value for the drift, and thus a single risk-neutral measure, under which the discounted asset will be a martingale.[citation needed]

In the Heston model, we still have one asset (volatility is not considered to be directly observable or tradeable in the market) but we now have two Wiener processes - the first in the Stochastic Differential Equation (SDE) for the stock price and the second in the SDE for the variance of the stock price. Here, the dimension of the set of equivalent martingale measures is one; there is no unique risk-free measure.[citation needed]

This is of course problematic; while any of the risk-free measures may theoretically be used to price a derivative, it is likely that each of them will give a different price. In theory, however, only one of these risk-free measures would be compatible with the market prices of volatility-dependent options (for example, European calls, or more explicitly, variance swaps). Hence we could add a volatility-dependent asset;[citation needed] by doing so, we add an additional constraint, and thus choose a single risk-free measure which is compatible with the market. This measure may be used for pricing.

## Implementation

• A discussion of the implementation of the Heston model was given by Kahl and Jäckel.[5]
• A derivation of closed-form option prices for the time-dependent Heston model was presented by Benhamou et al.[6]
• A derivation of closed-form option prices for the double Heston model was given by Christoffersen et al.[7] and by Gauthier and Possamai.[8]
• An extension of the Heston model with stochastic interest rates was given by Grzelak and Oosterlee.[9]
• An expression of the characteristic function of the Heston model that is both numerically continuous and easily differentiable with respect to the parameters was introduced by Cui et al.[10]
• The use of the model in a local stochastic volatility context was given by Van Der Weijst.[11]
• An explicit solution of the Heston price equation in terms of the volatility was developed by Kouritzin.[12] This can be combined with known weak solutions for the volatility equation and Girsanov's theorem to produce explicit weak solutions of the Heston model. Such solutions are useful for efficient simulation.
• High precision reference prices are available in a blog post by Alan Lewis.[13]
• There are few known parameterisations of the volatility surface based on the Heston model (Schonbusher, SVI and gSVI).

## Calibration

The calibration of the Heston model is often formulated as a least squares problem, with the objective function minimizing the squared difference between the prices observed in the market and those calculated from the model.

The prices are typically those of vanilla options. Sometimes the model is also calibrated to the variance swap term-structure as in Guillaume and Schoutens.[14] Yet another approach is to include forward start options, or barrier options as well, in order to capture the forward smile.

Under the Heston model, the price of vanilla options is given analytically, but requires a numerical method to compute the integral. Le Floc'h[15] summarized the various quadratures applied and proposed an efficient adaptive Filon quadrature.

Calibration usually requires the gradient of the objective function with respect to the model parameters. This was usually computed with a finite difference approximation although it is less accurate, less efficient and less elegant than an analytical gradient because an insightful expression of the latter became available only when a new representation of the characteristic function was introduced by Cui et al. in 2017 [10]. Another possibility is to resort to automatic differentiation. For example, the tangent mode of algorithmic differentiation may be applied using dual numbers in a straightforward manner.

## References

1. ^ a b Heston, Steven L. (1993). "A closed-form solution for options with stochastic volatility with applications to bond and currency options". Review of Financial Studies. 6 (2): 327–343. doi:10.1093/rfs/6.2.327. JSTOR 2962057. S2CID 16091300.
2. ^ Wilmott, P. (2006), Paul Wilmott on Quantitative Finance (2nd ed.), p. 861
3. ^ Albrecher, H.; Mayer, P.; Schoutens, W.; Tistaert, J. (January 2007), "The little Heston trap", Wilmott Magazine: 83–92, CiteSeerX 10.1.1.170.9335
4. ^ Carr, P.; Madan, D. (1999). "Option valuation using the fast Fourier transform" (PDF). Journal of Computational Finance. 2 (4): 61–73. CiteSeerX 10.1.1.6.9994. doi:10.21314/JCF.1999.043.
5. ^ Kahl, C.; Jäckel, P. (2005). "Not-so-complex logarithms in the Heston model" (PDF). Wilmott Magazine: 74–103.
6. ^ Benhamou, E.; Gobet, E.; Miri, M. (2009). "Time dependent Heston model". CiteSeerX 10.1.1.657.6271. doi:10.2139/ssrn.1367955. S2CID 12804395. SSRN 1367955. {{cite journal}}: Cite journal requires |journal= (help)
7. ^ Christoffersen, P.; Heston, S.; Jacobs, K. (2009). "The shape and term structure of the index option smirk: Why multifactor stochastic volatility models work so well". SSRN 1447362. {{cite journal}}: Cite journal requires |journal= (help)
8. ^ Gauthier, P.; Possamai, D. (2009). "Efficient simulation of the double Heston model". SSRN 1434853. {{cite journal}}: Cite journal requires |journal= (help)
9. ^ Grzelak, L.A.; Oosterlee, C.W. (2011). "On the Heston model with stochastic interest rates". SIAM Journal on Financial Mathematics. 2: 255–286. doi:10.1137/090756119. S2CID 9132119.
10. ^ a b Cui, Y.; Del Baño Rollin, S.; Germano, G. (2017). "Full and fast calibration of the Heston stochastic volatility model". European Journal of Operational Research. 263 (2): 625–638. arXiv:1511.08718. doi:10.1016/j.ejor.2017.05.018. S2CID 25667130.
11. ^ van der Weijst, Roel (2017). "Numerical solutions for the stochastic local volatility model". {{cite journal}}: Cite journal requires |journal= (help)
12. ^ Kouritzin, M. (2018). "Explicit Heston solutions and stochastic approximation for path-dependent option pricing". International Journal of Theoretical and Applied Finance. 21: 1850006. arXiv:1608.02028. doi:10.1142/S0219024918500061. S2CID 158891879.
13. ^
14. ^ Guillaume, Florence; Schoutens, Wim (2013). "Heston model: The variance swap calibration". SSRN 2255550. {{cite journal}}: Cite journal requires |journal= (help)
15. ^ Le Floc'h, Fabien (2018). "An adaptive Filon quadrature for stochastic volatility models". Journal of Computational Finance. 22 (3): 65–88. doi:10.21314/JCF.2018.356.

The Heston Model and its Extensions in Matlab and C#:
Fabrice D. Rouah, with Foreword by Steven L. Heston -
Tap into the power of the most popular stochastic volatility model for pricing equity derivatives.

Financial Modelling: Theory, Implementation and Practice with MATLAB Source:
Daniel Wetterau - Jörg Kienitz
A unique contribution to the application of quantitative techniques to financial problems and programming using Matlab.