#include <qle/models/extendedconstantlosslatentmodel.hpp>
Public Member Functions | |
ExtendedConstantLossModel (const std::vector< std::vector< Real > > &factorWeights, const std::vector< Real > &recoveries, const std::vector< std::vector< Real > > &recoveryProbabilities, const std::vector< std::vector< Real > > &recoveryRates, LatentModelIntegrationType::LatentModelIntegrationType integralType, const typename copulaPolicy::initTraits &ini=copulaPolicy::initTraits()) | |
ExtendedConstantLossModel (const Handle< Quote > &mktCorrel, const std::vector< Real > &recoveries, const std::vector< std::vector< Real > > &recoveryProbabilities, const std::vector< std::vector< Real > > &recoveryRates, LatentModelIntegrationType::LatentModelIntegrationType integralType, Size nVariables, const typename copulaPolicy::initTraits &ini=copulaPolicy::initTraits()) | |
Public Member Functions inherited from ExtendedConstantLossLatentModel< copulaPolicy > | |
ExtendedConstantLossLatentModel (const std::vector< std::vector< Real > > &factorWeights, const std::vector< Real > &recoveries, const std::vector< std::vector< Real > > &recoveryProbabilities, const std::vector< std::vector< Real > > &recoveryRates, LatentModelIntegrationType::LatentModelIntegrationType integralType, const initTraits &ini=initTraits()) | |
ExtendedConstantLossLatentModel (const Handle< Quote > &mktCorrel, const std::vector< Real > &recoveries, const std::vector< std::vector< Real > > &recoveryProbabilities, const std::vector< std::vector< Real > > &recoveryRates, LatentModelIntegrationType::LatentModelIntegrationType integralType, Size nVariables, const initTraits &ini=initTraits()) | |
void | checkStochasticRecoveries () |
Real | conditionalRecovery (const Date &d, Size iName, const std::vector< Real > &mktFactors) const |
Real | conditionalRecovery (Probability uncondDefP, Size iName, const std::vector< Real > &mktFactors) const |
Real | conditionalRecoveryInvP (Real invUncondDefP, Size iName, const std::vector< Real > &mktFactors) const |
Real | conditionalRecovery (Real latentVarSample, Size iName, const Date &d) const |
const std::vector< Real > & | recoveries () const |
Real | expectedRecovery (const Date &d, Size iName, const DefaultProbKey &defKeys) const |
const std::vector< std::vector< Real > > & | recoveryProbabilities () |
const std::vector< std::vector< Real > > & | recoveryRateGrids () |
Public Member Functions inherited from DefaultLatentModel< copulaPolicy > | |
DefaultLatentModel (const std::vector< std::vector< Real > > &factorWeights, LatentModelIntegrationType::LatentModelIntegrationType integralType, const initTraits &ini=initTraits()) | |
DefaultLatentModel (const Handle< Quote > &mktCorrel, Size nVariables, LatentModelIntegrationType::LatentModelIntegrationType integralType, const initTraits &ini=initTraits()) | |
void | resetBasket (const QuantLib::ext::shared_ptr< Basket > basket) const |
Probability | conditionalDefaultProbability (Probability prob, Size iName, const std::vector< Real > &mktFactors) const |
Probability | conditionalDefaultProbabilityInvP (Real invCumYProb, Size iName, const std::vector< Real > &m) const |
Probability | probOfDefault (Size iName, const Date &d) const |
Real | defaultCorrelation (const Date &d, Size iNamei, Size iNamej) const |
Probability | probAtLeastNEvents (Size n, const Date &date) const |
Protected Member Functions | |
Real | defaultCorrelation (const Date &d, Size iName, Size jName) const |
Pearsons' default probability correlation. More... | |
Probability | probAtLeastNEvents (Size n, const Date &d) const |
Real | expectedRecovery (const Date &d, Size iName, const DefaultProbKey &k) const |
Protected Member Functions inherited from DefaultLatentModel< copulaPolicy > | |
void | update () override |
Probability | conditionalDefaultProbability (const Date &date, Size iName, const std::vector< Real > &mktFactors) const |
Probability | condProbProduct (Real invCumYProb1, Real invCumYProb2, Size iName1, Size iName2, const std::vector< Real > &mktFactors) const |
Real | conditionalProbAtLeastNEvents (Size n, const Date &date, const std::vector< Real > &mktFactors) const |
Conditional probability of n default events or more. More... | |
const QuantLib::ext::shared_ptr< LMIntegration > & | integration () const override |
access to integration: More... | |
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 QuantLib::Real | correlation () const |
Private Member Functions | |
virtual void | resetModel () |
Concrete models do now any updates/inits they need on basket reset. More... | |
Additional Inherited Members | |
Protected Attributes inherited from DefaultLatentModel< copulaPolicy > | |
QuantLib::ext::shared_ptr< Basket > | basket_ |
QuantLib::ext::shared_ptr< LMIntegration > | integration_ |
Protected Attributes inherited from DefaultLossModel | |
RelinkableHandle< QuantExt::Basket > | basket_ |
ExtendedConstantLossLatentModel interface for loss models. While it does not provide distribution type losses (e.g. expected tranche losses) because it lacks an integration algorithm it serves to allow pricing of digital type products like NTDs.
Alternatively fuse with the aboves class.
Definition at line 121 of file extendedconstantlosslatentmodel.hpp.
ExtendedConstantLossModel | ( | const std::vector< std::vector< Real > > & | factorWeights, |
const std::vector< Real > & | recoveries, | ||
const std::vector< std::vector< Real > > & | recoveryProbabilities, | ||
const std::vector< std::vector< Real > > & | recoveryRates, | ||
LatentModelIntegrationType::LatentModelIntegrationType | integralType, | ||
const typename copulaPolicy::initTraits & | ini = copulaPolicy::initTraits() |
||
) |
Definition at line 123 of file extendedconstantlosslatentmodel.hpp.
ExtendedConstantLossModel | ( | const Handle< Quote > & | mktCorrel, |
const std::vector< Real > & | recoveries, | ||
const std::vector< std::vector< Real > > & | recoveryProbabilities, | ||
const std::vector< std::vector< Real > > & | recoveryRates, | ||
LatentModelIntegrationType::LatentModelIntegrationType | integralType, | ||
Size | nVariables, | ||
const typename copulaPolicy::initTraits & | ini = copulaPolicy::initTraits() |
||
) |
Definition at line 130 of file extendedconstantlosslatentmodel.hpp.
|
protectedvirtual |
Pearsons' default probability correlation.
Reimplemented from DefaultLossModel.
Definition at line 143 of file extendedconstantlosslatentmodel.hpp.
|
protectedvirtual |
Returns the probaility of having a given or larger number of defaults in the basket portfolio at a given time.
Reimplemented from DefaultLossModel.
Definition at line 146 of file extendedconstantlosslatentmodel.hpp.
|
protectedvirtual |
Expected RR for name conditinal to default by that date.
Reimplemented from DefaultLossModel.
Definition at line 149 of file extendedconstantlosslatentmodel.hpp.
|
privatevirtual |
Concrete models do now any updates/inits they need on basket reset.
Implements DefaultLossModel.
Definition at line 154 of file extendedconstantlosslatentmodel.hpp.