QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
libor-forward-model process More...
#include <lfmprocess.hpp>
Public Member Functions | |
LiborForwardModelProcess (Size size, ext::shared_ptr< IborIndex > index) | |
Array | initialValues () const override |
returns the initial values of the state variables More... | |
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... | |
Matrix | covariance (Time t0, const Array &x0, Time dt) const override |
Array | apply (const Array &x0, const Array &dx) const override |
Array | evolve (Time t0, const Array &x0, Time dt, const Array &dw) const override |
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... | |
ext::shared_ptr< IborIndex > | index () const |
Leg | cashFlows (Real amount=1.0) const |
void | setCovarParam (const ext::shared_ptr< LfmCovarianceParameterization > ¶m) |
ext::shared_ptr< LfmCovarianceParameterization > | covarParam () const |
Size | nextIndexReset (Time t) const |
const std::vector< Time > & | fixingTimes () const |
const std::vector< Date > & | fixingDates () const |
const std::vector< Time > & | accrualStartTimes () const |
const std::vector< Time > & | accrualEndTimes () const |
std::vector< DiscountFactor > | discountBond (const std::vector< Rate > &rates) const |
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 Time | time (const Date &) const |
void | update () override |
Public Member Functions inherited from Observer | |
Observer ()=default | |
Observer (const Observer &) | |
Observer & | operator= (const Observer &) |
virtual | ~Observer () |
std::pair< iterator, bool > | registerWith (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 &) | |
Observable & | operator= (const Observable &) |
Observable (Observable &&)=delete | |
Observable & | operator= (Observable &&)=delete |
virtual | ~Observable ()=default |
void | notifyObservers () |
Private Attributes | |
Size | size_ |
const ext::shared_ptr< IborIndex > | index_ |
ext::shared_ptr< LfmCovarianceParameterization > | lfmParam_ |
Array | initialValues_ |
std::vector< Time > | fixingTimes_ |
std::vector< Date > | fixingDates_ |
std::vector< Time > | accrualStartTimes_ |
std::vector< Time > | accrualEndTimes_ |
std::vector< Time > | accrualPeriod_ |
Array | m1 |
Array | m2 |
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< discretization > | discretization_ |
libor-forward-model process
stochastic process of a libor forward model using the rolling forward measure incl. predictor-corrector step
References:
Glasserman, Paul, 2004, Monte Carlo Methods in Financial Engineering, Springer, Section 3.7
Antoon Pelsser, 2000, Efficient Methods for Valuing Interest Rate Derivatives, Springer, 8
Hull, John, White, Alan, 1999, Forward Rate Volatilities, Swap Rate Volatilities and the Implementation of the Libor Market Model (http://www.rotman.utoronto.ca/~amackay/fin/libormktmodel2.pdf)
Definition at line 58 of file lfmprocess.hpp.
LiborForwardModelProcess | ( | Size | size, |
ext::shared_ptr< IborIndex > | index | ||
) |
|
overridevirtual |
returns the initial values of the state variables
Implements StochasticProcess.
Definition at line 147 of file lfmprocess.cpp.
returns the drift part of the equation, i.e., \( \mu(t, \mathrm{x}_t) \)
Implements StochasticProcess.
Definition at line 68 of file lfmprocess.cpp.
returns the diffusion part of the equation, i.e. \( \sigma(t, \mathrm{x}_t) \)
Implements StochasticProcess.
Definition at line 85 of file lfmprocess.cpp.
returns the covariance \( V(\mathrm{x}_{t_0 + \Delta t} | \mathrm{x}_{t_0} = \mathrm{x}_0) \) of the process after a time interval \( \Delta t \) according to the given discretization. This method can be overridden in derived classes which want to hard-code a particular discretization.
Reimplemented from StochasticProcess.
Definition at line 89 of file lfmprocess.cpp.
applies a change to the asset value. By default, it returns \( \mathrm{x} + \Delta \mathrm{x} \).
Reimplemented from StochasticProcess.
Definition at line 93 of file lfmprocess.cpp.
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 103 of file lfmprocess.cpp.
|
overridevirtual |
returns the number of dimensions of the stochastic process
Implements StochasticProcess.
Definition at line 183 of file lfmprocess.cpp.
|
overridevirtual |
returns the number of independent factors of the process
Reimplemented from StochasticProcess.
Definition at line 187 of file lfmprocess.cpp.
ext::shared_ptr< IborIndex > index | ( | ) | const |
Definition at line 162 of file lfmprocess.cpp.
Definition at line 167 of file lfmprocess.cpp.
void setCovarParam | ( | const ext::shared_ptr< LfmCovarianceParameterization > & | param | ) |
Definition at line 151 of file lfmprocess.cpp.
ext::shared_ptr< LfmCovarianceParameterization > covarParam | ( | ) | const |
Definition at line 157 of file lfmprocess.cpp.
const std::vector< Time > & fixingTimes | ( | ) | const |
Definition at line 191 of file lfmprocess.cpp.
const std::vector< Date > & fixingDates | ( | ) | const |
Definition at line 195 of file lfmprocess.cpp.
const std::vector< Time > & accrualStartTimes | ( | ) | const |
Definition at line 200 of file lfmprocess.cpp.
const std::vector< Time > & accrualEndTimes | ( | ) | const |
Definition at line 205 of file lfmprocess.cpp.
std::vector< DiscountFactor > discountBond | ( | const std::vector< Rate > & | rates | ) | const |
Definition at line 214 of file lfmprocess.cpp.
|
private |
Definition at line 93 of file lfmprocess.hpp.
|
private |
Definition at line 95 of file lfmprocess.hpp.
|
private |
Definition at line 96 of file lfmprocess.hpp.
|
private |
Definition at line 98 of file lfmprocess.hpp.
|
private |
Definition at line 100 of file lfmprocess.hpp.
|
private |
Definition at line 101 of file lfmprocess.hpp.
|
private |
Definition at line 102 of file lfmprocess.hpp.
|
private |
Definition at line 103 of file lfmprocess.hpp.
|
private |
Definition at line 104 of file lfmprocess.hpp.
|
mutableprivate |
Definition at line 106 of file lfmprocess.hpp.
|
private |
Definition at line 106 of file lfmprocess.hpp.