36 return std::sqrt(
variance(tMin, tMax,
T)/(tMax-tMin));
44 return (*
this)(
T-
t) * (*
this)(
S-
t);
49 "integrations bounds (" << t1 <<
50 "," << t2 <<
") are in reverse order");
51 Time cutOff = std::min(
S,
T);
55 cutOff = std::min(t2, cutOff);
69 return (*
this)(
T-u)*(*
this)(
S-u);
74 if (
T<
t ||
S<
t)
return 0.0;
85 + 2*
c_*
c_*(2*
d_*
a_*(k2 + k3)*(k1 - 1)
89 - k1*k3*(1 +
c_*(
S -
t))
90 - k1*k2*(1 +
c_*(
T -
t)))
Abcd functional form for instantaneous volatility
Real covariance(Time t, Time T, Time S) const
Real instantaneousVolatility(Time t, Time T) const
Real instantaneousCovariance(Time u, Time T, Time S) const
Real volatility(Time tMin, Time tMax, Time T) const
AbcdFunction(Real a=-0.06, Real b=0.17, Real c=0.54, Real d=0.17)
Real instantaneousVariance(Time t, Time T) const
Real primitive(Time t, Time T, Time S) const
Real variance(Time tMin, Time tMax, Time T) const
AbcdSquared(Real a, Real b, Real c, Real d, Time T, Time S)
ext::shared_ptr< AbcdFunction > abcd_
Real operator()(Time t) const
floating-point comparisons
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
ext::function< Real(Real)> b
LinearInterpolation variance
Real Time
continuous quantity with 1-year units
bool close(const Quantity &m1, const Quantity &m2, Size n)
ext::shared_ptr< BlackVolTermStructure > v