#include <qle/models/defaultlossmodel.hpp>
Protected Member Functions | |
DefaultLossModel () | |
Protected Attributes | |
RelinkableHandle< QuantExt::Basket > | basket_ |
Friends | |
class | QuantExt::Basket |
Statistics | |
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 |
virtual QuantLib::Real | correlation () const |
void | setBasket (QuantExt::Basket *bskt) |
virtual void | resetModel ()=0 |
Concrete models do now any updates/inits they need on basket reset. More... | |
Default loss model interface definition. Allows communication between the basket and specific algorithms. Intended to hold any kind of portfolio joint loss, latent models, top-down,....
An inconvenience of this design as opposed to the full arguments/results is that when pricing several derivatives instruments on the same basket not all the pricing engines would point to the same loss model; thus when pricing a set of such instruments there might be some switching on the basket loss models, which might require recalculations (of the basket) or not depending on the pricing order.
Definition at line 48 of file defaultlossmodel.hpp.
|
protected |
Definition at line 61 of file defaultlossmodel.hpp.
|
protectedvirtual |
Reimplemented in GaussianLHPLossModel.
Definition at line 71 of file defaultlossmodel.hpp.
|
protectedvirtual |
Probability of the tranche losing the same or more than the fractional amount given.
The passed lossFraction is a fraction of losses over the tranche notional (not the portfolio).
Reimplemented in GaussianLHPLossModel.
Definition at line 80 of file defaultlossmodel.hpp.
|
protectedvirtual |
Value at Risk given a default loss percentile.
Reimplemented in HomogeneousPoolLossModel< copulaPolicy >, InhomogeneousPoolLossModel< copulaPolicy >, and GaussianLHPLossModel.
Definition at line 84 of file defaultlossmodel.hpp.
|
protectedvirtual |
Expected shortfall given a default loss percentile.
Definition at line 88 of file defaultlossmodel.hpp.
|
protectedvirtual |
Associated VaR fraction to each counterparty.
Definition at line 92 of file defaultlossmodel.hpp.
|
protectedvirtual |
Associated ESF fraction to each counterparty.
Definition at line 96 of file defaultlossmodel.hpp.
|
protectedvirtual |
Full loss distribution.
Definition at line 103 of file defaultlossmodel.hpp.
|
protectedvirtual |
Probability density of a given loss fraction of the basket notional.
Definition at line 107 of file defaultlossmodel.hpp.
|
protectedvirtual |
Probabilities for each of the (remaining) basket elements in the pool to have defaulted by time d and at the same time be the Nth defaulting name to default in the basket. This method is oriented to default order dependent portfolio pricing (e.g. NTDs) The probabilities ordering in the vector coincides with the pool order.
Definition at line 117 of file defaultlossmodel.hpp.
|
protectedvirtual |
Pearsons' default probability correlation.
Reimplemented in ConstantLossModel< copulaPolicy >, and ExtendedConstantLossModel< copulaPolicy >.
Definition at line 121 of file defaultlossmodel.hpp.
|
protectedvirtual |
Returns the probaility of having a given or larger number of defaults in the basket portfolio at a given time.
Reimplemented in ConstantLossModel< copulaPolicy >, and ExtendedConstantLossModel< copulaPolicy >.
Definition at line 127 of file defaultlossmodel.hpp.
|
protectedvirtual |
Expected RR for name conditinal to default by that date.
Reimplemented in GaussianLHPLossModel, ConstantLossModel< copulaPolicy >, and ExtendedConstantLossModel< copulaPolicy >.
Definition at line 132 of file defaultlossmodel.hpp.
|
protectedvirtual |
Return single correlation number for one factor models. If not implemented or not applicable, returns a Null<Real>()
.
Reimplemented in PoolLossModel< CopulaPolicy >.
Definition at line 140 of file defaultlossmodel.hpp.
|
private |
Send a reference to the basket to allow the model to read the problem arguments (contained in the basket)
Definition at line 149 of file defaultlossmodel.hpp.
|
privatepure virtual |
Concrete models do now any updates/inits they need on basket reset.
Implemented in ConstantLossModel< copulaPolicy >, ExtendedConstantLossModel< copulaPolicy >, HomogeneousPoolLossModel< copulaPolicy >, InhomogeneousPoolLossModel< copulaPolicy >, GaussianLHPLossModel, and PoolLossModel< CopulaPolicy >.
|
friend |
Definition at line 54 of file defaultlossmodel.hpp.
|
mutableprotected |
Definition at line 59 of file defaultlossmodel.hpp.