QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Types | Static Public Member Functions | List of all members
CPI Struct Reference

#include <inflationindex.hpp>

+ Collaboration diagram for CPI:

Public Types

enum  InterpolationType { AsIndex , Flat , Linear }
 when you observe an index, how do you interpolate between fixings? More...
 

Static Public Member Functions

static Real laggedFixing (const ext::shared_ptr< ZeroInflationIndex > &index, const Date &date, const Period &observationLag, InterpolationType interpolationType)
 interpolated inflation fixing More...
 

Detailed Description

Definition at line 38 of file inflationindex.hpp.

Member Enumeration Documentation

◆ InterpolationType

when you observe an index, how do you interpolate between fixings?

Enumerator
AsIndex 

same interpolation as index

Flat 

flat from previous fixing

Linear 

linearly between bracketing fixings

Definition at line 40 of file inflationindex.hpp.

Member Function Documentation

◆ laggedFixing()

Real laggedFixing ( const ext::shared_ptr< ZeroInflationIndex > &  index,
const Date date,
const Period observationLag,
CPI::InterpolationType  interpolationType 
)
static

interpolated inflation fixing

Parameters
indexThe index whose fixing should be retrieved
dateThe date without lag; usually, the payment date for some inflation-based coupon.
observationLagThe observation lag to be subtracted from the passed date; for instance, if the passed date is in May and the lag is three months, the inflation fixing from February (and March, in case of interpolation) will be observed.
interpolationTypeThe interpolation type (flat or linear)

Definition at line 28 of file inflationindex.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: