20#include <ql/experimental/math/piecewiseintegral.hpp>
28 const bool evaluateBankAccount,
29 const QuantLib::ext::shared_ptr<Integrator>& integrator)
30 : parametrization_(parametrization), measure_(measure), discretization_(discretization),
31 evaluateBankAccount_(evaluateBankAccount) {
39 std::vector<Time> allTimes;
40 for (Size i = 0; i < 2; ++i)
44 integrator_ = QuantLib::ext::make_shared<PiecewiseIntegral>(integrator, allTimes,
true);
48 const Handle<YieldTermStructure> discountCurve)
const {
49 QL_REQUIRE(t >= 0.0,
"t (" << t <<
") >= 0 required in LGM::bankAccountNumeraire");
53 Real Vt = 0.5 * (Ht * Ht * zeta0 + zeta2);
54 return std::exp(Ht * x - y + Vt) /
55 (discountCurve.empty() ?
parametrization_->termStructure()->discount(t) : discountCurve->discount(t));
Size n_aux() const override
bool evaluateBankAccount_
QuantLib::ext::shared_ptr< IrLgm1fParametrization > parametrization_
QuantLib::ext::shared_ptr< StochasticProcess1D > stateProcess_
Discretization discretization_
Size m_aux() const override
QuantLib::ext::shared_ptr< Integrator > integrator_
LinearGaussMarkovModel(const QuantLib::ext::shared_ptr< IrLgm1fParametrization > ¶metrization, const Measure measure=Measure::LGM, const Discretization=Discretization::Euler, const bool evaluateBankAccount=true, const QuantLib::ext::shared_ptr< Integrator > &integrator=QuantLib::ext::make_shared< SimpsonIntegral >(1.0E-8, 100))
Real bankAccountNumeraire(const Time t, const Real x, const Real y, const Handle< YieldTermStructure > discountCurve=Handle< YieldTermStructure >()) const
std::vector< QuantLib::ext::shared_ptr< Parameter > > arguments_
ir LGM 1f model state process