Rechercher une page de manuel
QuantLib_OneFactorCopula
Langue: en
Version: 161152 (fedora - 05/07/09)
Section: 3 (Bibliothèques de fonctions)
Sommaire
- NAME
- SYNOPSIS
- Detailed Description
- Member Function Documentation
- virtual Real density (Real m) const [pure virtual]
- virtual Real cumulativeZ (Real z) const [pure virtual]
- virtual Real cumulativeY (Real y) const [virtual]
- virtual Real inverseCumulativeY (Real p) const [virtual]
- Real conditionalProbability (Real prob, Real m) const
- std::vector<Real> conditionalProbability (const std::vector< Real > & prob, Real m) const
- Real integral (Real p) const
- Real integral (const F & f, std::vector< Real > & probabilities) const
- Distribution integral (const F & f, const std::vector< Real > & nominals, const std::vector< Real > & probabilities) const
- int checkMoments (Real tolerance) const
- Author
NAME
QuantLib::OneFactorCopula - Abstract base class for one-factor copula models.SYNOPSIS
#include <ql/experimental/credit/onefactorcopula.hpp>
Inherits QuantLib::LazyObject.
Inherited by OneFactorGaussianCopula, OneFactorGaussianStudentCopula, OneFactorStudentCopula, and OneFactorStudentGaussianCopula.
Public Member Functions
OneFactorCopula (const Handle< Quote > &correlation, Real maximum=5, Size integrationSteps=50)
virtual Real density (Real m) const =0
Density function of M.
virtual Real cumulativeZ (Real z) const =0
Cumulative distribution of Z.
virtual Real cumulativeY (Real y) const
Cumulative distribution of Y.
virtual Real inverseCumulativeY (Real p) const
Inverse cumulative distribution of Y.
Real correlation () const
Single correlation parameter.
Real conditionalProbability (Real prob, Real m) const
Conditional probability.
std::vector< Real > conditionalProbability (const std::vector< Real > &prob, Real m) const
Vector of conditional probabilities.
Real integral (Real p) const
template<class F > Real integral (const F &f, std::vector< Real > &probabilities) const
template<class F > Distribution integral (const F &f, const std::vector< Real > &nominals, const std::vector< Real > &probabilities) const
int checkMoments (Real tolerance) const
Protected Attributes
Handle< Quote > correlation_
Real max_
Size steps_
std::vector< Real > y_
std::vector< Real > cumulativeY_
Detailed Description
Abstract base class for one-factor copula models.
Reference: John Hull and Alan White, The Perfect Copula, June 2006
Let $Q_i(t)$ be the cumulative probability of default of counterparty i before time t.
In a one-factor model, consider random variables \ where $M$ and $Z_i$ have independent zero-mean unit-variance distributions and $-1
lation between $Y_i$ and $Y_j$ is then $a_i a_j$.
Let $F_Y(y)$ be the cumulative distribution function of $Y_i$. $y$ is mapped to $t$ such that percentiles match, i.e. $F_Y(y)=Q_i(t)$ or $y=F_Y^{-1}(Q_i(t))$.
Now let $F_Z(z)$ be the cumulated distribution function of $Z_i$. For given realization of $M$, this determines the distribution of $y$: \
The distribution functions of $ M, Z_i $ are specified in derived classes. The distribution function of $ Y $ is then given by the convolution \ where $ D_Z(z) $ and $ D_M(m) $ are the probability densities of $ Z$ and $ M, $ respectively.
This convolution can also be written \
or
\.PP In general, $ F_Y(y) $ needs to be computed numerically.
Possible enhancements
- Improve on simple Euler integration
Member Function Documentation
virtual Real density (Real m) const [pure virtual]
Density function of M.
Derived classes must override this method and ensure zero mean and unit variance.
Implemented in OneFactorGaussianCopula, OneFactorStudentCopula, OneFactorGaussianStudentCopula, and OneFactorStudentGaussianCopula.
virtual Real cumulativeZ (Real z) const [pure virtual]
Cumulative distribution of Z.
Derived classes must override this method and ensure zero mean and unit variance.
Implemented in OneFactorGaussianCopula, OneFactorStudentCopula, OneFactorGaussianStudentCopula, and OneFactorStudentGaussianCopula.
virtual Real cumulativeY (Real y) const [virtual]
Cumulative distribution of Y.
This is the default implementation based on tabulated data. The table needs to be filled by derived classes. If analytic calculation is feasible, this method can also be overridden.
Reimplemented in OneFactorGaussianCopula.
virtual Real inverseCumulativeY (Real p) const [virtual]
Inverse cumulative distribution of Y.
This is the default implementation based on tabulated data. The table needs to be filled by derived classes. If analytic calculation is feasible, this method can also be overridden.
Reimplemented in OneFactorGaussianCopula.
Real conditionalProbability (Real prob, Real m) const
Conditional probability.
\
std::vector<Real> conditionalProbability (const std::vector< Real > & prob, Real m) const
Vector of conditional probabilities.
\
Real integral (Real p) const
Integral over the density $ ho(m) $ of M and the conditional probability related to p:
\
Real integral (const F & f, std::vector< Real > & probabilities) const
Integral over the density $ ho(m) $ of M and a one-dimensional function $ f $ of conditional probabilities related to the input vector of probabilities p:
\
Distribution integral (const F & f, const std::vector< Real > & nominals, const std::vector< Real > & probabilities) const
Integral over the density $ ho(m) $ of M and a multi-dimensional function $ f $ of conditional probabilities related to the input vector of probabilities p:
\
int checkMoments (Real tolerance) const
Check moments (unit norm, zero mean and unit variance) of the distributions of M, Z, and Y by numerically integrating the respective density. Parameter tolerance is the maximum tolerable absolute error.
Author
Generated automatically by Doxygen for QuantLib from the source code.
Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre