27 const std::vector<Time>& rateTimes)
32 before_ = std::lower_bound(rateTimes.begin(), rateTimes.end(),
33 paymentTime) - rateTimes.begin();
37 if (
before_ > rateTimes.size()-2)
47 taus_[i] = rateTimes[i+1] - rateTimes[i];
55 std::vector<Real>& factors)
const
68 factors[i+1] = -preDF*
taus_[i]*Discounts[currentStep][i+1]/Discounts[currentStep][i];
80 factors[i+1] = -df*
taus_[i]*Discounts[currentStep][i+1]/Discounts[currentStep][i];
void getFactors(const Matrix &LIBORRates, const Matrix &Discounts, Size currentStep, std::vector< Real > &factors) const
MarketModelPathwiseDiscounter(Time paymentTime, const std::vector< Time > &rateTimes)
std::vector< Real > taus_
Matrix used in linear algebra.
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