QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
UpfrontCdsHelper Class Reference

Upfront-quoted CDS hazard rate bootstrap helper. More...

#include <defaultprobabilityhelpers.hpp>

+ Inheritance diagram for UpfrontCdsHelper:
+ Collaboration diagram for UpfrontCdsHelper:

Public Member Functions

 UpfrontCdsHelper (const Handle< Quote > &upfront, Rate runningSpread, const Period &tenor, Integer settlementDays, const Calendar &calendar, Frequency frequency, BusinessDayConvention paymentConvention, DateGeneration::Rule rule, const DayCounter &dayCounter, Real recoveryRate, const Handle< YieldTermStructure > &discountCurve, Natural upfrontSettlementDays=3, bool settlesAccrual=true, bool paysAtDefaultTime=true, const Date &startDate=Date(), const DayCounter &lastPeriodDayCounter=DayCounter(), bool rebatesAccrual=true, CreditDefaultSwap::PricingModel model=CreditDefaultSwap::Midpoint)
 
 UpfrontCdsHelper (Rate upfront, Rate runningSpread, const Period &tenor, Integer settlementDays, const Calendar &calendar, Frequency frequency, BusinessDayConvention paymentConvention, DateGeneration::Rule rule, const DayCounter &dayCounter, Real recoveryRate, const Handle< YieldTermStructure > &discountCurve, Natural upfrontSettlementDays=3, bool settlesAccrual=true, bool paysAtDefaultTime=true, const Date &startDate=Date(), const DayCounter &lastPeriodDayCounter=DayCounter(), bool rebatesAccrual=true, CreditDefaultSwap::PricingModel model=CreditDefaultSwap::Midpoint)
 
Real impliedQuote () const override
 
- Public Member Functions inherited from CdsHelper
 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)
 
 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< CreditDefaultSwapswap () const
 
void update () override
 
- Public Member Functions inherited from RelativeDateBootstrapHelper< TS >
 RelativeDateBootstrapHelper (const Handle< Quote > &quote)
 
 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
 
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 &)
 
Observeroperator= (const Observer &)
 
virtual ~Observer ()
 
std::pair< iterator, boolregisterWith (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 &)
 
Observableoperator= (const Observable &)
 
 Observable (Observable &&)=delete
 
Observableoperator= (Observable &&)=delete
 
virtual ~Observable ()=default
 
void notifyObservers ()
 

Private Member Functions

Date upfrontDate ()
 
void initializeDates () override
 
void resetEngine () override
 

Private Attributes

Natural upfrontSettlementDays_
 
Date upfrontDate_
 
Rate runningSpread_
 

Additional Inherited Members

- Public Types inherited from Observer
typedef set_type::iterator iterator
 
void initializeDates () override
 
virtual void resetEngine ()=0
 
- Protected Member Functions inherited from RelativeDateBootstrapHelper< TS >
- Protected Attributes inherited from CdsHelper
Period tenor_
 
Integer settlementDays_
 
Calendar calendar_
 
Frequency frequency_
 
BusinessDayConvention paymentConvention_
 
DateGeneration::Rule rule_
 
DayCounter dayCounter_
 
Real recoveryRate_
 
Handle< YieldTermStructurediscountCurve_
 
bool settlesAccrual_
 
bool paysAtDefaultTime_
 
DayCounter lastPeriodDC_
 
bool rebatesAccrual_
 
CreditDefaultSwap::PricingModel model_
 
Schedule schedule_
 
ext::shared_ptr< CreditDefaultSwapswap_
 
RelinkableHandle< DefaultProbabilityTermStructureprobability_
 
Date protectionStart_
 protection effective date. More...
 
Date startDate_
 
- Protected Attributes inherited from RelativeDateBootstrapHelper< TS >
Date evaluationDate_
 
- Protected Attributes inherited from BootstrapHelper< TS >
Handle< Quotequote_
 
TS * termStructure_
 
Date earliestDate_
 
Date latestDate_
 
Date maturityDate_
 
Date latestRelevantDate_
 
Date pillarDate_
 

Detailed Description

Upfront-quoted CDS hazard rate bootstrap helper.

Definition at line 191 of file defaultprobabilityhelpers.hpp.

Constructor & Destructor Documentation

◆ UpfrontCdsHelper() [1/2]

UpfrontCdsHelper ( const Handle< Quote > &  upfront,
Rate  runningSpread,
const Period tenor,
Integer  settlementDays,
const Calendar calendar,
Frequency  frequency,
BusinessDayConvention  paymentConvention,
DateGeneration::Rule  rule,
const DayCounter dayCounter,
Real  recoveryRate,
const Handle< YieldTermStructure > &  discountCurve,
Natural  upfrontSettlementDays = 3,
bool  settlesAccrual = true,
bool  paysAtDefaultTime = true,
const Date startDate = Date(),
const DayCounter lastPeriodDayCounter = DayCounter(),
bool  rebatesAccrual = true,
CreditDefaultSwap::PricingModel  model = CreditDefaultSwap::Midpoint 
)
Note
the upfront must be quoted in fractional units.

Definition at line 209 of file defaultprobabilityhelpers.cpp.

◆ UpfrontCdsHelper() [2/2]

UpfrontCdsHelper ( Rate  upfront,
Rate  runningSpread,
const Period tenor,
Integer  settlementDays,
const Calendar calendar,
Frequency  frequency,
BusinessDayConvention  paymentConvention,
DateGeneration::Rule  rule,
const DayCounter dayCounter,
Real  recoveryRate,
const Handle< YieldTermStructure > &  discountCurve,
Natural  upfrontSettlementDays = 3,
bool  settlesAccrual = true,
bool  paysAtDefaultTime = true,
const Date startDate = Date(),
const DayCounter lastPeriodDayCounter = DayCounter(),
bool  rebatesAccrual = true,
CreditDefaultSwap::PricingModel  model = CreditDefaultSwap::Midpoint 
)
Note
the upfront must be quoted in fractional units.

Definition at line 236 of file defaultprobabilityhelpers.cpp.

Member Function Documentation

◆ impliedQuote()

Real impliedQuote ( ) const
overridevirtual

Implements BootstrapHelper< TS >.

Definition at line 296 of file defaultprobabilityhelpers.cpp.

+ Here is the call graph for this function:

◆ upfrontDate()

Date upfrontDate ( )
private

Definition at line 263 of file defaultprobabilityhelpers.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initializeDates()

void initializeDates ( )
overrideprivatevirtual

Reimplemented from CdsHelper.

Definition at line 267 of file defaultprobabilityhelpers.cpp.

+ Here is the call graph for this function:

◆ resetEngine()

void resetEngine ( )
overrideprivatevirtual

Implements CdsHelper.

Definition at line 272 of file defaultprobabilityhelpers.cpp.

Member Data Documentation

◆ upfrontSettlementDays_

Natural upfrontSettlementDays_
private

Definition at line 238 of file defaultprobabilityhelpers.hpp.

◆ upfrontDate_

Date upfrontDate_
private

Definition at line 239 of file defaultprobabilityhelpers.hpp.

◆ runningSpread_

Rate runningSpread_
private

Definition at line 240 of file defaultprobabilityhelpers.hpp.