An index by calendar period
calendar_index.RdOne value per period of one grain, from a first period on, optionally
extended past its last period at a constant annual rate: a CPI, a wage
index or a claims-inflation index (issue #979, design note
docs/design/reserving-inflation.md). Python's CalendarIndex.
calendar_index_value() reads the index of the period that contains each
month.
Arguments
- first
The first period:
"2020"(or the number 2020),"2020H2","2020Q3"or"2020-07". Its grain is the index's grain.- values
The index in
first, then one value per period: finite and positive.- future_rate
The annual rate past the last period, compounded by months from the last period's start: finite and above -1.
NULL(the default) leaves a period past the last an error.- index
A
calendar_index.- month
Months as
"YYYY-MM"labels or dates.
Value
calendar_index(): a calendar_index with the properties
first, values, future_rate and periods (the given periods, one
per value). calendar_index_value(): a numeric vector, one value per
month; an error for a month before the first period, or after the last
when there is no future rate.