Base class for inflation-rate indexes,. More...
#include <ql/indexes/inflationindex.hpp>
Public Member Functions | |
InflationIndex (const std::string &familyName, const Region ®ion, bool revised, bool interpolated, Frequency frequency, const Period &availabilitiyLag, const Currency ¤cy) | |
Index interface | |
std::string | name () const |
Returns the name of the index. More... | |
Calendar | fixingCalendar () const |
bool | isValidFixingDate (const Date &) const |
returns TRUE if the fixing date is a valid one | |
Rate | fixing (const Date &fixingDate, bool forecastTodaysFixing=false) const =0 |
void | addFixing (const Date &fixingDate, Rate fixing, bool forceOverwrite=false) |
Observer interface | |
void | update () |
![]() | |
const TimeSeries< Real > & | timeSeries () const |
returns the fixing TimeSeries | |
virtual bool | allowsNativeFixings () |
check if index allows for native fixings. 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 () |
![]() | |
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_ |
bool | interpolated_ |
Frequency | frequency_ |
Period | availabilityLag_ |
Currency | currency_ |
std::string | familyName () const |
Region | region () const |
bool | revised () const |
bool | interpolated () const |
Frequency | frequency () const |
Period | availabilityLag () const |
Currency | currency () const |
Additional Inherited Members | |
![]() | |
typedef boost::unordered_set< ext::shared_ptr< Observable > > | set_type |
typedef set_type::iterator | iterator |
Base class for inflation-rate indexes,.
InflationIndex | ( | const std::string & | familyName, |
const Region & | region, | ||
bool | revised, | ||
bool | interpolated, | ||
Frequency | frequency, | ||
const Period & | availabilitiyLag, | ||
const Currency & | currency | ||
) |
An inflation index may return interpolated values. These are linearly interpolated values with act/act convention within a period. Note that stored "fixings" are always flat (constant) within a period and interpolated as needed. This is because interpolation adds an addional availability lag (because you always need the next period to give the previous period's value) and enables storage of the most recent uninterpolated value.
|
virtual |
|
virtual |
Inflation indices do not have fixing calendars. An inflation index value is valid for every day (including weekends) of a calendar period. I.e. it uses the NullCalendar as its fixing calendar.
Implements Index.
Forecasting index values requires an inflation term structure. The inflation term structure (ITS) defines the usual lag (not the index). I.e. an ITS is always relatve to a base date that is earlier than its asof date. This must be so because indices are available only with a lag. However, the index availability lag only sets a minimum lag for the ITS. An ITS may be relative to an earlier date, e.g. an index may have a 2-month delay in publication but the inflation swaps may take as their base the index 3 months before.
Implements Index.
Implemented in YoYInflationIndex, and ZeroInflationIndex.
this method creates all the "fixings" for the relevant period of the index. E.g. for monthly indices it will put the same value in every calendar day in the month.
Reimplemented from Index.
|
virtual |
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.
bool interpolated | ( | ) | const |
Forecasting index values using an inflation term structure uses the interpolation of the inflation term structure unless interpolation is set to false. In this case the extrapolated values are constant within each period taking the mid-period extrapolated value.
Period availabilityLag | ( | ) | const |
The availability lag describes when the index is available, not how it is used. Specifically the fixing for, say, January, may only be available in April but the index will always return the index value applicable for January as its January fixing (independent of the lag in availability).