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

Class describing the dynamics of the two state variables. More...

#include <ql/models/shortrate/twofactormodel.hpp>

+ Inheritance diagram for TwoFactorModel::ShortRateDynamics:
+ Collaboration diagram for TwoFactorModel::ShortRateDynamics:

Public Member Functions

 ShortRateDynamics (ext::shared_ptr< StochasticProcess1D > xProcess, ext::shared_ptr< StochasticProcess1D > yProcess, Real correlation)
 
virtual ~ShortRateDynamics ()=default
 
virtual Rate shortRate (Time t, Real x, Real y) const =0
 
const ext::shared_ptr< StochasticProcess1D > & xProcess () const
 Risk-neutral dynamics of the first state variable x. More...
 
const ext::shared_ptr< StochasticProcess1D > & yProcess () const
 Risk-neutral dynamics of the second state variable y. More...
 
Real correlation () const
 Correlation \( \rho \) between the two brownian motions. More...
 
ext::shared_ptr< StochasticProcessprocess () const
 Joint process of the two variables. More...
 

Private Attributes

ext::shared_ptr< StochasticProcess1DxProcess_
 
ext::shared_ptr< StochasticProcess1DyProcess_
 
Real correlation_
 

Detailed Description

Class describing the dynamics of the two state variables.

We assume here that the short-rate is a function of two state variables x and y.

\[ r_t = f(t, x_t, y_t) \]

of two state variables \( x_t \) and \( y_t \). These stochastic processes satisfy

\[ x_t = \mu_x(t, x_t)dt + \sigma_x(t, x_t) dW_t^x \]

and

\[ y_t = \mu_y(t,y_t)dt + \sigma_y(t, y_t) dW_t^y \]

where \( W^x \) and \( W^y \) are two brownian motions satisfying

\[ dW^x_t dW^y_t = \rho dt \]

.

Definition at line 72 of file twofactormodel.hpp.

Constructor & Destructor Documentation

◆ ShortRateDynamics()

ShortRateDynamics ( ext::shared_ptr< StochasticProcess1D xProcess,
ext::shared_ptr< StochasticProcess1D yProcess,
Real  correlation 
)

Definition at line 74 of file twofactormodel.hpp.

◆ ~ShortRateDynamics()

virtual ~ShortRateDynamics ( )
virtualdefault

Member Function Documentation

◆ shortRate()

virtual Rate shortRate ( Time  t,
Real  x,
Real  y 
) const
pure virtual

Implemented in G2::Dynamics.

◆ xProcess()

const ext::shared_ptr< StochasticProcess1D > & xProcess ( ) const

Risk-neutral dynamics of the first state variable x.

Definition at line 84 of file twofactormodel.hpp.

◆ yProcess()

const ext::shared_ptr< StochasticProcess1D > & yProcess ( ) const

Risk-neutral dynamics of the second state variable y.

Definition at line 89 of file twofactormodel.hpp.

◆ correlation()

Real correlation ( ) const

Correlation \( \rho \) between the two brownian motions.

Definition at line 94 of file twofactormodel.hpp.

◆ process()

ext::shared_ptr< StochasticProcess > process ( ) const

Joint process of the two variables.

Definition at line 51 of file twofactormodel.cpp.

Member Data Documentation

◆ xProcess_

ext::shared_ptr<StochasticProcess1D> xProcess_
private

Definition at line 102 of file twofactormodel.hpp.

◆ yProcess_

ext::shared_ptr<StochasticProcess1D> yProcess_
private

Definition at line 102 of file twofactormodel.hpp.

◆ correlation_

Real correlation_
private

Definition at line 103 of file twofactormodel.hpp.