Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
CDSEngineKey Class Reference

#include <ored/portfolio/builders/creditdefaultswap.hpp>

+ Collaboration diagram for CDSEngineKey:

Public Member Functions

 CDSEngineKey (const std::string &creditCurveId, const QuantLib::Currency &ccy, QuantLib::Real recoveryRate=QuantLib::Null< QuantLib::Real >())
 
const std::string & creditCurveId () const
 Return the credit curve Id. More...
 
const QuantLib::Currency & currency () const
 Return the currency. More...
 
QuantLib::Real recoveryRate () const
 Return the recovery rate if it is set, otherwise Null<Real>() More...
 

Private Attributes

std::string creditCurveId_
 
QuantLib::Currency ccy_
 
QuantLib::Real recoveryRate_
 

Detailed Description

This class provides a key with which we will cache the CDS engine builders

In general, the CDS engine builders will be cached by the credit curve Id of the reference entity and the currency of the trade that needs to be priced. If we are caching by credit curve Id and currency only, the recovery rate member should be Null<Real>().

In some cases, for fixed recovery CDS trades for example, we need to cache the CDS engine builder not only by credit curve Id and currency but also with an exogenous recovery rate that we wish to use instead of the market supplied recovery rate.

Definition at line 51 of file creditdefaultswap.hpp.

Constructor & Destructor Documentation

◆ CDSEngineKey()

CDSEngineKey ( const std::string &  creditCurveId,
const QuantLib::Currency &  ccy,
QuantLib::Real  recoveryRate = QuantLib::Null<QuantLib::Real>() 
)

Constructor that takes a credit curve Id, creditCurveId, a currency, ccy, and optionally a recovery rate, recoveryRate.

Definition at line 56 of file creditdefaultswap.hpp.

QuantLib::Real recoveryRate() const
Return the recovery rate if it is set, otherwise Null<Real>()
const std::string & creditCurveId() const
Return the credit curve Id.

Member Function Documentation

◆ creditCurveId()

const std::string & creditCurveId ( ) const

Return the credit curve Id.

Definition at line 61 of file creditdefaultswap.hpp.

61{ return creditCurveId_; }
+ Here is the caller graph for this function:

◆ currency()

const QuantLib::Currency & currency ( ) const

Return the currency.

Definition at line 64 of file creditdefaultswap.hpp.

64{ return ccy_; }
+ Here is the caller graph for this function:

◆ recoveryRate()

QuantLib::Real recoveryRate ( ) const

Return the recovery rate if it is set, otherwise Null<Real>()

Definition at line 67 of file creditdefaultswap.hpp.

67{ return recoveryRate_; }
+ Here is the caller graph for this function:

Member Data Documentation

◆ creditCurveId_

std::string creditCurveId_
private

Definition at line 70 of file creditdefaultswap.hpp.

◆ ccy_

QuantLib::Currency ccy_
private

Definition at line 71 of file creditdefaultswap.hpp.

◆ recoveryRate_

QuantLib::Real recoveryRate_
private

Definition at line 72 of file creditdefaultswap.hpp.