Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Gaussian1dCrossAssetAdaptor Class Reference

Gaussian 1d Cross Asset adaptor. More...

#include <qle/models/gaussian1dcrossassetadaptor.hpp>

+ Inheritance diagram for Gaussian1dCrossAssetAdaptor:
+ Collaboration diagram for Gaussian1dCrossAssetAdaptor:

Public Member Functions

 Gaussian1dCrossAssetAdaptor (const QuantLib::ext::shared_ptr< LinearGaussMarkovModel > &model)
 
 Gaussian1dCrossAssetAdaptor (const Size ccy, const QuantLib::ext::shared_ptr< CrossAssetModel > &model)
 

Private Member Functions

Real numeraireImpl (const Time t, const Real y, const Handle< YieldTermStructure > &yts) const override
 
Real zerobondImpl (const Time T, const Time t, const Real y, const Handle< YieldTermStructure > &yts) const override
 
void initialize ()
 

Private Attributes

const QuantLib::ext::shared_ptr< LinearGaussMarkovModelx_
 

Detailed Description

Gaussian 1d Cross Asset adaptor.

Definition at line 36 of file gaussian1dcrossassetadaptor.hpp.

Constructor & Destructor Documentation

◆ Gaussian1dCrossAssetAdaptor() [1/2]

Gaussian1dCrossAssetAdaptor ( const QuantLib::ext::shared_ptr< LinearGaussMarkovModel > &  model)

Definition at line 26 of file gaussian1dcrossassetadaptor.cpp.

27 : Gaussian1dModel(model->parametrization()->termStructure()), x_(model) {
28 initialize();
29}
const QuantLib::ext::shared_ptr< LinearGaussMarkovModel > x_
+ Here is the call graph for this function:

◆ Gaussian1dCrossAssetAdaptor() [2/2]

Gaussian1dCrossAssetAdaptor ( const Size  ccy,
const QuantLib::ext::shared_ptr< CrossAssetModel > &  model 
)

Definition at line 31 of file gaussian1dcrossassetadaptor.cpp.

32 : Gaussian1dModel(model->irlgm1f(ccy)->termStructure()), x_(model->lgm(ccy)) {
33 initialize();
34}
+ Here is the call graph for this function:

Member Function Documentation

◆ numeraireImpl()

Real numeraireImpl ( const Time  t,
const Real  y,
const Handle< YieldTermStructure > &  yts 
) const
overrideprivate

Gaussian1dModel interface

Definition at line 67 of file gaussian1dcrossassetadaptor.hpp.

68 {
69 Real d = yts.empty() ? 1.0 : x_->parametrization()->termStructure()->discount(t) / yts->discount(t);
70 Real x = y * std::sqrt(x_->parametrization()->zeta(t));
71 return d * x_->numeraire(t, x);
72}

◆ zerobondImpl()

Real zerobondImpl ( const Time  T,
const Time  t,
const Real  y,
const Handle< YieldTermStructure > &  yts 
) const
overrideprivate

Definition at line 74 of file gaussian1dcrossassetadaptor.hpp.

75 {
76 Real d = yts.empty()
77 ? 1.0
78 : x_->parametrization()->termStructure()->discount(t) /
79 x_->parametrization()->termStructure()->discount(T) * yts->discount(T) / yts->discount(t);
80 Real x = y * std::sqrt(x_->parametrization()->zeta(t));
81 return d * x_->discountBond(t, T, x);
82}

◆ initialize()

void initialize ( )
private

Definition at line 36 of file gaussian1dcrossassetadaptor.cpp.

36 {
37 registerWith(x_);
38 stateProcess_ = QuantLib::ext::dynamic_pointer_cast<StochasticProcess1D>(x_->stateProcess());
39}
+ Here is the caller graph for this function:

Member Data Documentation

◆ x_

const QuantLib::ext::shared_ptr<LinearGaussMarkovModel> x_
private

Definition at line 62 of file gaussian1dcrossassetadaptor.hpp.