Index Class Reference
#include <ql/index.hpp>
Inheritance diagram for Index:

Detailed Description
purely virtual base class for indexes
Public Member Functions | |
virtual std::string | name () const=0 |
Returns the name of the index. | |
virtual Rate | fixing (const Date &fixingDate, bool forecastTodaysFixing=false) const=0 |
returns the fixing at the given date | |
void | addFixing (const Date &fixingDate, Rate fixing) |
stores the historical fixing at the given date | |
template<class DateIterator, class ValueIterator> | |
void | addFixings (DateIterator dBegin, DateIterator dEnd, ValueIterator vBegin) |
stores historical fixings at the given dates | |
void | clearFixings () |
clears all stored historical fixings |
Member Function Documentation
virtual std::string name | ( | ) | const [pure virtual] |
Returns the name of the index.
- Warning:
- This method is used for output and comparison between indexes. It is not meant to be used for writing switch-on-type code.
- Todo:
- add methods returning InterestRate
Implemented in InterestRateIndex.
virtual Rate fixing | ( | const Date & | fixingDate, | |
bool | forecastTodaysFixing = false | |||
) | const [pure virtual] |
returns the fixing at the given date
the date passed as arguments must be the actual calendar date of the fixing; no settlement days must be used.
Implemented in InterestRateIndex.
stores the historical fixing at the given date
the date passed as arguments must be the actual calendar date of the fixing; no settlement days must be used.
void addFixings | ( | DateIterator | dBegin, | |
DateIterator | dEnd, | |||
ValueIterator | vBegin | |||
) |
stores historical fixings at the given dates
the dates passed as arguments must be the actual calendar dates of the fixings; no settlement days must be used.