Option Pricer based on Heston's stochastic vol model

Governing stochastic equation for the underlying in the risk neutral space

heston_sde_fx.gif

Numerical results

price relative error
result of the f.d.m. 58.5892250046 0.012 %
analytical solution (Heston) 58.58229794
analytical solution (Lipton)

Dimension of the according bessel process as indicator for numerical accuracy:

option
time to maturity strike
down and out barrier up and out barrier
underlying characteristics
domestic rate e_rd.gif foreign rate e_rf.gif
spot S_0.gif initial volatility sqrt_v_0.gif
parameters of volatility
longterm average sqrt_theta.gif strength of m.r. kappa.gif
vol of vol xi.gif correlation rho.gif
discretisation parameters of the finite difference method
grid points in spot grid points in vol
grid points in time
Draw a sample path with these parameters

References and source code

The programme which implements the finite difference method is part of my diploma thesis. Details about the theoretical background and improvements of the numerical scheme to obtain more accurate numerical results can be found there.

The source code of the analytical solution based on the paper of Heston has been implemented by Gunter Winkler and is available here under the GNU General Public License.

The method to find an analytical solution based on Lipton is examined in the diploma thesis by Oliver Faulhaber. There you can also download the algorithms written in Mathematica and Visual Basic.

Limitations

The programme using the finite difference scheme is in a very early development stage and has to be considered as experimental. The results might be unreliable under certain parameter constellations.
Input parameters are always checked and are redefined if internally defined minimum or maximum bounds are exceeded.