QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
BaseCorrelationLossModel< BaseModel_T, Corr2DInt_T > Class Template Reference

#include <ql/experimental/credit/basecorrelationlossmodel.hpp>

+ Inheritance diagram for BaseCorrelationLossModel< BaseModel_T, Corr2DInt_T >:
+ Collaboration diagram for BaseCorrelationLossModel< BaseModel_T, Corr2DInt_T >:

Public Member Functions

 BaseCorrelationLossModel (const Handle< BaseCorrelationTermStructure< Corr2DInt_T > > &correlTS, std::vector< Real > recoveries, const initTraits &traits=initTraits())
 
- Public Member Functions inherited from Observable
 Observable ()
 
 Observable (const Observable &)
 
Observableoperator= (const Observable &)
 
 Observable (Observable &&)=delete
 
Observableoperator= (Observable &&)=delete
 
virtual ~Observable ()=default
 
void notifyObservers ()
 
- Public Member Functions inherited from Observer
 Observer ()=default
 
 Observer (const Observer &)
 
Observeroperator= (const Observer &)
 
virtual ~Observer ()
 
std::pair< iterator, boolregisterWith (const ext::shared_ptr< Observable > &)
 
void registerWithObservables (const ext::shared_ptr< Observer > &)
 
Size unregisterWith (const ext::shared_ptr< Observable > &)
 
void unregisterWithAll ()
 
virtual void update ()=0
 
virtual void deepUpdate ()
 

Protected Member Functions

void setupModels () const
 
void setupModels () const
 
void setupModels () const
 
void setupModels () const
 
void setupModels () const
 
- Protected Member Functions inherited from DefaultLossModel
 DefaultLossModel ()=default
 
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< RealsplitVaRLevel (const Date &d, Real loss) const
 Associated VaR fraction to each counterparty. More...
 
virtual std::vector< RealsplitESFLevel (const Date &d, Real loss) const
 Associated ESF fraction to each counterparty. More...
 
