QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
HestonSLVProcess Class Reference

#include <ql/processes/hestonslvprocess.hpp>

+ Inheritance diagram for HestonSLVProcess:
+ Collaboration diagram for HestonSLVProcess:

Public Member Functions

 HestonSLVProcess (const ext::shared_ptr< HestonProcess > &hestonProcess, ext::shared_ptr< LocalVolTermStructure > leverageFct, Real mixingFactor=1.0)
 
Size size () const override
 returns the number of dimensions of the stochastic process More...
 
Size factors () const override
 returns the number of independent factors of the process More...
 
void update () override
 
Array initialValues () const override
 returns the initial values of the state variables More...
 
Array apply (const Array &x0, const Array &dx) const override
 
Array drift (Time t, const Array &x) const override
 returns the drift part of the equation, i.e., \( \mu(t, \mathrm{x}_t) \) More...
 
Matrix diffusion (Time t, const Array &x) const override
 returns the diffusion part of the equation, i.e. \( \sigma(t, \mathrm{x}_t) \) More...
 
Array evolve (Time t0, const Array &x0, Time dt, const Array &dw) const override
 
Real v0 () const
 
Real rho () const
 
Real kappa () const
 
Real theta () const
 
Real sigma () const
 
Real mixingFactor () const
 
ext::shared_ptr< LocalVolTermStructureleverageFct () const
 
const Handle< Quote > & s0 () const
 
const Handle< YieldTermStructure > & dividendYield () const
 
const Handle< YieldTermStructure > & riskFreeRate () const
 
Time time (const Date &d) const override
 
- Public Member Functions inherited from StochasticProcess
 ~StochasticProcess () override=default
 
virtual Array expectation (Time t0, const Array &x0, Time dt) const
 
virtual Matrix stdDeviation (Time t0, const Array &x0, Time dt) const
 
virtual Matrix covariance (Time t0, const Array &x0, Time dt) const
 
void update () override
 
- Public Member Functions inherited from Observer
 Observer ()=default
 
 Observer (const Observer &)
 
Observeroperator= (const Observer &)
 
virtual ~Observer ()
 
std::pair< iterator, boolregisterWith (const ext::shared_ptr< Observable > &)
 
void registerWithObservables (const ext::shared_ptr< Observer > &)
 
Size unregisterWith (const ext::shared_ptr< Observable > &)
 
void unregisterWithAll ()
 
virtual void update ()=0
 
virtual void deepUpdate ()
 
- Public Member Functions inherited from Observable
 Observable ()
 
 Observable (const Observable &)
 
Observableoperator= (const Observable &)
 
 Observable (Observable &&)=delete
 
Observableoperator= (Observable &&)=delete
 
virtual ~Observable ()=default
 
void notifyObservers ()
 

Private Member Functions

void setParameters ()
 

Private Attributes

Real kappa_
 
Real theta_
 
Real sigma_
 
Real rho_
 
Real v0_
 
Real mixingFactor_
 
Real mixedSigma_
 
const ext::shared_ptr< HestonProcesshestonProcess_
 
const ext::shared_ptr< LocalVolTermStructureleverageFct_
 

Additional Inherited Members

- Public Types inherited from Observer
typedef set_type::iterator iterator
 
- Protected Member Functions inherited from StochasticProcess
 StochasticProcess ()=default
 
 StochasticProcess (ext::shared_ptr< discretization >)
 
- Protected Attributes inherited from StochasticProcess
ext::shared_ptr< discretizationdiscretization_
 

Detailed Description

Definition at line 33 of file hestonslvprocess.hpp.

Constructor & Destructor Documentation

◆ HestonSLVProcess()

HestonSLVProcess ( const ext::shared_ptr< HestonProcess > &  hestonProcess,
ext::shared_ptr< LocalVolTermStructure leverageFct,
Real  mixingFactor = 1.0 
)

Definition at line 32 of file hestonslvprocess.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ size()

Size size ( ) const
overridevirtual

returns the number of dimensions of the stochastic process

Implements StochasticProcess.

Definition at line 39 of file hestonslvprocess.hpp.

◆ factors()

Size factors ( ) const
overridevirtual

returns the number of independent factors of the process

Reimplemented from StochasticProcess.

Definition at line 40 of file hestonslvprocess.hpp.

◆ update()

void update ( )
overridevirtual

This method must be implemented in derived classes. An instance of Observer does not call this method directly: instead, it will be called by the observables the instance registered with when they need to notify any changes.

Implements Observer.

Definition at line 41 of file hestonslvprocess.cpp.

