27#include <ql/handle.hpp>
28#include <ql/termstructures/yieldtermstructure.hpp>
29#include <ql/math/array.hpp>
30#include <ql/math/matrix.hpp>
41 const std::string&
name = std::string());
44 virtual QuantLib::Matrix
sigma_x(
const QuantLib::Time t)
const = 0;
46 virtual QuantLib::Array
kappa(
const QuantLib::Time t)
const = 0;
49 virtual QuantLib::Matrix
y(
const QuantLib::Time t)
const;
51 virtual QuantLib::Array
g(
const QuantLib::Time t,
const QuantLib::Time T)
const;
59 QuantLib::Size
n()
const {
return n_; }
60 QuantLib::Size
m()
const {
return m_; }
62 void update()
const override;
75 const QuantLib::Currency& currency,
const QuantLib::Handle<TS>& termStructure,
76 const std::string& name)
77 :
Parametrization(currency, name.empty() ? currency.code() : name), n_(n), m_(m), termStructure_(termStructure) {}
80 QL_FAIL(
"HwParametrization::y(t) not implemented");
84 QL_FAIL(
"HwParametrization::g(t, T) not implemented");
HW nF Parametrization with m driving Brownian motions.
const QuantLib::Handle< TS > termStructure_
HwParametrization(const QuantLib::Size n, const QuantLib::Size m, const QuantLib::Currency ¤cy, const QuantLib::Handle< TS > &termStructure, const std::string &name=std::string())
QuantLib::Size numberOfParameters() const override
void update() const override
const QuantLib::Handle< TS > termStructure() const
virtual QuantLib::Matrix sigma_x(const QuantLib::Time t) const =0
virtual QuantLib::Array g(const QuantLib::Time t, const QuantLib::Time T) const
virtual QuantLib::Matrix y(const QuantLib::Time t) const
virtual QuantLib::Array kappa(const QuantLib::Time t) const =0
const std::string & name() const
virtual const Currency & currency() const
virtual void update() const
HwParametrization< YieldTermStructure > IrHwParametrization
base class for model parametrizations