QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
LossDistHomogeneous Class Reference

Loss Distribution for Homogeneous Pool. More...

#include <lossdistribution.hpp>

+ Inheritance diagram for LossDistHomogeneous:
+ Collaboration diagram for LossDistHomogeneous:

Public Member Functions

 LossDistHomogeneous (Size nBuckets, Real maximum)
 
Distribution operator() (Real volume, const std::vector< Real > &probabilities) const
 
Distribution operator() (const std::vector< Real > &volumes, const std::vector< Real > &probabilities) const override
 
Size buckets () const override
 
Real maximum () const override
 
Size size () const
 
Real volume () const
 
std::vector< Realprobability () const
 
std::vector< RealexcessProbability () const
 
- Public Member Functions inherited from LossDist
 LossDist ()=default
 
virtual ~LossDist ()=default
 
virtual Distribution operator() (const std::vector< Real > &volumes, const std::vector< Real > &probabilities) const =0
 
virtual Size buckets () const =0
 
virtual Real maximum () const =0
 

Private Attributes

Size nBuckets_
 
Real maximum_
 
Size n_ = 0
 
Real volume_ = 0.0
 
std::vector< Realprobability_
 
std::vector< RealexcessProbability_
 

Additional Inherited Members

- Static Public Member Functions inherited from LossDist
static Real binomialProbabilityOfNEvents (int n, std::vector< Real > &p)
 
static Real binomialProbabilityOfAtLeastNEvents (int n, std::vector< Real > &p)
 
static std::vector< RealprobabilityOfNEvents (std::vector< Real > &p)
 
static Real probabilityOfNEvents (int n, std::vector< Real > &p)
 
static Real probabilityOfAtLeastNEvents (int n, std::vector< Real > &p)
 

Detailed Description

Loss Distribution for Homogeneous Pool.

Loss Distribution for Homogeneous Pool

Loss distribution for equal volumes but varying probabilities of default.

The method builds the exact loss distribution for a homogeneous pool of underlyings iteratively by computing the convolution of the given loss distribution with the "loss distribution" of an additional credit following

Xiaofong Ma, "Numerical Methods for the Valuation of Synthetic Collateralized Debt Obligations", PhD Thesis, Graduate Department of Computer Science, University of Toronto, 2007
http://www.cs.toronto.edu/pub/reports/na/ma-07-phd.pdf (formula 2.1)

avoiding numerical instability of the algorithm by

John Hull and Alan White, "Valuation of a CDO and nth to default CDS without Monte Carlo simulation", Journal of Derivatives 12, 2, 2004

Definition at line 138 of file lossdistribution.hpp.

Constructor & Destructor Documentation

◆ LossDistHomogeneous()

LossDistHomogeneous ( Size  nBuckets,
Real  maximum 
)

Definition at line 140 of file lossdistribution.hpp.

Member Function Documentation

◆ operator()() [1/2]

Distribution operator() ( Real  volume,
const std::vector< Real > &  probabilities 
) const

Definition at line 182 of file lossdistribution.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator()() [2/2]

Distribution operator() ( const std::vector< Real > &  volumes,
const std::vector< Real > &  probabilities 
) const
overridevirtual

Implements LossDist.

Definition at line 220 of file lossdistribution.cpp.

+ Here is the call graph for this function:

◆ buckets()

Size buckets ( ) const
overridevirtual

Implements LossDist.

Definition at line 144 of file lossdistribution.hpp.

◆ maximum()

Real maximum ( ) const
overridevirtual

Implements LossDist.

Definition at line 145 of file lossdistribution.hpp.

◆ size()

Size size ( ) const

Definition at line 146 of file lossdistribution.hpp.

◆ volume()

Real volume ( ) const

Definition at line 147 of file lossdistribution.hpp.

+ Here is the caller graph for this function:

◆ probability()

std::vector< Real > probability ( ) const

Definition at line 148 of file lossdistribution.hpp.

◆ excessProbability()

std::vector< Real > excessProbability ( ) const

Definition at line 149 of file lossdistribution.hpp.

Member Data Documentation

◆ nBuckets_

Size nBuckets_
private

Definition at line 151 of file lossdistribution.hpp.

◆ maximum_

Real maximum_
private

Definition at line 152 of file lossdistribution.hpp.

◆ n_

Size n_ = 0
mutableprivate

Definition at line 153 of file lossdistribution.hpp.

◆ volume_

Real volume_ = 0.0
mutableprivate

Definition at line 154 of file lossdistribution.hpp.

◆ probability_

std::vector<Real> probability_
mutableprivate

Definition at line 155 of file lossdistribution.hpp.

◆ excessProbability_

std::vector<Real> excessProbability_
mutableprivate

Definition at line 156 of file lossdistribution.hpp.