24#ifndef quantext_piecewiseconstant_irlgm1f_parametrization_hpp
25#define quantext_piecewiseconstant_irlgm1f_parametrization_hpp
41 const Array& alphaTimes,
const Array&
alpha,
const Array& kappaTimes,
42 const Array&
kappa,
const std::string&
name = std::string(),
43 const QuantLib::ext::shared_ptr<QuantLib::Constraint>& alphaConstraint = QuantLib::ext::make_shared<QuantLib::NoConstraint>(),
44 const QuantLib::ext::shared_ptr<QuantLib::Constraint>& kappaConstraint = QuantLib::ext::make_shared<QuantLib::NoConstraint>());
46 const std::vector<Date>& alphaDates,
const Array&
alpha,
47 const std::vector<Date>& kappaDates,
const Array&
kappa,
48 const std::string&
name = std::string(),
49 const QuantLib::ext::shared_ptr<QuantLib::Constraint>& alphaConstraint = QuantLib::ext::make_shared<QuantLib::NoConstraint>(),
50 const QuantLib::ext::shared_ptr<QuantLib::Constraint>& kappaConstraint = QuantLib::ext::make_shared<QuantLib::NoConstraint>());
52 Real
zeta(
const Time
t)
const override;
53 Real
H(
const Time
t)
const override;
54 Real
alpha(
const Time
t)
const override;
55 Real
kappa(
const Time
t)
const override;
56 Real
Hprime(
const Time
t)
const override;
57 Real
Hprime2(
const Time
t)
const override;
59 const QuantLib::ext::shared_ptr<Parameter>
parameter(
const Size)
const override;
60 void update()
const override;
63 Real
direct(
const Size i,
const Real x)
const override;
64 Real
inverse(
const Size j,
const Real
y)
const override;
74 const Currency& currency,
const Handle<TS>& termStructure,
const Array& alphaTimes,
const Array& alpha,
75 const Array& kappaTimes,
const Array& kappa,
const std::string& name,
76 const QuantLib::ext::shared_ptr<QuantLib::Constraint>& alphaConstraint,
77 const QuantLib::ext::shared_ptr<QuantLib::Constraint>& kappaConstraint)
86 const Currency& currency,
const Handle<TS>& termStructure,
const std::vector<Date>& alphaDates,
const Array& alpha,
87 const std::vector<Date>& kappaDates,
const Array& kappa,
const std::string& name,
88 const QuantLib::ext::shared_ptr<QuantLib::Constraint>& alphaConstraint,
89 const QuantLib::ext::shared_ptr<QuantLib::Constraint>& kappaConstraint)
98 "alpha size (" << alpha.size() <<
") inconsistent to times size ("
101 "kappa size (" << kappa.size() <<
") inconsistent to times size ("
154 QL_REQUIRE(i < 2,
"parameter " << i <<
" does not exist, only have 0..1");
163 QL_REQUIRE(i < 2,
"parameter " << i <<
" does not exist, only have 0..1");
void update() const override
const Handle< TS > termStructure() const
LGM 1F Piecewise Constant Parametrization.
Real zeta(const Time t) const override
Real kappa(const Time t) const override
Real Hprime(const Time t) const override
void update() const override
Lgm1fPiecewiseConstantParametrization(const Currency ¤cy, const Handle< TS > &termStructure, const Array &alphaTimes, const Array &alpha, const Array &kappaTimes, const Array &kappa, const std::string &name=std::string(), const QuantLib::ext::shared_ptr< QuantLib::Constraint > &alphaConstraint=QuantLib::ext::make_shared< QuantLib::NoConstraint >(), const QuantLib::ext::shared_ptr< QuantLib::Constraint > &kappaConstraint=QuantLib::ext::make_shared< QuantLib::NoConstraint >())
void initialize(const Array &alpha, const Array &kappa)
Real alpha(const Time t) const override
Real H(const Time t) const override
Real direct(const Size i, const Real x) const override
Real inverse(const Size j, const Real y) const override
const Array & parameterTimes(const Size) const override
const QuantLib::ext::shared_ptr< Parameter > parameter(const Size) const override
Real Hprime2(const Time t) const override
const std::string & name() const
virtual const Currency & currency() const
Piecewise Constant Helper 1.
Real y(const Time t) const
Real inverse(const Real y) const
const QuantLib::ext::shared_ptr< PseudoParameter > y_
Real int_y_sqr(const Time t) const
int_0^t y^2(s) ds
Real direct(const Real x) const
Piecewise Constant Helper2.
Real y(const Time t) const
Real inverse(const Real y) const
Real exp_m_int_y(const Time t) const
exp(int_0^t -y(s)) ds
Real int_exp_m_int_y(const Time t) const
int_0^t exp(int_0^s -y(u) du) ds
const QuantLib::ext::shared_ptr< PseudoParameter > y_
Real direct(const Real x) const
Interest Rate Linear Gaussian Markov 1 factor parametrization.
QuantLib::SparseMatrix inverse(QuantLib::SparseMatrix m)
Lgm1fPiecewiseConstantParametrization< YieldTermStructure > IrLgm1fPiecewiseConstantParametrization
helper classes for piecewise constant parametrizations