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

Loss distribution with Hull-White bucketing. More...

#include <lossdistribution.hpp>

+ Inheritance diagram for LossDistBucketing:
+ Collaboration diagram for LossDistBucketing:

Public Member Functions

 LossDistBucketing (Size nBuckets, Real maximum, Real epsilon=1e-6)
 
Distribution operator() (const std::vector< Real > &volumes, const std::vector< Real > &probabilities) const override
 
Size buckets () const override
 
Real maximum () const override
 
- 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 Member Functions

int locateTargetBucket (Real loss, Size i0=0) const
 

Private Attributes

Size nBuckets_
 
Real maximum_
 
Real epsilon_
 

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 with Hull-White bucketing.

Loss distribution with Hull-White bucketing

Loss distribution for varying volumes and probabilities of default, independence assumed.

The implementation of the loss distribution follows

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 170 of file lossdistribution.hpp.

Constructor & Destructor Documentation

◆ LossDistBucketing()

LossDistBucketing ( Size  nBuckets,
Real  maximum,
Real  epsilon = 1e-6 
)

Definition at line 172 of file lossdistribution.hpp.

Member Function Documentation

◆ operator()()

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

Implements LossDist.

Definition at line 227 of file lossdistribution.cpp.

+ Here is the call graph for this function:

◆ buckets()

Size buckets ( ) const
overridevirtual

Implements LossDist.

Definition at line 177 of file lossdistribution.hpp.

◆ maximum()

Real maximum ( ) const
overridevirtual

Implements LossDist.

Definition at line 178 of file lossdistribution.hpp.

◆ locateTargetBucket()

int locateTargetBucket ( Real  loss,
Size  i0 = 0 
) const
private

Definition at line 292 of file lossdistribution.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ nBuckets_

Size nBuckets_
private

Definition at line 183 of file lossdistribution.hpp.

◆ maximum_

Real maximum_
private

Definition at line 184 of file lossdistribution.hpp.

◆ epsilon_

Real epsilon_
private

Definition at line 185 of file lossdistribution.hpp.