|
QuantLib: a free/open-source library for quantitative finance
Reference manual - version 1.40
|
Base class for inflation-rate indexes,. More...
#include <ql/indexes/inflationindex.hpp>
Public Member Functions | |
| InflationIndex (std::string familyName, Region region, bool revised, Frequency frequency, const Period &availabilitiyLag, Currency currency) | |
Index interface | |
| std::string | name () const override |
| Returns the name of the index. | |
| Calendar | fixingCalendar () const override |
| bool | isValidFixingDate (const Date &) const override |
| returns TRUE if the fixing date is a valid one | |
| Real | fixing (const Date &fixingDate, bool forecastTodaysFixing=false) const override=0 |
| Real | pastFixing (const Date &fixingDate) const override=0 |
| returns a past fixing at the given date | |
| void | addFixing (const Date &fixingDate, Rate fixing, bool forceOverwrite=false) override |
| Public Member Functions inherited from Index | |
| bool | hasHistoricalFixing (const Date &fixingDate) const |
| returns whether a historical fixing was stored for the given date | |
| const TimeSeries< Real > & | timeSeries () const |
| returns the fixing TimeSeries | |
| virtual bool | allowsNativeFixings () |
| check if index allows for native fixings. | |
| void | update () override |
| 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 | |
| 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 () |
Inspectors | |
| Date | referenceDate_ |
| std::string | familyName_ |
| Region | region_ |
| bool | revised_ |
| Frequency | frequency_ |
| Period | availabilityLag_ |
| Currency | currency_ |
| std::string | familyName () const |
| Region | region () const |
| bool | revised () const |
| Frequency | frequency () const |
| Period | availabilityLag () const |
| Currency | currency () const |
Additional Inherited Members | |
| Public Types inherited from Observer | |
| typedef set_type::iterator | iterator |
| ext::shared_ptr< Observable > | notifier () const |
Base class for inflation-rate indexes,.
|
overridevirtual |
|
overridevirtual |
Inflation indices are not associated to a particular day, but to months or quarters. Therefore, they do not have fixing calendars. Since we're forced by the base Index interface to add one, this method returns a NullCalendar instance.
Implements Index.
|
overridevirtual |
returns TRUE if the fixing date is a valid one
Implements Index.
|
overridepure virtual |
Forecasting index values requires an inflation term structure, with a base date that is earlier than its asof date. This must be so because indices are available only with a lag. Usually, it makes sense for the base date to be the first day of the month of the last published fixing.
Implements Index.
Implemented in YoYInflationIndex, and ZeroInflationIndex.
returns a past fixing at the given date
Reimplemented from Index.
Implemented in YoYInflationIndex, and ZeroInflationIndex.
|
overridevirtual |
Reimplemented from Index.
| Period availabilityLag | ( | ) | const |
The availability lag describes when the index might be available; for instance, the inflation value for January may only be available in April. This doesn't mean that that inflation value is considered as the April fixing; it remains the January fixing, independently of the lag in availability.