compute stop light bounds for overlapping and correlated PL More...
#include <ql/math/matrix.hpp>#include <ql/math/matrixutilities/pseudosqrt.hpp>#include <ql/types.hpp>#include <vector>Functions | |
| std::vector< Size > | stopLightBounds (const std::vector< Real > &stopLightP, const Size observations, const Size numberOfDays=10, const Real p=0.99, const Size numberOfPortfolios=1, const Matrix &correlation=Matrix(1, 1, 1.0), const Size samples=1500000, const Size seed=42, const SalvagingAlgorithm::Type salvaging=SalvagingAlgorithm::Spectral, const Size exceptions=Null< Size >(), Real *cumProb=nullptr) |
| std::vector< Size > | stopLightBoundsTabulated (const std::vector< Real > &stopLightP, const Size observations, const Size numberOfDays=10, const Real p=0.99) |
| std::vector< Size > | stopLightBounds (const std::vector< Real > &stopLightP, const Size observations, const Real p, const Size exceptions=Null< Size >(), Real *cumProb=nullptr) |
| std::vector< std::pair< Size, std::vector< Size > > > | generateStopLightBoundTable (const std::vector< Size > &observations, const std::vector< Real > &stopLightP, const Size samples, const Size seed, const Size numberOfDays=10, const Real p=0.99) |
compute stop light bounds for overlapping and correlated PL
| std::vector<Size> QuantExt::stopLightBounds | ( | const std::vector< Real > & | stopLightP, |
| const Size | observations, | ||
| const Size | numberOfDays = 10, |
||
| const Real | p = 0.99, |
||
| const Size | numberOfPortfolios = 1, |
||
| const Matrix & | correlation = Matrix(1, 1, 1.0), |
||
| const Size | samples = 1500000, |
||
| const Size | seed = 42, |
||
| const SalvagingAlgorithm::Type | salvaging = SalvagingAlgorithm::Spectral, |
||
| const Size | exceptions = Null< Size >(), |
||
| Real * | cumProb = nullptr |
||
| ) |
Computes the maximum number of exceptions n such that the probability of having less or equal to n exceptions is less than p for a given vector of stop light levels (0.95 = green, 0.9999 = red in the Basel approach). An overlapping PL over a given period is considered, possibly also several portfolios with correlated PL. If the parameter exceptions m is not null, cumProb is set to the probability of having less of equal to m exceptions (this is not affecting the return value).