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

Probability formulas and algorithms. More...

#include <lossdistribution.hpp>

+ Inheritance diagram for LossDist:
+ Collaboration diagram for LossDist:

Public Member Functions

 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
 

Static Public Member Functions

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

Probability formulas and algorithms.

Definition at line 34 of file lossdistribution.hpp.

Constructor & Destructor Documentation

◆ LossDist()

LossDist ( )
default

◆ ~LossDist()

virtual ~LossDist ( )
virtualdefault

Member Function Documentation

◆ operator()()

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

◆ buckets()

virtual Size buckets ( ) const
pure virtual

◆ maximum()

virtual Real maximum ( ) const
pure virtual

◆ binomialProbabilityOfNEvents()

Real binomialProbabilityOfNEvents ( int  n,
std::vector< Real > &  p 
)
static

Binomial probability of n defaults using prob[0]

Definition at line 28 of file lossdistribution.cpp.

◆ binomialProbabilityOfAtLeastNEvents()

Real binomialProbabilityOfAtLeastNEvents ( int  n,
std::vector< Real > &  p 
)
static

Binomial probability of at least n defaults using prob[0]

Definition at line 35 of file lossdistribution.cpp.

+ Here is the caller graph for this function:

◆ probabilityOfNEvents() [1/2]

vector< Real > probabilityOfNEvents ( std::vector< Real > &  p)
static

Probability of exactly n default events 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)

Definition at line 49 of file lossdistribution.cpp.

+ Here is the caller graph for this function:

◆ probabilityOfNEvents() [2/2]

Real probabilityOfNEvents ( int  n,
std::vector< Real > &  p 
)
static

Definition at line 67 of file lossdistribution.cpp.

+ Here is the call graph for this function:

◆ probabilityOfAtLeastNEvents()

Real probabilityOfAtLeastNEvents ( int  n,
std::vector< Real > &  p 
)
static

Probability of at least n defaults

Definition at line 112 of file lossdistribution.cpp.

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