QuantLib: a free/open-source library for quantitative finance
Reference manual - version 1.40
Loading...
Searching...
No Matches
SwapRateHelper Class Reference

Rate helper for bootstrapping over swap rates. More...

#include <ql/termstructures/yield/ratehelpers.hpp>

Inheritance diagram for SwapRateHelper:

Public Member Functions

 SwapRateHelper (const std::variant< Rate, Handle< Quote > > &rate, const ext::shared_ptr< SwapIndex > &swapIndex, Handle< Quote > spread={}, const Period &fwdStart=0 *Days, Handle< YieldTermStructure > discountingCurve={}, Pillar::Choice pillar=Pillar::LastRelevantDate, Date customPillarDate=Date(), bool endOfMonth=false, const ext::optional< bool > &useIndexedCoupons=ext::nullopt)
 SwapRateHelper (const std::variant< Rate, Handle< Quote > > &rate, const Period &tenor, Calendar calendar, Frequency fixedFrequency, BusinessDayConvention fixedConvention, DayCounter fixedDayCount, const ext::shared_ptr< IborIndex > &iborIndex, Handle< Quote > spread={}, const Period &fwdStart=0 *Days, Handle< YieldTermStructure > discountingCurve={}, Natural settlementDays=Null< Natural >(), Pillar::Choice pillar=Pillar::LastRelevantDate, Date customPillarDate=Date(), bool endOfMonth=false, const ext::optional< bool > &useIndexedCoupons=ext::nullopt, const ext::optional< BusinessDayConvention > &floatConvention=ext::nullopt)
 SwapRateHelper (const std::variant< Rate, Handle< Quote > > &rate, const Date &startDate, const Date &endDate, Calendar calendar, Frequency fixedFrequency, BusinessDayConvention fixedConvention, DayCounter fixedDayCount, const ext::shared_ptr< IborIndex > &iborIndex, Handle< Quote > spread={}, Handle< YieldTermStructure > discountingCurve={}, Pillar::Choice pillar=Pillar::LastRelevantDate, Date customPillarDate=Date(), bool endOfMonth=false, const ext::optional< bool > &useIndexedCoupons=ext::nullopt, const ext::optional< BusinessDayConvention > &floatConvention=ext::nullopt)
RateHelper interface
Real impliedQuote () const override
void setTermStructure (YieldTermStructure *) override
 sets the term structure to be used for pricing
SwapRateHelper inspectors
Spread spread () const
ext::shared_ptr< VanillaSwapswap () const
const PeriodforwardStart () const
Public Member Functions inherited from RelativeDateBootstrapHelper< YieldTermStructure >
 RelativeDateBootstrapHelper (const std::variant< Spread, Handle< Quote > > &quote, bool updateDates=true)
void update () override
Public Member Functions inherited from BootstrapHelper< YieldTermStructure >
 BootstrapHelper (const std::variant< Spread, Handle< Quote > > &quote)
const Handle< Quote > & quote () const
Real quoteError () const
virtual Date earliestDate () const
 earliest relevant date
virtual Date maturityDate () const
 instrument's maturity date
virtual Date latestRelevantDate () const
 latest relevant date
virtual Date pillarDate () const
 pillar date
virtual Date latestDate () const
 latest date
Public Member Functions inherited from Observer
 Observer (const Observer &)
Observeroperator= (const 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 deepUpdate ()
Public Member Functions inherited from Observable
 Observable (const Observable &)
Observableoperator= (const Observable &)
 Observable (Observable &&)=delete
Observableoperator= (Observable &&)=delete
void notifyObservers ()

Visitability

Natural settlementDays_
Period tenor_
Date startDate_
Date endDate_
Pillar::Choice pillarChoice_
Calendar calendar_
BusinessDayConvention fixedConvention_
Frequency fixedFrequency_
DayCounter fixedDayCount_
ext::shared_ptr< IborIndexiborIndex_
ext::shared_ptr< VanillaSwapswap_
RelinkableHandle< YieldTermStructuretermStructureHandle_
Handle< Quotespread_
bool endOfMonth_
Period fwdStart_
Handle< YieldTermStructurediscountHandle_
RelinkableHandle< YieldTermStructurediscountRelinkableHandle_
ext::optional< bool > useIndexedCoupons_
ext::optional< BusinessDayConventionfloatConvention_
void accept (AcyclicVisitor &) override
void initialize (const ext::shared_ptr< IborIndex > &iborIndex, Date customPillarDate)
void initializeDates () override

Additional Inherited Members

Public Types inherited from Observer
typedef set_type::iterator iterator
Date evaluationDate_
bool updateDates_
Handle< Quotequote_
YieldTermStructuretermStructure_
Date earliestDate_
Date latestDate_
Date maturityDate_
Date latestRelevantDate_
Date pillarDate_

Detailed Description

Rate helper for bootstrapping over swap rates.

Member Function Documentation

◆ impliedQuote()

Real impliedQuote ( ) const
overridevirtual

◆ setTermStructure()

void setTermStructure ( YieldTermStructure * )
overridevirtual

sets the term structure to be used for pricing

Warning
Being a pointer and not a shared_ptr, the term structure is not guaranteed to remain allocated for the whole life of the rate helper. It is responsibility of the programmer to ensure that the pointer remains valid. It is advised that this method is called only inside the term structure being bootstrapped, setting the pointer to this, i.e., the term structure itself.

Reimplemented from BootstrapHelper< YieldTermStructure >.

◆ accept()

void accept ( AcyclicVisitor & )
overridevirtual

◆ initializeDates()

void initializeDates ( )
overrideprotectedvirtual