24#ifndef quantext_cirpp_constant_parametrization_hpp
25#define quantext_cirpp_constant_parametrization_hpp
29#include <ql/errors.hpp>
40 const std::string&
name = std::string());
42 Real
kappa(
const Time t)
const;
43 Real
theta(
const Time t)
const;
44 Real
sigma(
const Time t)
const;
45 Real
y0(
const Time t)
const;
47 const QuantLib::ext::shared_ptr<Parameter>
parameter(
const Size)
const;
50 Real
direct(
const Size i,
const Real x)
const;
51 Real
inverse(
const Size j,
const Real y)
const;
61 const Handle<TS>& termStructure,
62 const Real kappa,
const Real theta,
63 const Real sigma,
const Real y0,
65 const std::string& name)
77 constexpr Real eps = 1E-10;
82 constexpr Real eps = 1E-10;
83 return std::sqrt(y - eps);
87 return direct(0, kappa_->params()[0]);
91 return direct(1, theta_->params()[0]);
95 return direct(2, sigma_->params()[0]);
99 return direct(3, y0_->params()[0]);
104 QL_REQUIRE(i < 4,
"parameter " << i <<
" does not exist, only have 0..3");
CIR++ Constant Parametrization.
const QuantLib::ext::shared_ptr< Parameter > parameter(const Size) const
Real y0(const Time t) const
Real direct(const Size i, const Real x) const
const QuantLib::ext::shared_ptr< PseudoParameter > theta_
Real kappa(const Time t) const
Real theta(const Time t) const
const QuantLib::ext::shared_ptr< PseudoParameter > sigma_
const QuantLib::ext::shared_ptr< PseudoParameter > y0_
CirppConstantParametrization(const Currency ¤cy, const Handle< TS > &termStructure, const Real kappa, const Real theta, const Real sigma, const Real y0, const bool shifted, const std::string &name=std::string())
Real inverse(const Size j, const Real y) const
const QuantLib::ext::shared_ptr< PseudoParameter > kappa_
Real sigma(const Time t) const
const Handle< TS > termStructure() const
const bool shifted() const
const std::string & name() const
virtual const Currency & currency() const
Parameter that accesses CalibratedModel.
CirppConstantParametrization< DefaultProbabilityTermStructure > CrCirppConstantParametrization
CirppConstantParametrization< YieldTermStructure > IrCirppConstantParametrization