20#ifndef quantlib_tcopula_policy_hpp
21#define quantlib_tcopula_policy_hpp
26#include <boost/math/distributions/students_t.hpp>
61 const std::vector<std::vector<Real> >& factorWeights =
62 std::vector<std::vector<Real> >(),
88 #if defined(QL_EXTRA_SAFETY_CHECKS)
90 "Latent variable index out of bounds.");
105 #if defined(QL_EXTRA_SAFETY_CHECKS)
107 "Incompatible sample and latent model sizes");
109 Real prodDensities = 1.;
110 for(
Size i=0; i<m.size(); i++)
114 return prodDensities;
121 #if defined(QL_EXTRA_SAFETY_CHECKS)
123 "Latent variable index out of bounds.");
139 #if defined(QL_EXTRA_SAFETY_CHECKS)
141 "Random factor variable index out of bounds.");
Student-T Latent Model's copula policy.
Real inverseCumulativeY(Probability p, Size iVariable) const
Real inverseCumulativeDensity(Probability p, Size iFactor) const
Size numFactors() const
Number of independent random factors.
std::vector< boost::math::students_t_distribution< Real > > distributions_
Probability density(const std::vector< Real > &m) const
initTraits getInitTraits() const
returns a copy of the initialization arguments
Probability cumulativeY(Real val, Size iVariable) const
std::vector< Real > allFactorCumulInverter(const std::vector< Real > &probs) const
std::vector< Real > varianceFactors_
Probability cumulativeZ(Real z) const
Cumulative probability of the idiosyncratic factors (all the same)
Real inverseCumulativeZ(Probability p) const
std::vector< CumulativeBehrensFisher > latentVarsCumul_
const std::vector< Real > & varianceFactors() const
std::vector< InverseCumulativeBehrensFisher > latentVarsInverters_
Classes and functions for error handling.
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
Maps function, bind and cref to either the boost or std implementation.
QL_INTEGER Integer
integer number
Real Probability
probability
std::size_t Size
size of a container
std::vector< Integer > tOrders