ql/MonteCarlo/getcovariance.hpp File Reference


Detailed Description

Covariance matrix calculation.

#include <ql/Math/matrix.hpp>

Include dependency graph for getcovariance.hpp:

Include dependency graph

Namespaces

namespace  QuantLib

Classes

class  CovarianceDecomposition

Functions

template<class DataIterator>
Disposable< Matrix > getCovariance (DataIterator volBegin, DataIterator volEnd, const Matrix &corr, Real tolerance=1.0e-12)

Function Documentation

Disposable<Matrix> getCovariance DataIterator  volBegin,
DataIterator  volEnd,
const Matrix &  corr,
Real  tolerance = 1.0e-12
 

Combines the correlation matrix and the vector of volatilities to return the covariance matrix.

Note that only the symmetric part of the correlation matrix is used. Also it is assumed that the diagonal member of the correlation matrix equals one.

Precondition:
The correlation matrix must be symmetric with the diagonal members equal to one.

Tests:
tested on know values and cross checked with CovarianceDecomposition


QuantLib.org
QuantLib
Hosted by
SourceForge.net Logo
Documentation generated by
doxygen