#include <qle/models/poollossmodel.hpp>
Public Member Functions | |
PoolLossModel (bool homogeneous, const QuantLib::ext::shared_ptr< ExtendedConstantLossLatentModel< CopulaPolicy > > &copula, QuantLib::Size nBuckets, QuantLib::Real max=5.0, QuantLib::Real min=-5.0, QuantLib::Size nSteps=50, bool useQuadrature=false, bool useStochasticRecovery=false) | |
QuantLib::Real | expectedTrancheLoss (const QuantLib::Date &d, Real recoveryRate=Null< Real >()) const override |
QuantLib::Real | percentile (const QuantLib::Date &d, QuantLib::Real percentile) const override |
QuantLib::Real | expectedShortfall (const QuantLib::Date &d, QuantLib::Probability percentile) const override |
QuantLib::Real | correlation () const override |
std::vector< std::vector< Real > > | marginalProbabilitiesVV (Date d, Real recoveryRate=Null< Real >()) const |
Private Member Functions | |
QuantLib::Distribution | lossDistrib (const QuantLib::Date &d, Real recoveryRate=Null< Real >()) const |
void | updateLGDs (Real recoveryRate=Null< Real >()) const |
void | updateThresholds (QuantLib::Date d, Real recoveryRate=Null< Real >()) const |
std::vector< Real > | updateCPRs (std::vector< QuantLib::Real > factor, Real recoveryRate=Null< Real >()) const |
void | resetModel () override |
Concrete models do now any updates/inits they need on basket reset. More... | |
QuantLib::Real | expectedTrancheLoss1 (const QuantLib::Date &d, Distribution &dist) const |
QuantLib::Real | expectedTrancheLoss2 (const QuantLib::Date &d, const Array &p, const Array &A) const |
Private Attributes | |
bool | homogeneous_ |
QuantLib::ext::shared_ptr< ExtendedConstantLossLatentModel< CopulaPolicy > > | copula_ |
QuantLib::Size | nBuckets_ |
QuantLib::Real | max_ |
QuantLib::Real | min_ |
QuantLib::Size | nSteps_ |
bool | useQuadrature_ |
bool | useStochasticRecovery_ |
QuantLib::Real | delta_ |
QuantLib::Real | attach_ |
QuantLib::Real | detach_ |
QuantLib::Real | notional_ |
QuantLib::Real | attachAmount_ |
QuantLib::Real | detachAmount_ |
std::vector< QuantLib::Real > | notionals_ |
std::vector< QuantLib::Real > | lgd_ |
std::vector< std::vector< QuantLib::Real > > | q_ |
std::vector< std::vector< QuantLib::Real > > | c_ |
std::vector< std::vector< QuantLib::Real > > | lgdVV_ |
std::vector< std::vector< QuantLib::Real > > | cprVV_ |
Additional Inherited Members | |
Protected Member Functions inherited from DefaultLossModel | |
DefaultLossModel () | |
virtual Real | expectedTrancheLoss (const Date &d, Real recoveryRate=Null< Real >()) const |
virtual Probability | probOverLoss (const Date &d, Real lossFraction) const |
virtual Real | percentile (const Date &d, Real percentile) const |
Value at Risk given a default loss percentile. More... | |
virtual Real | expectedShortfall (const Date &d, Real percentile) const |
Expected shortfall given a default loss percentile. More... | |
virtual std::vector< Real > | splitVaRLevel (const Date &d, Real loss) const |
Associated VaR fraction to each counterparty. More... | |
virtual std::vector< Real > | splitESFLevel (const Date &d, Real loss) const |
Associated ESF fraction to each counterparty. More... | |
virtual std::map< Real, Probability > | lossDistribution (const Date &) const |
Full loss distribution. More... | |
virtual Real | densityTrancheLoss (const Date &d, Real lossFraction) const |
Probability density of a given loss fraction of the basket notional. More... | |
virtual 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. More... | |
virtual Probability | probAtLeastNEvents (Size n, const Date &d) const |
virtual Real | expectedRecovery (const Date &, Size iName, const DefaultProbKey &) const |
Protected Attributes inherited from DefaultLossModel | |
RelinkableHandle< QuantExt::Basket > | basket_ |
Default loss distribution convolution for finite homogeneous or non-homogeneous pool
Definition at line 38 of file poollossmodel.hpp.
PoolLossModel | ( | bool | homogeneous, |
const QuantLib::ext::shared_ptr< ExtendedConstantLossLatentModel< CopulaPolicy > > & | copula, | ||
QuantLib::Size | nBuckets, | ||
QuantLib::Real | max = 5.0 , |
||
QuantLib::Real | min = -5.0 , |
||
QuantLib::Size | nSteps = 50 , |
||
bool | useQuadrature = false , |
||
bool | useStochasticRecovery = false |
||
) |
Definition at line 139 of file poollossmodel.hpp.
|
override |
Definition at line 167 of file poollossmodel.hpp.
|
override |
Definition at line 229 of file poollossmodel.hpp.
|
override |
Definition at line 235 of file poollossmodel.hpp.
|
overridevirtual |
Return single correlation number for one factor models. If not implemented or not applicable, returns a Null<Real>()
.
Reimplemented from DefaultLossModel.
Definition at line 244 of file poollossmodel.hpp.
std::vector< std::vector< Real > > marginalProbabilitiesVV | ( | Date | d, |
Real | recoveryRate = Null<Real>() |
||
) | const |
Definition at line 334 of file poollossmodel.hpp.
|
private |
Definition at line 404 of file poollossmodel.hpp.
|
private |
Definition at line 263 of file poollossmodel.hpp.
|
private |
Definition at line 296 of file poollossmodel.hpp.
|
private |
Definition at line 357 of file poollossmodel.hpp.
|
overrideprivatevirtual |
Concrete models do now any updates/inits they need on basket reset.
Implements DefaultLossModel.
Definition at line 392 of file poollossmodel.hpp.
|
private |
Definition at line 190 of file poollossmodel.hpp.
|
private |
Definition at line 210 of file poollossmodel.hpp.
|
private |
Definition at line 62 of file poollossmodel.hpp.
|
private |
Definition at line 63 of file poollossmodel.hpp.
|
private |
Definition at line 64 of file poollossmodel.hpp.
|
private |
Definition at line 65 of file poollossmodel.hpp.
|
private |
Definition at line 66 of file poollossmodel.hpp.
|
private |
Definition at line 67 of file poollossmodel.hpp.
|
private |
Definition at line 68 of file poollossmodel.hpp.
|
private |
Definition at line 69 of file poollossmodel.hpp.
|
private |
Definition at line 71 of file poollossmodel.hpp.
|
mutableprivate |
Definition at line 72 of file poollossmodel.hpp.
|
mutableprivate |
Definition at line 73 of file poollossmodel.hpp.
|
mutableprivate |
Definition at line 74 of file poollossmodel.hpp.
|
mutableprivate |
Definition at line 75 of file poollossmodel.hpp.
|
mutableprivate |
Definition at line 76 of file poollossmodel.hpp.
|
mutableprivate |
Definition at line 77 of file poollossmodel.hpp.
|
mutableprivate |
Definition at line 80 of file poollossmodel.hpp.
|
mutableprivate |
Definition at line 82 of file poollossmodel.hpp.
|
mutableprivate |
Definition at line 84 of file poollossmodel.hpp.
|
mutableprivate |
Definition at line 86 of file poollossmodel.hpp.
|
mutableprivate |
Definition at line 88 of file poollossmodel.hpp.