Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | Private Types | Private Attributes | List of all members
ConstantLossLatentmodel< copulaPolicy > Class Template Reference

#include <qle/models/constantlosslatentmodel.hpp>

+ Inheritance diagram for ConstantLossLatentmodel< copulaPolicy >:
+ Collaboration diagram for ConstantLossLatentmodel< copulaPolicy >:

Public Member Functions

 ConstantLossLatentmodel (const std::vector< std::vector< Real > > &factorWeights, const std::vector< Real > &recoveries, LatentModelIntegrationType::LatentModelIntegrationType integralType, const initTraits &ini=initTraits())
 
 ConstantLossLatentmodel (const Handle< Quote > &mktCorrel, const std::vector< Real > &recoveries, LatentModelIntegrationType::LatentModelIntegrationType integralType, Size nVariables, const initTraits &ini=initTraits())
 
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
 
- 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
 

Private Types

typedef copulaPolicy::initTraits initTraits
 

Private Attributes

const std::vector< Real > recoveries_
 

Additional Inherited Members

- 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 Attributes inherited from DefaultLatentModel< copulaPolicy >
QuantLib::ext::shared_ptr< Basketbasket_
 
QuantLib::ext::shared_ptr< LMIntegration > integration_
 

Detailed Description

template<class copulaPolicy>
class QuantExt::ConstantLossLatentmodel< copulaPolicy >

Constant deterministic loss amount default latent model. Integrable implementation.

Definition at line 38 of file constantlosslatentmodel.hpp.

Member Typedef Documentation

◆ initTraits

typedef copulaPolicy::initTraits initTraits
private

Definition at line 41 of file constantlosslatentmodel.hpp.

Constructor & Destructor Documentation

◆ ConstantLossLatentmodel() [1/2]

ConstantLossLatentmodel ( const std::vector< std::vector< Real > > &  factorWeights,
const std::vector< Real > &  recoveries,
LatentModelIntegrationType::LatentModelIntegrationType  integralType,
const initTraits ini = initTraits() 
)

Definition at line 44 of file constantlosslatentmodel.hpp.

47 : DefaultLatentModel<copulaPolicy>(factorWeights, integralType, ini), recoveries_(recoveries) {
48
49 QL_REQUIRE(recoveries.size() == factorWeights.size(), "Incompatible factors and recovery sizes.");
50 }
const std::vector< Real > & recoveries() const
+ Here is the call graph for this function:

◆ ConstantLossLatentmodel() [2/2]

ConstantLossLatentmodel ( const Handle< Quote > &  mktCorrel,
const std::vector< Real > &  recoveries,
LatentModelIntegrationType::LatentModelIntegrationType  integralType,
Size  nVariables,
const initTraits ini = initTraits() 
)

Definition at line 52 of file constantlosslatentmodel.hpp.

55 : DefaultLatentModel<copulaPolicy>(mktCorrel, nVariables, integralType, ini), recoveries_(recoveries) {
56 // actually one could define the other and get rid of the variable
57 // here and in other similar models
58 QL_REQUIRE(recoveries.size() == nVariables, "Incompatible model and recovery sizes.");
59 }
+ Here is the call graph for this function:

Member Function Documentation

◆ conditionalRecovery() [1/3]

Real conditionalRecovery ( const Date &  d,
Size  iName,
const std::vector< Real > &  mktFactors 
) const

Definition at line 61 of file constantlosslatentmodel.hpp.

61 {
62 return recoveries_[iName];
63 }

◆ conditionalRecovery() [2/3]

Real conditionalRecovery ( Probability  uncondDefP,
Size  iName,
const std::vector< Real > &  mktFactors 
) const

Definition at line 65 of file constantlosslatentmodel.hpp.

65 {
66 return recoveries_[iName];
67 }

◆ conditionalRecoveryInvP()

Real conditionalRecoveryInvP ( Real  invUncondDefP,
Size  iName,
const std::vector< Real > &  mktFactors 
) const

Definition at line 69 of file constantlosslatentmodel.hpp.

69 {
70 return recoveries_[iName];
71 }

◆ conditionalRecovery() [3/3]

Real conditionalRecovery ( Real  latentVarSample,
Size  iName,
const Date &  d 
) const

Definition at line 73 of file constantlosslatentmodel.hpp.

73{ return recoveries_[iName]; }

◆ recoveries()

const std::vector< Real > & recoveries ( ) const

Definition at line 75 of file constantlosslatentmodel.hpp.

75{ return recoveries_; }
+ Here is the caller graph for this function:

◆ expectedRecovery()

Real expectedRecovery ( const Date &  d,
Size  iName,
const DefaultProbKey &  defKeys 
) const

Definition at line 80 of file constantlosslatentmodel.hpp.

80{ return recoveries_[iName]; }
+ Here is the caller graph for this function:

Member Data Documentation

◆ recoveries_

const std::vector<Real> recoveries_
private

Definition at line 40 of file constantlosslatentmodel.hpp.