QuantLib: GaussianLHPLossModel Class Reference

A free/open-source library for quantitative finance Reference manual - version 1.12

Public Types | Public Member Functions | Protected Member Functions | List of all members
GaussianLHPLossModel Class Reference

`#include <ql/experimental/credit/gaussianlhplossmodel.hpp>`

Inheritance diagram for GaussianLHPLossModel:
[legend]

## Public Types
typedef GaussianCopulaPolicy | copulaType
Public Types inherited from LatentModel< GaussianCopulaPolicy >
typedef GaussianCopulaPolicy | copulaType
Public Types inherited from Observer
typedef std::set< boost::shared_ptr< Observable > > | set_type
typedef set_type::iterator | iterator

## Public Member Functions
| GaussianLHPLossModel (const Handle< Quote > &correlQuote, const std::vector< Handle< RecoveryRateQuote > > &quotes)
| GaussianLHPLossModel (Real correlation, const std::vector< Real > &recoveries)
| GaussianLHPLossModel (const Handle< Quote > &correlQuote, const std::vector< Real > &recoveries)
void | update ()
Real | expectedTrancheLoss (const Date &d) const
Real | probOverLoss (const Date &d, Real remainingLossFraction) const
Real | expectedShortfall (const Date &d, Probability perctl) const
| Returns the ESF as an absolute amount (rather than a fraction)
Real | percentile (const Date &d, Real perctl) const
| Value at Risk given a default loss percentile.
Probability | averageProb (const Date &d) const
Real | averageRecovery (const Date &d) const
Public Member Functions inherited from Observable
| Observable (const Observable &)
Observable & | operator= (const Observable &)
void | notifyObservers ()
Public Member Functions inherited from LatentModel< GaussianCopulaPolicy >
void | update ()
Real | latentVarValue (const std::vector< Real > &allFactors, Size iVar) const
const copulaType & | copula () const
Size | size () const
Size | numFactors () const
| Number of systemic factors.
Size | numTotalFactors () const
| Number of total free random factors; systemic and idiosyncratic.
| LatentModel (const std::vector< std::vector< Real > > &factorsWeights, const typename copulaType::initTraits &ini=copulaType::initTraits())
| LatentModel (const std::vector< Real > &factorsWeight, const typename copulaType::initTraits &ini=copulaType::initTraits())
| LatentModel (const Real correlSqr, Size nVariables, const typename copulaType::initTraits &ini=copulaType::initTraits())
| LatentModel (const Handle< Quote > &singleFactorCorrel, Size nVariables, const typename copulaType::initTraits &ini=copulaType::initTraits())
const std::vector< std::vector< Real > > & | factorWeights () const
| Provides values of the factors \( a_{i,k} \).
const std::vector< Real > & | idiosyncFctrs () const
| Provides values of the normalized idiosyncratic factors \( Z_i \).
Real | latentVariableCorrel (Size iVar1, Size iVar2) const
| Latent variable correlations:
Probability | cumulativeY (Real val, Size iVariable) const
Probability | cumulativeZ (Real z) const
| Cumulative distribution of Z, the idiosyncratic/error factors.
Probability | density (const std::vector< Real > &m) const
| Density function of M, the market/systemic factors.
Real | inverseCumulativeDensity (Probability p, Size iFactor) const
| Inverse cumulative distribution of the systemic factor iFactor.
Real | inverseCumulativeY (Probability p, Size iVariable) const
Real | inverseCumulativeZ (Probability p) const
Disposable< std::vector< Real > > | allFactorCumulInverter (const std::vector< Real > &probs) const
Real | integratedExpectedValue (const boost::function< Real(const std::vector< Real > &v1)> &f) const
Disposable< std::vector< Real > > | integratedExpectedValue (const boost::function< Disposable< std::vector< Real > >(const std::vector< Real > &v1)> &f) const
Public Member Functions inherited from Observer
| Observer (const Observer &)
Observer & | operator= (const Observer &)
std::pair< iterator, bool > | registerWith (const boost::shared_ptr< Observable > &)
void | registerWithObservables (const boost::shared_ptr< Observer > &)
Size | unregisterWith (const boost::shared_ptr< Observable > &)
void | unregisterWithAll ()
virtual void | deepUpdate ()

## Protected Member Functions
Real | percentilePortfolioLossFraction (const Date &d, Real perctl) const
Real | expectedRecovery (const Date &d, Size iName, const DefaultProbKey &ik) const
Protected Member Functions inherited from DefaultLossModel
virtual Disposable< std::vector< Real > > | splitVaRLevel (const Date &d, Real loss) const
| Associated VaR fraction to each counterparty.
virtual Disposable< std::vector< Real > > | splitESFLevel (const Date &d, Real loss) const
| Associated ESF fraction to each counterparty.
virtual Disposable< std::map< Real, Probability > > | lossDistribution (const Date &) const
| Full loss distribution.
virtual Real | densityTrancheLoss (const Date &d, Real lossFraction) const
| Probability density of a given loss fraction of the basket notional.
virtual Disposable< std::vector< Probability > > | probsBeingNthEvent (Size n, const Date &d) const
virtual Real | defaultCorrelation (const Date &d, Size iName, Size jName) const
| Pearsons' default probability correlation.
virtual Probability | probAtLeastNEvents (Size n, const Date &d) const
Protected Member Functions inherited from LatentModel< GaussianCopulaPolicy >
virtual const boost::shared_ptr< LMIntegration > & | integration () const

## Additional Inherited Members
Protected Attributes inherited from DefaultLossModel
RelinkableHandle< Basket > | basket_
Protected Attributes inherited from LatentModel< GaussianCopulaPolicy >
std::vector< std::vector< Real > > | factorWeights_
Handle< Quote > | cachedMktFactor_
std::vector< Real > | idiosyncFctrs_
Size | nFactors_
| Number of systemic factors.
Size | nVariables_
| Number of latent model variables, idiosyncratic terms or model dim.
copulaType | copula_

## Detailed Description

Portfolio loss model with analytical expected tranche loss for a large homogeneous pool with Gaussian one-factor copula. See for example "The Normal Inverse Gaussian Distribution for Synthetic CDO pricing.", Anna Kalemanova, Bernd Schmid, Ralf Werner, Journal of Derivatives, Vol. 14, No. 3, (Spring 2007), pp. 80-93. http://www.defaultrisk.com/pp_crdrv_91.htm

It can be used to price a credit derivative or to provide risk metrics of a portfolio.

## Member Function Documentation

## ◆ update()

void update | ( |  | ) |
| virtual

This method must be implemented in derived classes. An instance of Observer does not call this method directly: instead, it will be called by the observables the instance registered with when they need to notify any changes.

Implements Observer.

## ◆ probOverLoss()

Real probOverLoss | ( | const Date & | d,
|  | Real | remainingLossFraction
| ) |  | const
| virtual

The passed remainingLossFraction is in live tranche units, not portfolio as a fraction of the remaining(live) tranche (i.e. a_remaining=0% and det_remaining=100%)

Reimplemented from DefaultLossModel.

## ◆ expectedRecovery()

Real expectedRecovery | ( | const Date & | ,
|  | Size | iName,
|  | const DefaultProbKey & |
| ) |  | const
| protectedvirtual

Expected RR for name conditinal to default by that date.

Reimplemented from DefaultLossModel.