QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
Student-T Latent Model's copula policy. More...
#include <tcopulapolicy.hpp>
Classes | |
struct | initTraits |
Public Member Functions | |
TCopulaPolicy (const std::vector< std::vector< Real > > &factorWeights=std::vector< std::vector< Real > >(), const initTraits &vals=initTraits()) | |
Size | numFactors () const |
Number of independent random factors. More... | |
initTraits | getInitTraits () const |
returns a copy of the initialization arguments More... | |
const std::vector< Real > & | varianceFactors () const |
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 | |
std::vector< boost::math::students_t_distribution< Real > > | distributions_ |
std::vector< Real > | varianceFactors_ |
std::vector< CumulativeBehrensFisher > | latentVarsCumul_ |
std::vector< InverseCumulativeBehrensFisher > | latentVarsInverters_ |
Student-T Latent Model's copula policy.
Describes the copula of a set of normalized Student-T independent random factors to be fed into the latent variable model. The latent model requires the independent variables to be of unit variance so the policy expects the factors coefficients to be as usual and the T variables to be normalized, the normalization is performed by the policy. To normalize the random variables they are divided by the square root of the variance of each T ( \( \frac{\nu}{\nu-2}\))
Definition at line 41 of file tcopulapolicy.hpp.
|
explicit |
Delayed initialization of the distribution parameters and caches. To be called by the latent model.
Definition at line 26 of file tcopulapolicy.cpp.
Size numFactors | ( | ) | const |
Number of independent random factors.
Definition at line 66 of file tcopulapolicy.hpp.
initTraits getInitTraits | ( | ) | const |
returns a copy of the initialization arguments
Definition at line 72 of file tcopulapolicy.hpp.
const std::vector< Real > & varianceFactors | ( | ) | const |
Definition at line 81 of file tcopulapolicy.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 87 of file tcopulapolicy.hpp.
Probability cumulativeZ | ( | Real | z | ) | const |
Cumulative probability of the idiosyncratic factors (all the same)
Definition at line 95 of file tcopulapolicy.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). Intended to be used in numerical integration of an arbitrary function depending on those values.
Definition at line 104 of file tcopulapolicy.hpp.
Real inverseCumulativeY | ( | Probability | p, |
Size | iVariable | ||
) | const |
Returns the inverse of the cumulative distribution of the (modelled) latent variable (as indexed by iVariable). Involves the convolution of the factors' distributions.
Definition at line 120 of file tcopulapolicy.hpp.
Real inverseCumulativeZ | ( | Probability | p | ) | const |
Returns the inverse of the cumulative distribution of the idiosincratic factor. The LM here is limited to all idiosincratic factors following the same distribution.
Definition at line 131 of file tcopulapolicy.hpp.
Real inverseCumulativeDensity | ( | Probability | p, |
Size | iFactor | ||
) | const |
Returns the inverse of the cumulative distribution of the systemic factor iFactor.
Definition at line 138 of file tcopulapolicy.hpp.
Definition at line 65 of file tcopulapolicy.cpp.
|
mutableprivate |
Definition at line 149 of file tcopulapolicy.hpp.
|
mutableprivate |
Definition at line 150 of file tcopulapolicy.hpp.
|
mutableprivate |
Definition at line 151 of file tcopulapolicy.hpp.
|
mutableprivate |
Definition at line 152 of file tcopulapolicy.hpp.