QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
|
#include <ql/experimental/math/latentmodel.hpp>
Public Types | |
typedef Sample< std::vector< Real > > | sample_type |
Public Member Functions | |
FactorSampler (const copulaType &copula, BigNatural seed=0) | |
const sample_type & | nextSequence () const |
Private Attributes | |
USNG | sequenceGen_ |
sample_type | x_ |
const copulaType & | copula_ |
Allows generation or random samples of the latent variable.
Generates samples of all the factors in the latent model according to the given copula as random sequence. The default implementation given uses the inversion in the copula policy (which must be present). USNG is expected to be a uniform sequence generator in the default implementation.
Definition at line 413 of file latentmodel.hpp.
typedef Sample<std::vector<Real> > sample_type |
Definition at line 415 of file latentmodel.hpp.
|
explicit |
Definition at line 416 of file latentmodel.hpp.
const sample_type & nextSequence | ( | ) | const |
Returns a sample of the factor set \( M_k\,Z_i\). This method has the vocation of being specialized at particular types of the copula with a more efficient inversion to generate the random variables modelled (e.g. Box-Muller for a gaussian). Here a default implementation is provided based directly on the inversion of the cumulative distribution from the copula. Care has to be taken in potential specializations that the generator algorithm is compatible with an eventual concurrence of the simulations.
Definition at line 431 of file latentmodel.hpp.
|
private |
Definition at line 438 of file latentmodel.hpp.
|
mutableprivate |
Definition at line 439 of file latentmodel.hpp.
|
private |
Definition at line 441 of file latentmodel.hpp.