QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
Public Member Functions | List of all members
IborIndex Class Reference

base class for Inter-Bank-Offered-Rate indexes (e.g. Libor, etc.) More...

#include <ql/indexes/iborindex.hpp>

+ Inheritance diagram for IborIndex:
+ Collaboration diagram for IborIndex:

Public Member Functions

 IborIndex (const std::string &familyName, const Period &tenor, Natural settlementDays, const Currency &currency, const Calendar &fixingCalendar, BusinessDayConvention convention, bool endOfMonth, const DayCounter &dayCounter, Handle< YieldTermStructure > h={})
 
InterestRateIndex interface
Date maturityDate (const Date &valueDate) const override
 
Rate forecastFixing (const Date &fixingDate) const override
 It can be overridden to implement particular conventions. More...
 
Inspectors
BusinessDayConvention businessDayConvention () const
 
bool endOfMonth () const
 
Handle< YieldTermStructureforwardingTermStructure () const
 the curve used to forecast fixings More...
 
- Public Member Functions inherited from InterestRateIndex
 InterestRateIndex (std::string familyName, const Period &tenor, Natural settlementDays, Currency currency, Calendar fixingCalendar, DayCounter dayCounter)
 
std::string name () const override
 Returns the name of the index. More...
 
Calendar fixingCalendar () const override
 returns the calendar defining valid fixing dates More...
 
bool isValidFixingDate (const Date &fixingDate) const override
 returns TRUE if the fixing date is a valid one More...
 
Rate fixing (const Date &fixingDate, bool forecastTodaysFixing=false) const override
 returns the fixing at the given date More...
 
void update () override
 
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
 ~Index () override=default
 
virtual std::string name () const =0
 Returns the name of the index. More...
 
virtual Calendar fixingCalendar () const =0
 returns the calendar defining valid fixing dates More...
 
virtual bool isValidFixingDate (const Date &fixingDate) const =0
 returns TRUE if the fixing date is a valid one More...
 
bool hasHistoricalFixing (const Date &fixingDate) const
 returns whether a historical fixing was stored for the given date More...
 
virtual Real fixing (const Date &fixingDate, bool forecastTodaysFixing=false) const =0
 returns the fixing at the given date More...
 
const TimeSeries< Real > & timeSeries () const
 returns the fixing TimeSeries More...
 
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 More...
 
- Public Member Functions inherited from Observable
 Observable ()
 
 Observable (const Observable &)
 
Observableoperator= (const Observable &)
 
 Observable (Observable &&)=delete
 
Observableoperator= (Observable &&)=delete
 
virtual ~Observable ()=default
 
void notifyObservers ()
 
- 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 ()
 

Other methods

BusinessDayConvention convention_
 
Handle< YieldTermStructuretermStructure_
 
bool endOfMonth_
 
class IborCoupon
 
virtual ext::shared_ptr< IborIndexclone (const Handle< YieldTermStructure > &forwarding) const
 returns a copy of itself linked to a different forwarding curve More...
 
Rate forecastFixing (const Date &valueDate, const Date &endDate, Time t) const
 

Additional Inherited Members

- Public Types inherited from Observer
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 Inter-Bank-Offered-Rate indexes (e.g. Libor, etc.)

Definition at line 35 of file iborindex.hpp.

Constructor & Destructor Documentation

◆ IborIndex()

IborIndex ( const std::string &  familyName,
const Period tenor,
Natural  settlementDays,
const Currency currency,
const Calendar fixingCalendar,
BusinessDayConvention  convention,
bool  endOfMonth,
const DayCounter dayCounter,
Handle< YieldTermStructure h = {} 
)

Definition at line 28 of file iborindex.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ maturityDate()

Date maturityDate ( const Date valueDate) const
overridevirtual

Implements InterestRateIndex.

Definition at line 54 of file iborindex.cpp.

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

◆ forecastFixing() [1/2]

Rate forecastFixing ( const Date fixingDate) const
overridevirtual

It can be overridden to implement particular conventions.

Implements InterestRateIndex.

Definition at line 42 of file iborindex.cpp.

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

◆ businessDayConvention()

BusinessDayConvention businessDayConvention ( ) const

Definition at line 103 of file iborindex.hpp.

+ Here is the caller graph for this function:

◆ endOfMonth()

bool endOfMonth ( ) const

Definition at line 54 of file iborindex.hpp.

+ Here is the caller graph for this function:

◆ forwardingTermStructure()

Handle< YieldTermStructure > forwardingTermStructure ( ) const

the curve used to forecast fixings

Definition at line 108 of file iborindex.hpp.

◆ clone()

ext::shared_ptr< IborIndex > clone ( const Handle< YieldTermStructure > &  forwarding) const
virtual

returns a copy of itself linked to a different forwarding curve

Reimplemented in Shibor, Libor, and OvernightIndex.

Definition at line 61 of file iborindex.cpp.

+ Here is the call graph for this function:

◆ forecastFixing() [2/2]

Rate forecastFixing ( const Date valueDate,
const Date endDate,
Time  t 
) const
private

Definition at line 112 of file iborindex.hpp.

+ Here is the call graph for this function:

Friends And Related Function Documentation

◆ IborCoupon

friend class IborCoupon
friend

Definition at line 84 of file iborindex.hpp.

Member Data Documentation

◆ convention_

BusinessDayConvention convention_
protected

Definition at line 65 of file iborindex.hpp.

◆ termStructure_

Handle<YieldTermStructure> termStructure_
protected

Definition at line 66 of file iborindex.hpp.

◆ endOfMonth_

bool endOfMonth_
protected

Definition at line 67 of file iborindex.hpp.