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

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

#include <ratehelpers.hpp>

+ Inheritance diagram for SwapRateHelper:
+ Collaboration diagram for SwapRateHelper:

Public Member Functions

 SwapRateHelper (const 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 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)
 
 SwapRateHelper (Rate 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 (Rate 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)
 
RateHelper interface
Real impliedQuote () const override
 
void setTermStructure (YieldTermStructure *) override
 
SwapRateHelper inspectors
Spread spread () const
 
ext::shared_ptr< VanillaSwapswap () const
 
const PeriodforwardStart () const
 
- Public Member Functions inherited from RelativeDateBootstrapHelper< TS >
 RelativeDateBootstrapHelper (const Handle< Quote > &quote)
 
 RelativeDateBootstrapHelper (Real quote)
 
void update () override
 
- 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...
 
- 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 ()
 

Visitability

Natural settlementDays_
 
Period tenor_
 
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< booluseIndexedCoupons_
 
void accept (AcyclicVisitor &) override
 
void initializeDates () override
 

Additional Inherited Members

- Public Types inherited from Observer
typedef set_type::iterator iterator
 
- Protected Member Functions inherited from RelativeDateBootstrapHelper< TS >
- 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

Rate helper for bootstrapping over swap rates.

Definition at line 258 of file ratehelpers.hpp.

Constructor & Destructor Documentation

◆ SwapRateHelper() [1/4]

SwapRateHelper ( const 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 
)

Definition at line 523 of file ratehelpers.cpp.

◆ SwapRateHelper() [2/4]

SwapRateHelper ( const 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 
)

Definition at line 538 of file ratehelpers.cpp.

+ Here is the call graph for this function:

◆ SwapRateHelper() [3/4]

SwapRateHelper ( Rate  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 
)

Definition at line 575 of file ratehelpers.cpp.

◆ SwapRateHelper() [4/4]

SwapRateHelper ( Rate  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 
)

Definition at line 587 of file ratehelpers.cpp.

Member Function Documentation

◆ impliedQuote()

Real impliedQuote ( ) const
overridevirtual

Implements BootstrapHelper< TS >.

Definition at line 676 of file ratehelpers.cpp.

+ Here is the call graph for this function:

◆ setTermStructure()

void setTermStructure ( YieldTermStructure t)
override

Definition at line 660 of file ratehelpers.cpp.

+ Here is the call graph for this function:

◆ spread()

Spread spread ( ) const

Definition at line 481 of file ratehelpers.hpp.

+ Here is the caller graph for this function:

◆ swap()

ext::shared_ptr< VanillaSwap > swap ( ) const

Definition at line 486 of file ratehelpers.hpp.

◆ forwardStart()

const Period & forwardStart ( ) const

Definition at line 490 of file ratehelpers.hpp.

◆ accept()

void accept ( AcyclicVisitor v)
overridevirtual

Reimplemented from BootstrapHelper< TS >.

Definition at line 690 of file ratehelpers.cpp.

+ Here is the call graph for this function:

◆ initializeDates()

void initializeDates ( )
overrideprotectedvirtual

Implements RelativeDateBootstrapHelper< TS >.

Definition at line 606 of file ratehelpers.cpp.

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

Member Data Documentation

◆ settlementDays_

Natural settlementDays_
protected

Definition at line 334 of file ratehelpers.hpp.

◆ tenor_

Period tenor_
protected

Definition at line 335 of file ratehelpers.hpp.

◆ pillarChoice_

Pillar::Choice pillarChoice_
protected

Definition at line 336 of file ratehelpers.hpp.

◆ calendar_

Calendar calendar_
protected

Definition at line 337 of file ratehelpers.hpp.

◆ fixedConvention_

BusinessDayConvention fixedConvention_
protected

Definition at line 338 of file ratehelpers.hpp.

◆ fixedFrequency_

Frequency fixedFrequency_
protected

Definition at line 339 of file ratehelpers.hpp.

◆ fixedDayCount_

DayCounter fixedDayCount_
protected

Definition at line 340 of file ratehelpers.hpp.

◆ iborIndex_

ext::shared_ptr<IborIndex> iborIndex_
protected

Definition at line 341 of file ratehelpers.hpp.

◆ swap_

ext::shared_ptr<VanillaSwap> swap_
protected

Definition at line 342 of file ratehelpers.hpp.

◆ termStructureHandle_

RelinkableHandle<YieldTermStructure> termStructureHandle_
protected

Definition at line 343 of file ratehelpers.hpp.

◆ spread_

Handle<Quote> spread_
protected

Definition at line 344 of file ratehelpers.hpp.

◆ endOfMonth_

bool endOfMonth_
protected

Definition at line 345 of file ratehelpers.hpp.

◆ fwdStart_

Period fwdStart_
protected

Definition at line 346 of file ratehelpers.hpp.

◆ discountHandle_

Handle<YieldTermStructure> discountHandle_
protected

Definition at line 347 of file ratehelpers.hpp.

◆ discountRelinkableHandle_

RelinkableHandle<YieldTermStructure> discountRelinkableHandle_
protected

Definition at line 348 of file ratehelpers.hpp.

◆ useIndexedCoupons_

ext::optional<bool> useIndexedCoupons_
protected

Definition at line 349 of file ratehelpers.hpp.