31 const ext::shared_ptr<PiecewiseConstantCorrelation>& fwdCorr,
35 numberOfRates_(fwdCorr->numberOfRates()),
36 swapCorrMatrices_(fwdCorr->correlations().size())
39 "mismatch between number of rates in fwdCorr (" <<
44 curveState, displacement);
46 const std::vector<Matrix>& fwdCorrMatrices = fwdCorr->correlations();
47 for (
Size k = 0; k<fwdCorrMatrices.size(); ++k) {
52 const std::vector<Time>& corrTimes =
fwdCorr_->times();
54 for (
Size j=0; j<=i; ++j)
73 const std::vector<Matrix>&
const std::vector< Time > & rateTimes() const override
const std::vector< Time > & times() const override
std::vector< Matrix > swapCorrMatrices_
const std::vector< Matrix > & correlations() const override
Size numberOfRates() const override
ext::shared_ptr< PiecewiseConstantCorrelation > fwdCorr_
CotSwapFromFwdCorrelation(const ext::shared_ptr< PiecewiseConstantCorrelation > &fwdCorr, const CurveState &curveState, Spread displacement)
Covariance decomposition into correlation and variances.
const Matrix & correlationMatrix() const
Curve state for market-model simulations
Size numberOfRates() const
const std::vector< Time > & rateTimes() const
Matrix used in linear algebra.
static Matrix coterminalSwapZedMatrix(const CurveState &cs, Spread displacement)
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
Covariance matrix calculation.
Real Spread
spreads on interest rates
std::size_t Size
size of a container
Matrix transpose(const Matrix &m)
Utility functions for mapping between swap rate and forward rate.