QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
#include <gaussiancopulapolicy.hpp>
Public Types | |
typedef int | initTraits |
Public Member Functions | |
GaussianCopulaPolicy (const std::vector< std::vector< Real > > &factorWeights=std::vector< std::vector< Real > >(), const initTraits &dummy=int()) | |
Size | numFactors () const |
initTraits | getInitTraits () const |
returns a copy of the initialization arguments More... | |
Probability | cumulativeY (Real val, Size iVariable) const |
Probability | cumulativeZ (Real z) const |
Cumulative probability of the idiosyncratic factors (all the same) More... | |
Probability | density (const std::vector< Real > &m) const |
Real | inverseCumulativeY (Probability p, Size iVariable) const |
Real | inverseCumulativeZ (Probability p) const |
Real | inverseCumulativeDensity (Probability p, Size iFactor) const |
std::vector< Real > | allFactorCumulInverter (const std::vector< Real > &probs) const |
Private Attributes | |
Size | numFactors_ |
Static Private Attributes | |
static const NormalDistribution | density_ |
static const CumulativeNormalDistribution | cumulative_ |
Gaussian Latent Model's copula policy. Its simplicity is a result of the convolution stability of the Gaussian distribution.
Definition at line 35 of file gaussiancopulapolicy.hpp.
typedef int initTraits |
Definition at line 37 of file gaussiancopulapolicy.hpp.
|
explicit |
Definition at line 39 of file gaussiancopulapolicy.hpp.
Size numFactors | ( | ) | const |
Number of independent random factors. This is the only methos that ould stop the class from being static, it is needed for the MC generator construction.
Definition at line 59 of file gaussiancopulapolicy.hpp.
initTraits getInitTraits | ( | ) | const |
returns a copy of the initialization arguments
Definition at line 64 of file gaussiancopulapolicy.hpp.
Probability cumulativeY | ( | Real | val, |
Size | iVariable | ||
) | const |
Cumulative probability of a given latent variable The iVariable parameter is the index of the requested variable.
Definition at line 71 of file gaussiancopulapolicy.hpp.
Probability cumulativeZ | ( | Real | z | ) | const |
Cumulative probability of the idiosyncratic factors (all the same)
Definition at line 75 of file gaussiancopulapolicy.hpp.
Probability density | ( | const std::vector< Real > & | m | ) | const |
Probability density of a given realization of values of the systemic factors (remember they are independent). In the normal case, since they all follow the same law it is just a trivial product of the same density. Intended to be used in numerical integration of an arbitrary function depending on those values.
Definition at line 85 of file gaussiancopulapolicy.hpp.
Real inverseCumulativeY | ( | Probability | p, |
Size | iVariable | ||
) | const |
Returns the inverse of the cumulative distribution of the (modelled) latent variable (as indexed by iVariable). The normal stability avoids the convolution of the factors' distributions
Definition at line 93 of file gaussiancopulapolicy.hpp.
Real inverseCumulativeZ | ( | Probability | p | ) | const |
Returns the inverse of the cumulative distribution of the idiosyncratic factor (identically distributed for all latent variables)
Definition at line 99 of file gaussiancopulapolicy.hpp.
Real inverseCumulativeDensity | ( | Probability | p, |
Size | iFactor | ||
) | const |
Returns the inverse of the cumulative distribution of the systemic factor iFactor.
Definition at line 105 of file gaussiancopulapolicy.hpp.
Definition at line 110 of file gaussiancopulapolicy.hpp.
|
mutableprivate |
Definition at line 118 of file gaussiancopulapolicy.hpp.
|
staticprivate |
Definition at line 120 of file gaussiancopulapolicy.hpp.
|
staticprivate |
Definition at line 121 of file gaussiancopulapolicy.hpp.