+ Here is the call graph for this function:

◆ initialValues()

Array initialValues ( ) const
overridevirtual

returns the initial values of the state variables

Implements StochasticProcess.

Definition at line 44 of file hestonslvprocess.hpp.

◆ apply()

Array apply ( const Array x0,
const Array dx 
) const
overridevirtual

applies a change to the asset value. By default, it returns \( \mathrm{x} + \Delta \mathrm{x} \).

Reimplemented from StochasticProcess.

Definition at line 47 of file hestonslvprocess.hpp.

◆ drift()

Array drift ( Time  t,
const Array x 
) const
overridevirtual

returns the drift part of the equation, i.e., \( \mu(t, \mathrm{x}_t) \)

Implements StochasticProcess.

Definition at line 46 of file hestonslvprocess.cpp.

+ Here is the call graph for this function:

◆ diffusion()

Matrix diffusion ( Time  t,
const Array x 
) const
overridevirtual

returns the diffusion part of the equation, i.e. \( \sigma(t, \mathrm{x}_t) \)

Implements StochasticProcess.

Definition at line 61 of file hestonslvprocess.cpp.

◆ evolve()

Array evolve ( Time  t0,
const Array x0,
Time  dt,
const Array dw 
) const
overridevirtual

returns the asset value after a time interval \( \Delta t \) according to the given discretization. By default, it returns

\[ E(\mathrm{x}_0,t_0,\Delta t) + S(\mathrm{x}_0,t_0,\Delta t) \cdot \Delta \mathrm{w} \]

where \( E \) is the expectation and \( S \) the standard deviation.

Reimplemented from StochasticProcess.

Definition at line 76 of file hestonslvprocess.cpp.

+ Here is the call graph for this function:

◆ v0()

Real v0 ( ) const

Definition at line 55 of file hestonslvprocess.hpp.

◆ rho()

Real rho ( ) const

Definition at line 56 of file hestonslvprocess.hpp.

◆ kappa()

Real kappa ( ) const

Definition at line 57 of file hestonslvprocess.hpp.

◆ theta()

Real theta ( ) const

Definition at line 58 of file hestonslvprocess.hpp.

◆ sigma()

Real sigma ( ) const

Definition at line 59 of file hestonslvprocess.hpp.

◆ mixingFactor()

Real mixingFactor ( ) const

Definition at line 60 of file hestonslvprocess.hpp.

◆ leverageFct()

ext::shared_ptr< LocalVolTermStructure > leverageFct ( ) const

Definition at line 61 of file hestonslvprocess.hpp.

◆ s0()

const Handle< Quote > & s0 ( ) const

Definition at line 65 of file hestonslvprocess.hpp.

◆ dividendYield()

const Handle< YieldTermStructure > & dividendYield ( ) const

Definition at line 66 of file hestonslvprocess.hpp.

+ Here is the caller graph for this function:

◆ riskFreeRate()

const Handle< YieldTermStructure > & riskFreeRate ( ) const

Definition at line 69 of file hestonslvprocess.hpp.

+ Here is the caller graph for this function:

◆ time()

Time time ( const Date ) const
overridevirtual

returns the time value corresponding to the given date in the reference system of the stochastic process.

Note
As a number of processes might not need this functionality, a default implementation is given which raises an exception.

Reimplemented from StochasticProcess.

Definition at line 73 of file hestonslvprocess.hpp.

◆ setParameters()

void setParameters ( )
private

Definition at line 119 of file hestonslvprocess.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ kappa_

Real kappa_
private

Definition at line 76 of file hestonslvprocess.hpp.

◆ theta_

Real theta_
private

Definition at line 76 of file hestonslvprocess.hpp.

◆ sigma_

Real sigma_
private

Definition at line 76 of file hestonslvprocess.hpp.

◆ rho_

Real rho_
private

Definition at line 76 of file hestonslvprocess.hpp.

◆ v0_

Real v0_
private

Definition at line 76 of file hestonslvprocess.hpp.

◆ mixingFactor_

Real mixingFactor_
private

Definition at line 76 of file hestonslvprocess.hpp.

◆ mixedSigma_

Real mixedSigma_
private

Definition at line 76 of file hestonslvprocess.hpp.

◆ hestonProcess_

const ext::shared_ptr<HestonProcess> hestonProcess_
private

Definition at line 78 of file hestonslvprocess.hpp.

◆ leverageFct_

const ext::shared_ptr<LocalVolTermStructure> leverageFct_
private

Definition at line 79 of file hestonslvprocess.hpp.