functions to compute delta or delta-gamma VaR numbers More...
#include <qle/math/covariancesalvage.hpp>#include <ql/math/comparison.hpp>#include <ql/math/array.hpp>#include <ql/math/matrix.hpp>#include <ql/math/matrixutilities/choleskydecomposition.hpp>#include <ql/math/matrixutilities/pseudosqrt.hpp>#include <ql/math/randomnumbers/rngtraits.hpp>#include <boost/accumulators/accumulators.hpp>#include <boost/accumulators/statistics/stats.hpp>#include <boost/accumulators/statistics/tail_quantile.hpp>#include <boost/foreach.hpp>Functions | |
| Real | deltaVar (const Matrix &omega, const Array &delta, const Real p, const CovarianceSalvage &sal=NoCovarianceSalvage()) |
| function that computes a delta VaR More... | |
| Real | deltaGammaVarNormal (const Matrix &omega, const Array &delta, const Matrix &gamma, const Real p, const CovarianceSalvage &sal=NoCovarianceSalvage()) |
| function that computes a delta-gamma normal VaR More... | |
| template<class RNG > | |
| Real | deltaGammaVarMc (const Matrix &omega, const Array &delta, const Matrix &gamma, const Real p, const Size paths, const Size seed, const CovarianceSalvage &sal=NoCovarianceSalvage()) |
| function that computes a delta-gamma VaR using Monte Carlo (single quantile) More... | |
| template<class RNG > | |
| std::vector< Real > | deltaGammaVarMc (const Matrix &omega, const Array &delta, const Matrix &gamma, const std::vector< Real > &p, const Size paths, const Size seed, const CovarianceSalvage &sal=NoCovarianceSalvage()) |
| function that computes a delta-gamma VaR using Monte Carlo (multiple quantiles) More... | |
| void | check (const Real p) |
| void | check (const Matrix &omega, const Array &delta) |
| void | check (const Matrix &omega, const Array &delta, const Matrix &gamma) |
| template<typename A > | |
| Real | absMax (const A &a) |
| Real | deltaGammaVarCornishFisher (const Matrix &omega, const Array &delta, const Matrix &gamma, const Real p, const CovarianceSalvage &sal=NoCovarianceSalvage()) |
| Real | deltaGammaVarSaddlepoint (const Matrix &omega, const Array &delta, const Matrix &gamma, const Real p, const CovarianceSalvage &sal=NoCovarianceSalvage()) |
functions to compute delta or delta-gamma VaR numbers
| Real QuantExt::deltaVar | ( | const Matrix & | omega, |
| const Array & | delta, | ||
| const Real | p, | ||
| const CovarianceSalvage & | sal = NoCovarianceSalvage() |
||
| ) |
function that computes a delta VaR
For a given covariance matrix and a delta vector this function computes a parametric var w.r.t. a given confidence level for multivariate normal risk factors.
| Real QuantExt::deltaGammaVarNormal | ( | const Matrix & | omega, |
| const Array & | delta, | ||
| const Matrix & | gamma, | ||
| const Real | p, | ||
| const CovarianceSalvage & | sal = NoCovarianceSalvage() |
||
| ) |
function that computes a delta-gamma normal VaR
For a given a covariance matrix, a delta vector and a gamma matrix this function computes a parametric var w.r.t. a given confidence level. The gamma matrix is taken into account when computing the variance of the PL distribution, but the PL distribution is still assumed to be normal.
| Real deltaGammaVarMc | ( | const Matrix & | omega, |
| const Array & | delta, | ||
| const Matrix & | gamma, | ||
| const Real | p, | ||
| const Size | paths, | ||
| const Size | seed, | ||
| const CovarianceSalvage & | sal = NoCovarianceSalvage() |
||
| ) |
function that computes a delta-gamma VaR using Monte Carlo (single quantile)
For a given a covariance matrix, a delta vector and a gamma matrix this function computes a parametric var w.r.t. a given confidence level. The var quantile is estimated from Monte-Carlo realisations of a second order sensitivity based PL.
| std::vector< Real > deltaGammaVarMc | ( | const Matrix & | omega, |
| const Array & | delta, | ||
| const Matrix & | gamma, | ||
| const std::vector< Real > & | p, | ||
| const Size | paths, | ||
| const Size | seed, | ||
| const CovarianceSalvage & | sal = NoCovarianceSalvage() |
||
| ) |
function that computes a delta-gamma VaR using Monte Carlo (multiple quantiles)
For a given a covariance matrix, a delta vector and a gamma matrix this function computes a parametric var w.r.t. a vector of given confidence levels. The var quantile is estimated from Monte-Carlo realisations of a second order sensitivity based PL.