virtual std::map< Real, ProbabilitylossDistribution (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< ProbabilityprobsBeingNthEvent (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
 

Private Types

typedef BaseModel_T::copulaType::initTraits initTraits
 

Private Member Functions

void update () override
 
void resetModel () override
 Concrete models do now any updates/inits they need on basket reset. More...
 
Real expectedTrancheLoss (const Date &d) const override
 

Private Attributes

Real attachRatio_
 
Real detachRatio_
 
Real remainingNotional_
 
ext::shared_ptr< SimpleQuotelocalCorrelationAttach_
 Correlation buffer to pick up values from the surface and. More...
 
ext::shared_ptr< SimpleQuotelocalCorrelationDetach_
 
ext::shared_ptr< BasketbasketAttach_
 
ext::shared_ptr< BasketbasketDetach_
 
std::vector< Realrecoveries_
 
Handle< BaseCorrelationTermStructure< Corr2DInt_T > > correlTS_
 
BaseModel_T::copulaType::initTraits copulaTraits_
 
ext::shared_ptr< BaseModel_T > scalarCorrelModelAttach_
 
ext::shared_ptr< BaseModel_T > scalarCorrelModelDetach_
 

Additional Inherited Members

- Public Types inherited from Observer
typedef set_type::iterator iterator
 
- Protected Attributes inherited from DefaultLossModel
RelinkableHandle< Basketbasket_
 

Detailed Description

template<class BaseModel_T, class Corr2DInt_T>
class QuantLib::BaseCorrelationLossModel< BaseModel_T, Corr2DInt_T >

Base Correlation loss model; interpolation is performed by portfolio (live) amount percentage.

Though the literature on this model is inmense, see for a more than introductory level (precrisis) chapters 19, 20 and 21 of Modelling single name and multi-name credit derivatives. Dominic O'Kane, Wiley Finance, 2008
For freely available documentation see:
Credit Correlation: A Guide; JP Morgan Credit Derivatives Strategy; 12 March 2004
Introducing Base Correlations; JP Morgan Credit Derivatives Strategy; 22 March 2004
A Relative Value Framework for Credit Correlation; JP Morgan Credit Derivatives Strategy; 27 April 2004
Valuing and Hedging Synthetic CDO Tranches Using Base Correlations; Bear Stearns; May 17, 2004
Correlation Primer; Nomura Fixed Income Research, August 6, 2004
Base Correlation Explained; Lehman Brothers Fixed Income Quantitative Credit Research; 15 November 2004
'Pricing CDOs with a smile' in Societe Generale Credit Research; February 2005
For bespoke base correlation see:
Base Correlation Mapping in Lehman Brothers' Quantitative Credit Research Quarterly; Volume 2007-Q1
You can explore typical postcrisis data by perusing some of the JPMorgan Global Correlation Daily Analytics
Here the crisis model problems of ability to price stressed portfolios or tranches over the maximum loss are the responsibility of the base models. Users should select their models according to this; choosing the copula or a random loss given default base model (or more exotic ones).
Notice this is different to a bespoke base correlation loss (bespoke here refering to basket composition, not just attachment levels) ; where loss interpolation is on the expected loss value to match the two baskets. Therefore the correlation surface should refer to the same basket intended to be priced. But this is left to the user and is not implemented in the correlation surface (yet...)

BaseModel_T must have a constructor with a single quote value

Definition at line 92 of file basecorrelationlossmodel.hpp.

Member Typedef Documentation

◆ initTraits

typedef BaseModel_T::copulaType::initTraits initTraits
private

Definition at line 95 of file basecorrelationlossmodel.hpp.

Constructor & Destructor Documentation

◆ BaseCorrelationLossModel()

BaseCorrelationLossModel ( const Handle< BaseCorrelationTermStructure< Corr2DInt_T > > &  correlTS,
std::vector< Real recoveries,
const initTraits traits = initTraits() 
)

Definition at line 97 of file basecorrelationlossmodel.hpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ update()

void update ( )
overrideprivatevirtual

This method must be implemented in derived classes. An instance of Observer does not call this method directly: instead, it will be called by the observables the instance registered with when they need to notify any changes.

Implements Observer.

Definition at line 109 of file basecorrelationlossmodel.hpp.

+ Here is the call graph for this function:

◆ resetModel()

void resetModel ( )
overrideprivatevirtual

Concrete models do now any updates/inits they need on basket reset.

Implements DefaultLossModel.

Definition at line 117 of file basecorrelationlossmodel.hpp.

+ Here is the call graph for this function:

◆ expectedTrancheLoss()

Real expectedTrancheLoss ( const Date d) const
overrideprivatevirtual

Reimplemented from DefaultLossModel.

Definition at line 163 of file basecorrelationlossmodel.hpp.

◆ setupModels() [1/5]

void setupModels ( ) const
protected

Sets up attach/detach models. Gets called on basket update. To be specialized on the spacific model type.

+ Here is the caller graph for this function:

◆ setupModels() [2/5]

void setupModels ( ) const
protected

Definition at line 193 of file basecorrelationlossmodel.hpp.

◆ setupModels() [3/5]

void setupModels ( ) const
protected

Definition at line 208 of file basecorrelationlossmodel.hpp.

◆ setupModels() [4/5]

void setupModels ( ) const
protected

Definition at line 232 of file basecorrelationlossmodel.hpp.

◆ setupModels() [5/5]

void setupModels ( ) const
protected

Definition at line 259 of file basecorrelationlossmodel.hpp.

Member Data Documentation

◆ attachRatio_

Real attachRatio_
mutableprivate

Definition at line 141 of file basecorrelationlossmodel.hpp.

◆ detachRatio_

Real detachRatio_
private

Definition at line 141 of file basecorrelationlossmodel.hpp.

◆ remainingNotional_

Real remainingNotional_
mutableprivate

Definition at line 142 of file basecorrelationlossmodel.hpp.

◆ localCorrelationAttach_

ext::shared_ptr<SimpleQuote> localCorrelationAttach_
private

Correlation buffer to pick up values from the surface and.

Definition at line 146 of file basecorrelationlossmodel.hpp.

◆ localCorrelationDetach_

ext::shared_ptr<SimpleQuote> localCorrelationDetach_
private

Definition at line 147 of file basecorrelationlossmodel.hpp.

◆ basketAttach_

ext::shared_ptr<Basket> basketAttach_
mutableprivate

Definition at line 148 of file basecorrelationlossmodel.hpp.

◆ basketDetach_

ext::shared_ptr<Basket> basketDetach_
private

Definition at line 149 of file basecorrelationlossmodel.hpp.

◆ recoveries_

std::vector<Real> recoveries_
mutableprivate

Definition at line 151 of file basecorrelationlossmodel.hpp.

◆ correlTS_

Handle<BaseCorrelationTermStructure<Corr2DInt_T> > correlTS_
private

Definition at line 152 of file basecorrelationlossmodel.hpp.

◆ copulaTraits_

BaseModel_T::copulaType::initTraits copulaTraits_
mutableprivate

Definition at line 154 of file basecorrelationlossmodel.hpp.

◆ scalarCorrelModelAttach_

ext::shared_ptr<BaseModel_T> scalarCorrelModelAttach_
mutableprivate

Definition at line 156 of file basecorrelationlossmodel.hpp.

◆ scalarCorrelModelDetach_

ext::shared_ptr<BaseModel_T> scalarCorrelModelDetach_
mutableprivate

Definition at line 157 of file basecorrelationlossmodel.hpp.