Gaussian 1d Cross Asset adaptor.
More...
#include <qle/models/gaussian1dcrossassetadaptor.hpp>
|
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 () |
|
Gaussian 1d Cross Asset adaptor.
Definition at line 36 of file gaussian1dcrossassetadaptor.hpp.
◆ Gaussian1dCrossAssetAdaptor() [1/2]
◆ Gaussian1dCrossAssetAdaptor() [2/2]
◆ 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()
◆ x_