QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
batesprocess.hpp
Go to the documentation of this file.
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2008 Klaus Spanderen
5
6 This file is part of QuantLib, a free-software/open-source library
7 for financial quantitative analysts and developers - http://quantlib.org/
8
9 QuantLib is free software: you can redistribute it and/or modify it
10 under the terms of the QuantLib license. You should have received a
11 copy of the license along with this program; if not, please email
12 <quantlib-dev@lists.sf.net>. The license is also available online at
13 <http://quantlib.org/license.shtml>.
14
15 This program is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 FOR A PARTICULAR PURPOSE. See the license for more details.
18*/
19
20/*! \file batesprocess.hpp
21 \brief Bates stochastic process, Heston process plus compound Poisson
22 process plus log-normal jump diffusion size
23*/
24
25#ifndef quantlib_bates_process_hpp
26#define quantlib_bates_process_hpp
27
30
31
32namespace QuantLib {
33
34 //! Square-root stochastic-volatility Bates process
35 /*! This class describes the square root stochastic volatility
36 process incl jumps governed by
37 \f[
38 \begin{array}{rcl}
39 dS(t, S) &=& (r-d-\lambda m) S dt +\sqrt{v} S dW_1 + (e^J - 1) S dN \\
40 dv(t, S) &=& \kappa (\theta - v) dt + \sigma \sqrt{v} dW_2 \\
41 dW_1 dW_2 &=& \rho dt \\
42 \omega(J) &=& \frac{1}{\sqrt{2\pi \delta^2}}
43 \exp\left[-\frac{(J-\nu)^2}{2\delta^2}\right]
44 \end{array}
45 \f]
46
47 \ingroup processes
48 */
49 class BatesProcess : public HestonProcess {
50 public:
53 const Handle<Quote>& s0,
59
60 Size factors() const override;
61 Array drift(Time t, const Array& x) const override;
62 Array evolve(Time t0, const Array& x0, Time dt, const Array& dw) const override;
63
64 Real lambda() const;
65 Real nu() const;
66 Real delta() const;
67 private:
70 };
71}
72
73
74#endif
1-D array used in linear algebra.
Definition: array.hpp:52
Square-root stochastic-volatility Bates process.
Array drift(Time t, const Array &x) const override
returns the drift part of the equation, i.e.,
Array evolve(Time t0, const Array &x0, Time dt, const Array &dw) const override
Size factors() const override
returns the number of independent factors of the process
const CumulativeNormalDistribution cumNormalDist_
Cumulative normal distribution function.
Shared handle to an observable.
Definition: handle.hpp:41
Square-root stochastic-volatility Heston process.
const Handle< YieldTermStructure > & dividendYield() const
const Handle< Quote > & s0() const
const Handle< YieldTermStructure > & riskFreeRate() const
const DefaultType & t
Date d
Real Time
continuous quantity with 1-year units
Definition: types.hpp:62
QL_REAL Real
real number
Definition: types.hpp:50
std::size_t Size
size of a container
Definition: types.hpp:58
Heston stochastic process.
Definition: any.hpp:35
normal, cumulative and inverse cumulative distributions