QuantLib
A free/open-source library for quantitative finance
Reference manual - version 1.20
Public Member Functions | List of all members
SwapIndex Class Reference

base class for swap-rate indexes More...

#include <ql/indexes/swapindex.hpp>

+ Inheritance diagram for SwapIndex:

Public Member Functions

 SwapIndex (const std::string &familyName, const Period &tenor, Natural settlementDays, const Currency &currency, const Calendar &fixingCalendar, const Period &fixedLegTenor, BusinessDayConvention fixedLegConvention, const DayCounter &fixedLegDayCounter, const ext::shared_ptr< IborIndex > &iborIndex)
 
 SwapIndex (const std::string &familyName, const Period &tenor, Natural settlementDays, const Currency &currency, const Calendar &fixingCalendar, const Period &fixedLegTenor, BusinessDayConvention fixedLegConvention, const DayCounter &fixedLegDayCounter, const ext::shared_ptr< IborIndex > &iborIndex, const Handle< YieldTermStructure > &discountingTermStructure)
 
InterestRateIndex interface
Date maturityDate (const Date &valueDate) const
 
Inspectors
Period fixedLegTenor () const
 
BusinessDayConvention fixedLegConvention () const
 
ext::shared_ptr< IborIndexiborIndex () const
 
Handle< YieldTermStructureforwardingTermStructure () const
 
Handle< YieldTermStructurediscountingTermStructure () const
 
bool exogenousDiscount () const
 
ext::shared_ptr< VanillaSwapunderlyingSwap (const Date &fixingDate) const
 
- Public Member Functions inherited from InterestRateIndex
 InterestRateIndex (const std::string &familyName, const Period &tenor, Natural settlementDays, const Currency &currency, const Calendar &fixingCalendar, const DayCounter &dayCounter)
 
std::string name () const
 Returns the name of the index. More...
 
Calendar fixingCalendar () const
 returns the calendar defining valid fixing dates
 
bool isValidFixingDate (const Date &fixingDate) const
 returns TRUE if the fixing date is a valid one
 
Rate fixing (const Date &fixingDate, bool forecastTodaysFixing=false) const
 returns the fixing at the given date More...
 
void update ()
 
std::string familyName () const
 
Period tenor () const
 
Natural fixingDays () const
 
Date fixingDate (const Date &valueDate) const
 
const Currencycurrency () const
 
const DayCounterdayCounter () const
 
virtual Date valueDate (const Date &fixingDate) const
 
virtual Rate pastFixing (const Date &fixingDate) const
 
- Public Member Functions inherited from Index
const TimeSeries< Real > & timeSeries () const
 returns the fixing TimeSeries
 
virtual bool allowsNativeFixings ()
 check if index allows for native fixings. More...
 
virtual void addFixing (const Date &fixingDate, Real fixing, bool forceOverwrite=false)
 stores the historical fixing at the given date More...
 
void addFixings (const TimeSeries< Real > &t, bool forceOverwrite=false)
 stores historical fixings from a TimeSeries More...
 
template<class DateIterator , class ValueIterator >
void addFixings (DateIterator dBegin, DateIterator dEnd, ValueIterator vBegin, bool forceOverwrite=false)
 stores historical fixings at the given dates More...
 
void clearFixings ()
 clears all stored historical fixings
 
- Public Member Functions inherited from Observable
 Observable (const Observable &)
 
Observableoperator= (const Observable &)
 
void notifyObservers ()
 
- 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 ()
 

Other methods

Period tenor_
 
ext::shared_ptr< IborIndexiborIndex_
 
Period fixedLegTenor_
 
BusinessDayConvention fixedLegConvention_
 
bool exogenousDiscount_
 
Handle< YieldTermStructurediscount_
 
ext::shared_ptr< VanillaSwaplastSwap_
 
Date lastFixingDate_
 
virtual ext::shared_ptr< SwapIndexclone (const Handle< YieldTermStructure > &forwarding) const
 returns a copy of itself linked to a different forwarding curve
 
virtual ext::shared_ptr< SwapIndexclone (const Handle< YieldTermStructure > &forwarding, const Handle< YieldTermStructure > &discounting) const
 returns a copy of itself linked to different curves
 
virtual ext::shared_ptr< SwapIndexclone (const Period &tenor) const
 returns a copy of itself with different tenor
 
Rate forecastFixing (const Date &fixingDate) const
 It can be overridden to implement particular conventions.
 

Additional Inherited Members

- Public Types inherited from Observer
typedef boost::unordered_set< ext::shared_ptr< Observable > > set_type
 
typedef set_type::iterator iterator
 
- Protected Attributes inherited from InterestRateIndex
std::string familyName_
 
Period tenor_
 
Natural fixingDays_
 
Currency currency_
 
DayCounter dayCounter_
 
std::string name_
 

Detailed Description

base class for swap-rate indexes

Member Function Documentation

◆ underlyingSwap()

ext::shared_ptr<VanillaSwap> underlyingSwap ( const Date fixingDate) const
Warning:
Relinking the term structure underlying the index will not have effect on the returned swap.