#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. 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_ |
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.
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.
const std::string & creditCurveId | ( | ) | const |
Return the credit curve Id.
Definition at line 61 of file creditdefaultswap.hpp.
const QuantLib::Currency & currency | ( | ) | const |
Return the currency.
Definition at line 64 of file creditdefaultswap.hpp.
QuantLib::Real recoveryRate | ( | ) | const |
Return the recovery rate if it is set, otherwise Null<Real>()
Definition at line 67 of file creditdefaultswap.hpp.
|
private |
Definition at line 70 of file creditdefaultswap.hpp.
|
private |
Definition at line 71 of file creditdefaultswap.hpp.
|
private |
Definition at line 72 of file creditdefaultswap.hpp.