30 const std::vector<Time>& rateTimes)
31 : variances_(rateTimes.size()-1, 0.0),
32 volatilities_(rateTimes.size()-1, 0.0),
33 rateTimes_(rateTimes) ,
42 "Rate times must contain at least two values");
44 "resetIndex (" << resetIndex <<
45 ") must be less than rateTimes.size()-1 (" <<
48 for (
Size i=0; i<=resetIndex; ++i) {
75 const std::vector<Real>&
Abcd functional form for instantaneous volatility
Real variance(Time tMin, Time tMax, Time T) const
const std::vector< Real > & variances() const override
const std::vector< Time > & rateTimes() const override
PiecewiseConstantAbcdVariance(Real a, Real b, Real c, Real d, Size resetIndex, const std::vector< Time > &rateTimes)
std::vector< Real > variances_
std::vector< Time > rateTimes_
std::vector< Real > volatilities_
const std::vector< Real > & volatilities() const override
void getABCD(Real &a, Real &b, Real &c, Real &d) const
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
ext::function< Real(Real)> b
Real Time
continuous quantity with 1-year units
std::size_t Size
size of a container
void checkIncreasingTimes(const std::vector< Time > ×)
check for strictly increasing times, first time greater than zero