purely virtual base class for indexes More...
#include <ql/index.hpp>
Public Member Functions | |
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 | |
virtual bool | isValidFixingDate (const Date &fixingDate) const =0 |
returns TRUE if the fixing date is a valid one | |
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 | |
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 | |
![]() | |
Observable (const Observable &) | |
Observable & | operator= (const Observable &) |
void | notifyObservers () |
purely virtual base class for indexes
|
pure virtual |
Returns the name of the index.
Implemented in InterestRateIndex, and InflationIndex.
|
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 InflationIndex, InterestRateIndex, YoYInflationIndex, and ZeroInflationIndex.
|
virtual |
check if index allows for native fixings.
If this returns false, calls to addFixing and similar methods will raise an exception.
Reimplemented in SwapSpreadIndex.
|
virtual |
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.
Reimplemented in InflationIndex.
void addFixings | ( | const TimeSeries< Real > & | t, |
bool | forceOverwrite = false |
||
) |
stores historical fixings from a TimeSeries
the dates in the TimeSeries must be the actual calendar dates of the fixings; no settlement days must be used.
void addFixings | ( | DateIterator | dBegin, |
DateIterator | dEnd, | ||
ValueIterator | vBegin, | ||
bool | forceOverwrite = false |
||
) |
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.