|
QuantLib: a free/open-source library for quantitative finance
Reference manual - version 1.40
|
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. | |
| 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 | |
| bool | hasHistoricalFixing (const Date &fixingDate) const |
| returns whether a historical fixing was stored for the given date | |
| virtual Real | fixing (const Date &fixingDate, bool forecastTodaysFixing=false) const =0 |
| returns the fixing at the given date | |
| virtual Real | pastFixing (const Date &fixingDate) const |
| returns a past fixing at the given date | |
| const TimeSeries< Real > & | timeSeries () const |
| returns the fixing TimeSeries | |
| virtual bool | allowsNativeFixings () |
| check if index allows for native fixings. | |
| Public Member Functions inherited from Observable | |
| Observable (const Observable &) | |
| Observable & | operator= (const Observable &) |
| Observable (Observable &&)=delete | |
| Observable & | operator= (Observable &&)=delete |
| void | notifyObservers () |
| Public Member Functions inherited from Observer | |
| Observer (const Observer &) | |
| Observer & | operator= (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 () |
Observer interface | |
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 | update () override |
| virtual void | addFixing (const Date &fixingDate, Real fixing, bool forceOverwrite=false) |
| void | addFixings (const TimeSeries< Real > &t, bool forceOverwrite=false) |
| stores historical fixings from a TimeSeries | |
| template<class DateIterator, class ValueIterator> | |
| void | addFixings (DateIterator dBegin, DateIterator dEnd, ValueIterator vBegin, bool forceOverwrite=false) |
| stores historical fixings at the given dates | |
| void | clearFixings () |
| clears all stored historical fixings | |
| ext::shared_ptr< Observable > | notifier () const |
Additional Inherited Members | |
| Public Types inherited from Observer | |
| typedef set_type::iterator | iterator |
purely virtual base class for indexes
|
pure virtual |
Returns the name of the index.
Implemented in CommodityIndex, EquityIndex, InflationIndex, and InterestRateIndex.
|
pure virtual |
returns the calendar defining valid fixing dates
Implemented in CommodityIndex, EquityIndex, InflationIndex, and InterestRateIndex.
|
pure virtual |
returns TRUE if the fixing date is a valid one
Implemented in BMAIndex, CommodityIndex, EquityIndex, InflationIndex, and InterestRateIndex.
|
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 CommodityIndex, EquityIndex, InflationIndex, InterestRateIndex, YoYInflationIndex, and ZeroInflationIndex.
returns a past 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, SwapSpreadIndex, 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.
|
overridevirtual |
This method must be implemented in derived classes. An instance of Observer does not call this method directly: instead, it will be called by the observables the instance registered with when they need to notify any changes.
Implements Observer.
| 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.