Logo
Reference manual - version ored_version
Public Member Functions | List of all members
CDSEngineKey Class Reference

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

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.
 
const QuantLib::Currency & currency () const
 Return the currency.
 
QuantLib::Real recoveryRate () const
 Return the recovery rate if it is set, otherwise Null<Real>()
 

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.

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.