CreditDefaultSwap Class Reference
[Financial instruments]
Credit default swap.
More...
#include <ql/instruments/creditdefaultswap.hpp>
Inheritance diagram for CreditDefaultSwap:

Public Member Functions | |
Constructors | |
| CreditDefaultSwap (Protection::Side side, Real notional, Rate spread, const Schedule &schedule, BusinessDayConvention paymentConvention, const DayCounter &dayCounter, bool settlesAccrual=true, bool paysAtDefaultTime=true, const boost::shared_ptr< Claim > &=boost::shared_ptr< Claim >()) | |
Instrument interface | |
| bool | isExpired () const |
| returns whether the instrument is still tradable. | |
| void | setupArguments (PricingEngine::arguments *) const |
| void | fetchResults (const PricingEngine::results *) const |
Inspectors | |
| Protection::Side | side () const |
| Real | notional () const |
| Rate | spread () const |
| bool | settlesAccrual () const |
| bool | paysAtDefaultTime () const |
| const Leg & | coupons () const |
Results | |
| Rate | fairSpread () const |
| Real | couponLegBPS () const |
| Real | couponLegNPV () const |
| Real | defaultLegNPV () const |
| Rate | impliedHazardRate (Real targetNPV, const Handle< YieldTermStructure > &discountCurve, const DayCounter &dayCounter, Real recoveryRate=0.4, Real accuracy=1.0e-6) const |
Protected Member Functions | |
Instrument interface | |
| void | setupExpired () const |
Protected Attributes | |
| Protection::Side | side_ |
| Real | notional_ |
| Rate | spread_ |
| bool | settlesAccrual_ |
| bool | paysAtDefaultTime_ |
| boost::shared_ptr< Claim > | claim_ |
| Leg | leg_ |
| Rate | fairSpread_ |
| Real | couponLegBPS_ |
| Real | couponLegNPV_ |
| Real | defaultLegNPV_ |
Detailed Description
Credit default swap.
- Note:
- This instrument currently assumes that the issuer did not default until today's date.
- Warning:
- if QL_TODAYS_PAYMENTS was defined (in userconfig.hpp or when calling ./configure; it is undefined by default) payments occurring at the settlement date of the swap are included in the NPV, and therefore affect the fair-spread calculation. This might not be what you want.
- Examples:
Member Function Documentation
| void setupArguments | ( | PricingEngine::arguments * | ) | const [virtual] |
When a derived argument structure is defined for an instrument, this method should be overridden to fill it. This is mandatory in case a pricing engine is used.
Reimplemented from Instrument.
| void fetchResults | ( | const PricingEngine::results * | r | ) | const [virtual] |
When a derived result structure is defined for an instrument, this method should be overridden to read from it. This is mandatory in case a pricing engine is used.
Reimplemented from Instrument.
| void setupExpired | ( | ) | const [protected, virtual] |
This method must leave the instrument in a consistent state when the expiration condition is met.
Reimplemented from Instrument.