26#include <boost/optional.hpp>
30#include <ql/instruments/creditdefaultswap.hpp>
83 boost::optional<CdsDocClause>
docClause = boost::none);
103 const std::string&
id()
const {
return id_; }
138 using PPT = QuantLib::CreditDefaultSwap::ProtectionPaymentTime;
146 QuantLib::Real
recoveryRate = QuantLib::Null<QuantLib::Real>(),
157 const QuantLib::Date&
upfrontDate = QuantLib::Date(),
158 QuantLib::Real
upfrontFee = QuantLib::Null<QuantLib::Real>(),
159 QuantLib::Real
recoveryRate = QuantLib::Null<QuantLib::Real>(),
QuantLib::Real upfrontFee_
QuantLib::Date protectionStart_
virtual XMLNode * alloc(XMLDocument &doc) const
CreditDefaultSwapData(const string &issuerId, const string &creditCurveId, const LegData &leg, const bool settlesAccrual=true, const PPT protectionPaymentTime=PPT::atDefault, const Date &protectionStart=Date(), const Date &upfrontDate=Date(), const Real upfrontFee=Null< Real >(), QuantLib::Real recoveryRate=QuantLib::Null< QuantLib::Real >(), const std::string &referenceObligation="", const Date &tradeDate=Date(), const std::string &cashSettlementDays="", const bool rebatesAccrual=true)
Constructor that takes an explicit creditCurveId.
const Date & upfrontDate() const
boost::optional< CdsReferenceInformation > referenceInformation_
const string & issuerId() const
QuantLib::Real recoveryRate() const
std::string referenceObligation_
const boost::optional< CdsReferenceInformation > & referenceInformation() const
std::string creditCurveId_
QuantLib::Natural cashSettlementDays() const
const LegData & leg() const
QuantLib::Real recoveryRate_
Populated if the CDS is a fixed recovery rate CDS, otherwise Null<Real>()
void fromXML(XMLNode *node) override
PPT protectionPaymentTime_
std::string strCashSettlementDays_
XMLNode * toXML(XMLDocument &doc) const override
QuantLib::Natural cashSettlementDays_
const std::string & referenceObligation() const
CDS Reference Obligation.
CreditDefaultSwapData()
Default constructor.
bool settlesAccrual() const
const QuantLib::Date & tradeDate() const
CreditDefaultSwapData(const std::string &issuerId, const CdsReferenceInformation &referenceInformation, const LegData &leg, bool settlesAccrual=true, const PPT protectionPaymentTime=PPT::atDefault, const QuantLib::Date &protectionStart=QuantLib::Date(), const QuantLib::Date &upfrontDate=QuantLib::Date(), QuantLib::Real upfrontFee=QuantLib::Null< QuantLib::Real >(), QuantLib::Real recoveryRate=QuantLib::Null< QuantLib::Real >(), const std::string &referenceObligation="", const Date &tradeDate=Date(), const std::string &cashSettlementDays="", const bool rebatesAccrual=true)
Constructor that takes a referenceInformation object.
QuantLib::Date upfrontDate_
PPT protectionPaymentTime() const
QuantLib::Date tradeDate_
QuantLib::CreditDefaultSwap::ProtectionPaymentTime PPT
const string & creditCurveId() const
bool rebatesAccrual() const
const Date & protectionStart() const
Serializable object holding leg data.
Small XML Document wrapper class.
Base class for all serializable classes.
bool tryParseCdsInformation(string strInfo, CdsReferenceInformation &cdsInfo)
leg data model and serialization
std::ostream & operator<<(std::ostream &out, EquityReturnType t)
CreditEventTiers parseCreditEventTiers(const string &s)
CdsDocClause
CDS documentation clause enumeration.
CreditEventType parseCreditEventType(const string &s)
bool isTriggeredDocClause(CdsDocClause contractDocClause, CreditEventType creditEventType)
CreditEventTiers
ISDA credit event seniority sets enumeration.
IsdaRulesDefinitions isdaRulesDefinitionsFromDocClause(const CdsDocClause &cdsDocClause)
CdsTier
CDS debt tier enumeration.
CdsDocClause parseCdsDocClause(const string &s)
CdsTier parseCdsTier(const string &s)
CreditEventType
ISDA credit event types enumeration.
@ OBLIGATION_ACCELERATION
@ GOVERNMENTAL_INTERVENTION
IsdaRulesDefinitions
ISDA CDS documentation rules set enumeration.
IsdaRulesDefinitions parseIsdaRulesDefinitions(const string &s)
bool isAuctionedSeniority(CdsTier contractTier, CreditEventTiers creditEventTiers)
Serializable Credit Default Swap.
base trade data model and serialization