19#include <ql/math/comparison.hpp>
25 const Handle<QuantExt::PriceTermStructure>& priceCurve,
26 const Handle<Quote>& fxSpotToday,
27 const Real sigma,
const Real kappa,
29 :
Parametrization(currency, name), priceCurve_(priceCurve), fxSpotToday_(fxSpotToday),
39 if (fabs(kap) < QL_EPSILON)
40 return sig * sig * (T-t);
42 return sig * sig * (1.0 - std::exp(-2.0 * kap * (T-t))) / (2.0 * kap);
Real inverse(const Size i, const Real y) const override
Real VtT(Real t, Real T)
Variance V(t,T) used in the computation of F(t,T)
CommoditySchwartzParametrization(const Currency ¤cy, const std::string &name, const Handle< QuantExt::PriceTermStructure > &priceCurve, const Handle< Quote > &fxSpotToday, const Real sigma, const Real kappa, bool driftFreeState=false)
const QuantLib::ext::shared_ptr< PseudoParameter > sigma_
Real sigmaParameter() const
Inspector for the current value of model parameter sigma (direct)
Real kappaParameter() const
Inspector for the current value of model parameter kappa (direct)
const QuantLib::ext::shared_ptr< PseudoParameter > kappa_
Real sigma(const Time t) const
State variable Y's diffusion at time t: sigma * exp(kappa * t)
Parameter that accesses CalibratedModel.
Schwartz commodity model parametrization.
std::vector< bool > driftFreeState