_IndexParams#
- class rateslib.periods.parameters._IndexParams(*, _index_method, _index_lag, _index_base, _index_fixings, _index_base_date, _index_reference_date, _index_only)#
Bases:
objectParameters for Period cashflows adjusted under some indexation.
- Parameters:
_index_method (IndexMethod) – The interpolation method, or otherwise, to determine index values from reference dates.
_index_lag (int) – The indexation lag, in months, applied to the determination of index values.
_index_base (float, Dual, Dual2, Variable, optional) – The specific value set of the base index value. If not given and
index_fixingsis a str fixings identifier that will be used to determine the base index value._index_fixings (float, Dual, Dual2, Variable, Series, str, optional) – The index value for the reference date. If a scalar value this is used directly. If a string identifier will link to the central
fixingsobject and data loader._index_base_date (datetime, optional) – The reference date for determining the base index value. Not required if
_index_basevalue is given directly._index_reference_date (datetime, optional) – The reference date for determining the index value. Not required if
_index_fixingsis given as a scalar value._index_only (bool, optional) – A flag which determines non-payment of notional on supported Periods.
Attributes Summary
The
IndexFixingassociated with the index base date.The
IndexFixingassociated with the index reference date.The indexation lag, in months, applied to the determination of index values.
The
IndexMethodto determine index values from reference dates.A flag which determines non-payment of notional on supported Periods.
Methods Summary
index_ratio([index_curve])Calculate the index ratio for the Period, including the numerator and denominator.
try_index_base([index_curve])Determine the index base value from fixing or forecast curve, with lazy error raising.
try_index_ratio([index_curve])Replicates
index_ratio()with lazy error raising.try_index_value([index_curve])Determine the index reference value from fixing or forecast curve, with lazy error raising.
Attributes Documentation
- index_base#
The
IndexFixingassociated with the index base date.
- index_fixing#
The
IndexFixingassociated with the index reference date.
- index_lag#
The indexation lag, in months, applied to the determination of index values.
- index_method#
The
IndexMethodto determine index values from reference dates.
- index_only#
A flag which determines non-payment of notional on supported Periods.
Methods Documentation
- index_ratio(index_curve=NoInput.blank)#
Calculate the index ratio for the Period, including the numerator and denominator.
\[I(m) = \frac{I_{val}(m)}{I_{base}}\]- Parameters:
index_curve (_BaseCurve, optional) – The curve from which index values are forecast if required.
- Return type:
tuple[float, Dual, Dual2, Variable] for the ratio, numerator, denominator.
- try_index_base(index_curve=NoInput.blank)#
Determine the index base value from fixing or forecast curve, with lazy error raising.
- Parameters:
index_curve (_BaseCurve, optional) – The curve from which index values are forecast if required.
- Return type:
- try_index_ratio(index_curve=NoInput.blank)#
Replicates
index_ratio()with lazy error raising.
- try_index_value(index_curve=NoInput.blank)#
Determine the index reference value from fixing or forecast curve, with lazy error raising.
- Parameters:
index_curve (_BaseCurve, optional) – The curve from which index values are forecast if required.
- Return type: