RFRFixing#
- class rateslib.data.fixings.RFRFixing(*, rate_index, accrual_start, accrual_end, fixing_method, method_param, spread_compound_method, float_spread, value=NoInput.blank, identifier=NoInput.blank)#
Bases:
_BaseFixingA rate fixing value representing an RFR type calculating involving multiple RFR publications.
- Parameters:
rate_index (FloatRateIndex) – The parameters associated with the floating rate index.
accrual_start (datetime) – The start accrual date for the period.
accrual_end (datetime) – The end accrual date for the period.
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. For alignment with internal structuring these should have the suffix “_1B”, e.g. “ESTR_1B”.
fixing_method (FloatFixingMethod or str) – The
FloatFixingMethodobject used to combine multiple RFR fixings.method_param (int) – A parameter required by the
fixing_method.spread_compound_method (SpreadCompoundMethod or str) – A
SpreadCompoundMethodobject used define the calculation of the addition of thefloat_spread.float_spread (float, DUal, Dual2, Variable) – An additional amount added to the calculation to determine the final period rate.
Examples
The below is a fully determined RFRFixing with populated rates.
In [1]: fixings.add("SOFR_1B", Series(index=[ ...: dt(2025, 1, 8), dt(2025, 1, 9), dt(2025, 1, 10), dt(2025, 1, 13), dt(2025, 1, 14) ...: ], data=[1.1, 2.2, 3.3, 4.4, 5.5])) ...: In [2]: rfr_fix = RFRFixing( ...: accrual_start=dt(2025, 1, 9), ...: accrual_end=dt(2025, 1, 15), ...: identifier="SOFR_1B", ...: spread_compound_method=SpreadCompoundMethod.NoneSimple, ...: fixing_method=FloatFixingMethod.RFRPaymentDelay, ...: method_param=0, ...: float_spread=0.0, ...: rate_index=FloatRateIndex(frequency="1B", series="usd_rfr") ...: ) ...: In [3]: rfr_fix.value Out[3]: np.float64(3.6674341857576565) In [4]: rfr_fix.populated Out[4]: 2025-01-09 2.2 2025-01-10 3.3 2025-01-13 4.4 2025-01-14 5.5 dtype: object
This second example is a partly undetermined period, and will result in NoInput for its value but has recorded partial population of its individual RFRs.
In [5]: rfr_fix2 = RFRFixing( ...: accrual_start=dt(2025, 1, 9), ...: accrual_end=dt(2025, 1, 21), ...: identifier="SOFR_1B", ...: spread_compound_method="NoneSimple", ...: fixing_method="RFRPaymentDelay", ...: method_param=0, ...: float_spread=0.0, ...: rate_index=FloatRateIndex(frequency="1B", series="usd_rfr") ...: ) ...: In [6]: rfr_fix2.value Out[6]: <NoInput.blank: 0> In [7]: rfr_fix2.populated Out[7]: 2025-01-09 2.2 2025-01-10 3.3 2025-01-13 4.4 2025-01-14 5.5 dtype: object
Attributes Summary
The accrual end date for the underlying float rate period.
The accrual start date for the underlying float rate period.
The fixing method adjusted start and end dates for the observation dates and the dcf dates.
The date of relevance for the fixing, e.g. the publication date of an IBORFixing.
A sequence of dates defining the individual DCF dates for the period.
A sequence of dates defining the individual observation rates for the period.
A sequence of floats defining the individual DCF values associated with the DCF dates natural to the fixing rates.
A sequence of floats defining the individual DCF values associated with the method's observation dates.
The
FloatFixingMethodobject used to combine multiple RFR fixings.The spread value incorporated into the fixing calculation using the compound method.
The string name of the timeseries to be loaded by the Fixings object.
A parameter required by the
fixing_method.The looked up fixings as part of the calculation after a
valuecalculation.The
FloatRateIndexdefining the parameters of the RFR interest rate index.A
SpreadCompoundMethodobject used define the calculation of the addition of thefloat_spread.The fixings that are not published but are required to determine the period 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 accrual end date for the underlying float rate period.
- accrual_start#
The accrual start date for the underlying float rate period.
- bounds#
The fixing method adjusted start and end dates for the observation dates and the dcf dates.
- date#
The date of relevance for the fixing, e.g. the publication date of an IBORFixing.
- dates_dcf#
A sequence of dates defining the individual DCF dates for the period.
- dates_obs#
A sequence of dates defining the individual observation rates for the period.
- dcfs_dcf#
A sequence of floats defining the individual DCF values associated with the DCF dates natural to the fixing rates.
- dcfs_obs#
A sequence of floats defining the individual DCF values associated with the method’s observation dates.
- fixing_method#
The
FloatFixingMethodobject used to combine multiple RFR fixings.
- float_spread#
The spread value incorporated into the fixing calculation using the compound method.
- identifier#
The string name of the timeseries to be loaded by the Fixings object.
- method_param#
A parameter required by the
fixing_method.
- populated#
The looked up fixings as part of the calculation after a
valuecalculation.
- rate_index#
The
FloatRateIndexdefining the parameters of the RFR interest rate index.
- spread_compound_method#
A
SpreadCompoundMethodobject used define the calculation of the addition of thefloat_spread.
- unpopulated#
The fixings that are not published but are required to determine the period fixing.
- value#
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