21#ifndef quantlib_defaultlossmodel_hpp
22#define quantlib_defaultlossmodel_hpp
68 QL_FAIL(
"expectedTrancheLoss Not implemented for this model.");
78 QL_FAIL(
"probOverLoss Not implemented for this model.");
82 QL_FAIL(
"percentile Not implemented for this model.");
86 QL_FAIL(
"eSF Not implemented for this model.");
90 QL_FAIL(
"splitVaRLevel Not implemented for this model.");
94 QL_FAIL(
"splitESFLevel Not implemented for this model.");
101 QL_FAIL(
"lossDistribution Not implemented for this model.");
105 const Date&
d,
Real lossFraction)
const {
106 QL_FAIL(
"densityTrancheLoss Not implemented for this model.");
116 QL_FAIL(
"probsBeingNthEvent Not implemented for this model.");
121 QL_FAIL(
"defaultCorrelation Not implemented for this model.");
127 QL_FAIL(
"probAtLeastNEvents Not implemented for this model.");
133 QL_FAIL(
"expected recovery Not implemented for this model.");
basket of issuers and related notionals
Classes for default-event claims.
virtual Real defaultCorrelation(const Date &d, Size iName, Size jName) const
Pearsons' default probability correlation.
virtual Probability probOverLoss(const Date &d, Real lossFraction) const
virtual std::map< Real, Probability > lossDistribution(const Date &) const
Full loss distribution.
virtual void resetModel()=0
Concrete models do now any updates/inits they need on basket reset.
virtual Real expectedTrancheLoss(const Date &d) const
virtual std::vector< Probability > probsBeingNthEvent(Size n, const Date &d) const
virtual Real expectedShortfall(const Date &d, Real percentile) const
Expected shortfall given a default loss percentile.
RelinkableHandle< Basket > basket_
DefaultLossModel()=default
virtual Real expectedRecovery(const Date &, Size iName, const DefaultProbKey &) const
virtual Real percentile(const Date &d, Real percentile) const
Value at Risk given a default loss percentile.
virtual Real densityTrancheLoss(const Date &d, Real lossFraction) const
Probability density of a given loss fraction of the basket notional.
virtual Probability probAtLeastNEvents(Size n, const Date &d) const
virtual std::vector< Real > splitVaRLevel(const Date &d, Real loss) const
Associated VaR fraction to each counterparty.
virtual std::vector< Real > splitESFLevel(const Date &d, Real loss) const
Associated ESF fraction to each counterparty.
void setBasket(Basket *bskt)
Object that notifies its changes to a set of observers.
Relinkable handle to an observable.
Classes for default-event description.
#define QL_FAIL(message)
throw an error (possibly with file and line information)
Real Probability
probability
std::size_t Size
size of a container
empty deleter for shared_ptr