QuantLib_InflationIndex

Langue: en

Autres versions - même langue

Version: 379296 (fedora - 01/12/10)

Section: 3 (Bibliothèques de fonctions)

Sommaire

NAME

QuantLib::InflationIndex -

Base class for inflation-rate indexes,.

SYNOPSIS


#include <ql/indexes/inflationindex.hpp>

Inherits QuantLib::Index, and QuantLib::Observer.

Inherited by YoYInflationIndex, and ZeroInflationIndex.

Public Member Functions


InflationIndex (const std::string &familyName, const Region &region, bool revised, bool interpolated, Frequency frequency, const Period &availabilitiyLag, const Currency &currency)

Index interface

 


std::string name () const

Calendar fixingCalendar () const

bool isValidFixingDate (const Date &fixingDate) const

virtual Rate fixing (const Date &fixingDate, bool forecastTodaysFixing=false) const =0

void addFixing (const Date &fixingDate, Rate fixing, bool forceOverwrite=false)

Observer interface

 


void update ()

Inspectors

 


std::string familyName () const

Region region () const

bool revised () const

bool interpolated () const

Frequency frequency () const

Period availabilityLag () const

Currency currency () const

Protected Attributes


Date referenceDate_

std::string familyName_

Region region_

bool revised_

bool interpolated_

Frequency frequency_

Period availabilityLag_

Currency currency_

Detailed Description

Base class for inflation-rate indexes,.

Constructor & Destructor Documentation

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.

Member Function Documentation

Calendar fixingCalendar () constInflation 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.

virtual Rate fixing (const Date & fixingDate, bool forecastTodaysFixing = false) const [pure virtual]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.

Implemented in ZeroInflationIndex, and YoYInflationIndex.

void addFixing (const Date & fixingDate, Rate fixing, bool forceOverwrite = false)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.

void update () [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 () constForecasting 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 () constThe 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).

Author

Generated automatically by Doxygen for QuantLib from the source code.