QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
Base class for CDS helpers. More...
#include <defaultprobabilityhelpers.hpp>
Public Member Functions | |
CdsHelper (const Handle< Quote > "e, const Period &tenor, Integer settlementDays, Calendar calendar, Frequency frequency, BusinessDayConvention paymentConvention, DateGeneration::Rule rule, DayCounter dayCounter, Real recoveryRate, const Handle< YieldTermStructure > &discountCurve, bool settlesAccrual=true, bool paysAtDefaultTime=true, const Date &startDate=Date(), DayCounter lastPeriodDayCounter=DayCounter(), bool rebatesAccrual=true, CreditDefaultSwap::PricingModel model=CreditDefaultSwap::Midpoint) | |
CdsHelper (Rate quote, const Period &tenor, Integer settlementDays, Calendar calendar, Frequency frequency, BusinessDayConvention paymentConvention, DateGeneration::Rule rule, DayCounter dayCounter, Real recoveryRate, const Handle< YieldTermStructure > &discountCurve, bool settlesAccrual=true, bool paysAtDefaultTime=true, const Date &startDate=Date(), DayCounter lastPeriodDayCounter=DayCounter(), bool rebatesAccrual=true, CreditDefaultSwap::PricingModel model=CreditDefaultSwap::Midpoint) | |
void | setTermStructure (DefaultProbabilityTermStructure *) override |
ext::shared_ptr< CreditDefaultSwap > | swap () const |
void | update () override |
Public Member Functions inherited from RelativeDateBootstrapHelper< TS > | |
RelativeDateBootstrapHelper (const Handle< Quote > "e) | |
RelativeDateBootstrapHelper (Real quote) | |
Public Member Functions inherited from BootstrapHelper< TS > | |
BootstrapHelper (Handle< Quote > quote) | |
BootstrapHelper (Real quote) | |
~BootstrapHelper () override=default | |
const Handle< Quote > & | quote () const |
virtual Real | impliedQuote () const =0 |
Real | quoteError () const |
virtual void | setTermStructure (TS *) |
sets the term structure to be used for pricing More... | |
virtual Date | earliestDate () const |
earliest relevant date More... | |
virtual Date | maturityDate () const |
instrument's maturity date More... | |
virtual Date | latestRelevantDate () const |
latest relevant date More... | |
virtual Date | pillarDate () const |
pillar date More... | |
virtual Date | latestDate () const |
latest date More... | |
virtual void | accept (AcyclicVisitor &) |
Public Member Functions inherited from Observer | |
Observer ()=default | |
Observer (const Observer &) | |
Observer & | operator= (const Observer &) |
virtual | ~Observer () |
std::pair< iterator, bool > | registerWith (const ext::shared_ptr< Observable > &) |
void | registerWithObservables (const ext::shared_ptr< Observer > &) |
Size | unregisterWith (const ext::shared_ptr< Observable > &) |
void | unregisterWithAll () |
virtual void | update ()=0 |
virtual void | deepUpdate () |
Public Member Functions inherited from Observable | |
Observable () | |
Observable (const Observable &) | |
Observable & | operator= (const Observable &) |
Observable (Observable &&)=delete | |
Observable & | operator= (Observable &&)=delete |
virtual | ~Observable ()=default |
void | notifyObservers () |
Protected Member Functions | |
void | initializeDates () override |
virtual void | resetEngine ()=0 |
Protected Member Functions inherited from RelativeDateBootstrapHelper< TS > |
Protected Attributes | |
Period | tenor_ |
Integer | settlementDays_ |
Calendar | calendar_ |
Frequency | frequency_ |
BusinessDayConvention | paymentConvention_ |
DateGeneration::Rule | rule_ |
DayCounter | dayCounter_ |
Real | recoveryRate_ |
Handle< YieldTermStructure > | discountCurve_ |
bool | settlesAccrual_ |
bool | paysAtDefaultTime_ |
DayCounter | lastPeriodDC_ |
bool | rebatesAccrual_ |
CreditDefaultSwap::PricingModel | model_ |
Schedule | schedule_ |
ext::shared_ptr< CreditDefaultSwap > | swap_ |
RelinkableHandle< DefaultProbabilityTermStructure > | probability_ |
Date | protectionStart_ |
protection effective date. More... | |
Date | startDate_ |
Protected Attributes inherited from RelativeDateBootstrapHelper< TS > | |
Date | evaluationDate_ |
Protected Attributes inherited from BootstrapHelper< TS > | |
Handle< Quote > | quote_ |
TS * | termStructure_ |
Date | earliestDate_ |
Date | latestDate_ |
Date | maturityDate_ |
Date | latestRelevantDate_ |
Date | pillarDate_ |
Additional Inherited Members | |
Public Types inherited from Observer | |
typedef set_type::iterator | iterator |
Base class for CDS helpers.
Definition at line 48 of file defaultprobabilityhelpers.hpp.
CdsHelper | ( | const Handle< Quote > & | quote, |
const Period & | tenor, | ||
Integer | settlementDays, | ||
Calendar | calendar, | ||
Frequency | frequency, | ||
BusinessDayConvention | paymentConvention, | ||
DateGeneration::Rule | rule, | ||
DayCounter | dayCounter, | ||
Real | recoveryRate, | ||
const Handle< YieldTermStructure > & | discountCurve, | ||
bool | settlesAccrual = true , |
||
bool | paysAtDefaultTime = true , |
||
const Date & | startDate = Date() , |
||
DayCounter | lastPeriodDayCounter = DayCounter() , |
||
bool | rebatesAccrual = true , |
||
CreditDefaultSwap::PricingModel | model = CreditDefaultSwap::Midpoint |
||
) |
Constructor taking CDS market quote
quote | The helper's market quote. |
tenor | CDS tenor. |
settlementDays | The number of days from evaluation date to the start of the protection period. Prior to the CDS Big Bang in 2009, this was typically 1 calendar day. After the CDS Big Bang, this is typically 0 calendar days i.e. protection starts immediately. |
calendar | CDS calendar. Typically weekends only for standard non-JPY CDS and TYO for JPY. |
frequency | Coupon frequency. Typically 3 months for standard CDS. |
paymentConvention | The convention applied to coupons schedules and settlement dates. |
rule | The date generation rule for generating the CDS schedule. Typically, for CDS prior to the Big Bang, OldCDS should be used. After the Big Bang, CDS was typical and since 2015 CDS2015 is standard. |
dayCounter | The day counter for CDS fee leg coupons. Typically it is Actual/360, excluding accrual end, for all but the final coupon period with Actual/360, including accrual end, for the final coupon. The lastPeriodDayCounter below allows for this distinction. |
recoveryRate | The recovery rate of the underlying reference entity. |
discountCurve | A handle to the relevant discount curve. |
settlesAccrual | Set to true if accrued fee is paid on the occurrence of a credit event and set to false if it is not. Typically this is true . |
paysAtDefaultTime | Set to true if default payment is made at time of credit event or postponed to the end of the coupon period. Typically this is true . |
startDate | Used to specify an explicit start date for the CDS schedule and the date from which the CDS maturity is calculated via the tenor . Useful for off-the-run index schedules. |
lastPeriodDayCounter | The day counter for the last fee leg coupon. See comment on dayCounter . |
rebatesAccrual | Set to true if the fee leg accrual is rebated on the cash settlement date. For CDS after the Big Bang, this is typically true . |
model | The pricing model to use for the helper. |
Definition at line 32 of file defaultprobabilityhelpers.cpp.
CdsHelper | ( | Rate | quote, |
const Period & | tenor, | ||
Integer | settlementDays, | ||
Calendar | calendar, | ||
Frequency | frequency, | ||
BusinessDayConvention | paymentConvention, | ||
DateGeneration::Rule | rule, | ||
DayCounter | dayCounter, | ||
Real | recoveryRate, | ||
const Handle< YieldTermStructure > & | discountCurve, | ||
bool | settlesAccrual = true , |
||
bool | paysAtDefaultTime = true , |
||
const Date & | startDate = Date() , |
||
DayCounter | lastPeriodDayCounter = DayCounter() , |
||
bool | rebatesAccrual = true , |
||
CreditDefaultSwap::PricingModel | model = CreditDefaultSwap::Midpoint |
||
) |
Constructor taking CDS market quote
quote | The helper's market quote. |
tenor | CDS tenor. |
settlementDays | The number of days from evaluation date to the start of the protection period. Prior to the CDS Big Bang in 2009, this was typically 1 calendar day. After the CDS Big Bang, this is typically 0 calendar days i.e. protection starts immediately. |
calendar | CDS calendar. Typically weekends only for standard non-JPY CDS and TYO for JPY. |
frequency | Coupon frequency. Typically 3 months for standard CDS. |
paymentConvention | The convention applied to coupons schedules and settlement dates. |
rule | The date generation rule for generating the CDS schedule. Typically, for CDS prior to the Big Bang, OldCDS should be used. After the Big Bang, CDS was typical and since 2015 CDS2015 is standard. |
dayCounter | The day counter for CDS fee leg coupons. Typically it is Actual/360, excluding accrual end, for all but the final coupon period with Actual/360, including accrual end, for the final coupon. The lastPeriodDayCounter below allows for this distinction. |
recoveryRate | The recovery rate of the underlying reference entity. |
discountCurve | A handle to the relevant discount curve. |
settlesAccrual | Set to true if accrued fee is paid on the occurrence of a credit event and set to false if it is not. Typically this is true . |
paysAtDefaultTime | Set to true if default payment is made at time of credit event or postponed to the end of the coupon period. Typically this is true . |
startDate | Used to specify an explicit start date for the CDS schedule and the date from which the CDS maturity is calculated via the tenor . Useful for off-the-run index schedules. |
lastPeriodDayCounter | The day counter for the last fee leg coupon. See comment on dayCounter . |
rebatesAccrual | Set to true if the fee leg accrual is rebated on the cash settlement date. For CDS after the Big Bang, this is typically true . |
model | The pricing model to use for the helper. |
Definition at line 60 of file defaultprobabilityhelpers.cpp.
|
override |
Definition at line 88 of file defaultprobabilityhelpers.cpp.
ext::shared_ptr< CreditDefaultSwap > swap | ( | ) | const |
Definition at line 116 of file defaultprobabilityhelpers.hpp.
|
overridevirtual |
This method must be implemented in derived classes. An instance of Observer does not call this method directly: instead, it will be called by the observables the instance registered with when they need to notify any changes.
Reimplemented from RelativeDateBootstrapHelper< TS >.
Definition at line 98 of file defaultprobabilityhelpers.cpp.
|
overrideprotectedvirtual |
Implements RelativeDateBootstrapHelper< TS >.
Reimplemented in UpfrontCdsHelper.
Definition at line 103 of file defaultprobabilityhelpers.cpp.
|
protectedpure virtual |
|
protected |
Definition at line 124 of file defaultprobabilityhelpers.hpp.
|
protected |
Definition at line 125 of file defaultprobabilityhelpers.hpp.
|
protected |
Definition at line 126 of file defaultprobabilityhelpers.hpp.
|
protected |
Definition at line 127 of file defaultprobabilityhelpers.hpp.
|
protected |
Definition at line 128 of file defaultprobabilityhelpers.hpp.
|
protected |
Definition at line 129 of file defaultprobabilityhelpers.hpp.
|
protected |
Definition at line 130 of file defaultprobabilityhelpers.hpp.
|
protected |
Definition at line 131 of file defaultprobabilityhelpers.hpp.
|
protected |
Definition at line 132 of file defaultprobabilityhelpers.hpp.
|
protected |
Definition at line 133 of file defaultprobabilityhelpers.hpp.
|
protected |
Definition at line 134 of file defaultprobabilityhelpers.hpp.
|
protected |
Definition at line 135 of file defaultprobabilityhelpers.hpp.
|
protected |
Definition at line 136 of file defaultprobabilityhelpers.hpp.
|
protected |
Definition at line 137 of file defaultprobabilityhelpers.hpp.
|
protected |
Definition at line 139 of file defaultprobabilityhelpers.hpp.
|
protected |
Definition at line 140 of file defaultprobabilityhelpers.hpp.
|
protected |
Definition at line 141 of file defaultprobabilityhelpers.hpp.
|
protected |
protection effective date.
Definition at line 143 of file defaultprobabilityhelpers.hpp.
|
protected |
Definition at line 144 of file defaultprobabilityhelpers.hpp.