29 : numberOfFactors_(c->swapPseudoRoots().front().columns()),
30 numberOfRates_(c->swapPseudoRoots().front().rows()),
31 numberOfSteps_(c->swapPseudoRoots().size()),
32 initialRates_(c->curveState()->coterminalSwapRates()), displacements_(c->displacements()),
33 evolution_(c->curveState()->rateTimes()), covariancePseudoRoots_(c->swapPseudoRoots()) {}
37 const std::vector<Rate>& rateTimes,
38 std::vector<Rate> initialRates,
39 const std::vector<Spread>& displacements)
40 : numberOfFactors_(covariancePseudoRoots.front().columns()),
41 numberOfRates_(covariancePseudoRoots.front().rows()),
42 numberOfSteps_(covariancePseudoRoots.size()), initialRates_(
std::move(initialRates)),
43 displacements_(displacements), evolution_(rateTimes),
44 covariancePseudoRoots_(covariancePseudoRoots) {
47 "Rate times must contain at least two values");
62 ") must be equal to covariancePseudoRoots.size() (" <<
63 covariancePseudoRoots.size() <<
")");
68 <<
": pseudoRoot has wrong number of rows: "
74 <<
": pseudoRoot has wrong number of columns: "
const std::vector< Spread > & displacements() const override
PseudoRootFacade(const ext::shared_ptr< CTSMMCapletCalibration > &calibrator)
std::vector< Matrix > covariancePseudoRoots_
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
std::size_t Size
size of a container
void checkIncreasingTimes(const std::vector< Time > ×)
check for strictly increasing times, first time greater than zero
pseudo square root of a real symmetric matrix