IBORFixing#
- class rateslib.data.fixings.IBORFixing(*, rate_index, accrual_start, date=NoInput.blank, value=NoInput.blank, identifier=NoInput.blank)#
Bases:
_BaseFixingA rate fixing value referencing a tenor-IBOR type calculation.
- Parameters:
rate_index (FloatRateIndex) – The parameters associated with the floating rate index.
accrual_start (datetime) – The start accrual date for the period of the floating rate.
date (datetime) – The date of relevance for the fixing, which is its publication date. This can be determined by a
lagparameter of therate_indexmeasured from theaccrual_start.value (float, Dual, Dual2, Variable, optional) – The initial value for the fixing to adopt. Most commonly this is not given and it is determined from a timeseries of published FX rates.
identifier (str, optional) – The string name of the timeseries to be loaded by the Fixings object.
Examples
In [1]: fixings.add("EURIBOR_3M", Series(index=[dt(2000, 1, 3), dt(2000, 2, 4)], data=[1.651, 1.665])) In [2]: ibor_fix = IBORFixing( ...: accrual_start=dt(2000, 1, 5), ...: identifier="Euribor_3m", ...: rate_index=FloatRateIndex(frequency="Q", series="eur_ibor") ...: ) ...: In [3]: ibor_fix.date Out[3]: datetime.datetime(2000, 1, 3, 0, 0) In [4]: ibor_fix.value Out[4]: np.float64(1.651)
Attributes Summary
The end accrual date for the defined period of the floating rate.
The start accrual date for the defined period of the floating rate.
The date of relevance for the fixing, e.g. the publication date of an IBORFixing.
The string name of the timeseries to be loaded by the Fixings object.
The definitions for the
FloatRateIndexof the fixing.The
FloatRateSeriesfor defining the fixing.The fixing value.
Methods Summary
reset([state])Sets the
valueattribute toNoInput, which allows it to be redetermined from a timeseries.Attributes Documentation
- accrual_end#
The end accrual date for the defined period of the floating rate.
- accrual_start#
The start accrual date for the defined period of the floating rate.
- date#
The date of relevance for the fixing, e.g. the publication date of an IBORFixing.
- identifier#
The string name of the timeseries to be loaded by the Fixings object.
- index#
The definitions for the
FloatRateIndexof the fixing.
- series#
The
FloatRateSeriesfor defining the fixing.
- value#
The fixing value.
If this value is
rateslib.enums.generics.NoInput, then each request will attempt a lookup from a timeseries to obtain a new fixing value.Once this value is determined it is restated indefinitely, unless
_BaseFixing.reset()is called.
Methods Documentation
- reset(state=NoInput.blank)#
Sets the
valueattribute toNoInput, which allows it to be redetermined from a timeseries.Examples
In [1]: fx_fixing1 = FXFixing(publication=dt(2021, 1, 1), fx_index="eurusd", identifier="A") In [2]: fx_fixing2 = FXFixing(publication=dt(2021, 1, 1), fx_index="gbpusd", identifier="B") In [3]: fixings.add("A_eurusd", Series(index=[dt(2021, 1, 1)], data=[1.1]), state=100) In [4]: fixings.add("B_gbpusd", Series(index=[dt(2021, 1, 1)], data=[1.4]), state=200) # data is populated from the available Series In [5]: fx_fixing1.value Out[5]: np.float64(1.1) In [6]: fx_fixing2.value Out[6]: np.float64(1.4) # fixings are reset according to the data state In [7]: fx_fixing1.reset(state=100) In [8]: fx_fixing2.reset(state=100) # only the private data for fixing1 is removed because of its link to the data state In [9]: fx_fixing1._value Out[9]: <NoInput.blank: 0> In [10]: fx_fixing2._value Out[10]: np.float64(1.4)
- Parameters:
state (int, optional) – If given only fixings whose state matches this value will be reset. If no state is given then the value will be reset.
- Return type:
None