Fixings Exposures and Reset Ladders#

Every Instrument that has an exposure to a floating interest rate contains a method that will obtain the risk and specific notional equivalent for an individual fixing. This is a very useful display for fixed income rates derivative trading.

The column headers for the resultant DataFrames will be dynamically determined from the id of the Curve which forecasts the exposed fixing.

# Setup some Curves against which fixing exposure will be measured
In [1]: estr = Curve({dt(2000, 1, 1): 1.0, dt(2005, 1, 1): 0.95}, calendar="tgt", id="estr", convention="act360")

In [2]: euribor1m = Curve({dt(2000, 1, 1): 1.0, dt(2005, 1, 1): 0.95}, calendar="tgt", id="euribor1m", convention="act360")

In [3]: euribor3m = Curve({dt(2000, 1, 1): 1.0, dt(2005, 1, 1): 0.95}, calendar="tgt", id="euribor3m", convention="act360")

In [4]: euribor6m = Curve({dt(2000, 1, 1): 1.0, dt(2005, 1, 1): 0.95}, calendar="tgt", id="euribor6m", convention="act360")

An IRS has exposure only via its FloatLeg.

In [5]: irs = IRS(
   ...:     effective=dt(2000, 1, 10),
   ...:     termination="1w",
   ...:     spec="eur_irs",
   ...:     curves=estr,
   ...:     notional=2e6,
   ...: )
   ...: 

In [6]: irs.fixings_table()
Out[6]: 
                 estr                
             notional risk  dcf rates
obs_dates                            
2000-01-10 1999943.85 0.56 0.00  1.01
2000-01-11 2000000.00 0.56 0.00  1.01
2000-01-12 2000056.15 0.56 0.00  1.01
2000-01-13 2000112.30 0.56 0.00  1.01
2000-01-14 2000168.46 1.67 0.01  1.01

Performance: approximate and right#

Calculating fixings exposures, particularly for every daily RFR rate, is an expensive calculation. The performance can be improved by firstly using approximate which yields almost exactly the same results but performs a faster, more generic calculation, and also using the right bound, which avoids doing any calculation for exposures out-of-scope.

In [22]: irs = IRS(
   ....:     effective=dt(2000, 1, 10),
   ....:     termination="4y",
   ....:     spec="eur_irs",
   ....:     curves=estr,
   ....:     notional=2e6,
   ....: )
   ....: 

In [23]: irs.fixings_table(approximate=True, right=dt(2000, 1, 24))
Out[23]: 
                 estr                
             notional risk  dcf rates
obs_dates                            
2000-01-10 1999943.85 0.56 0.00  1.02
2000-01-11 2000000.00 0.56 0.00  1.02
2000-01-12 2000056.15 0.56 0.00  1.02
2000-01-13 2000112.30 0.56 0.00  1.02
2000-01-14 2000280.77 1.67 0.01  1.02
2000-01-17 2000336.93 0.56 0.00  1.02
2000-01-18 2000393.09 0.56 0.00  1.02
2000-01-19 2000449.25 0.56 0.00  1.02
2000-01-20 2000505.42 0.56 0.00  1.02
2000-01-21 2000673.92 1.67 0.01  1.02
2000-01-24 2000730.09 0.56 0.00  1.02

Aggregation of fixings exposures#

Adding many Instruments to a Portfolio, provided those Instruments have been properly configured, allows their fixing exposures to be analysed and aggregated. Instruments with no fixing exposures, such as a FixedRateBond, will simply be ignored.

In [39]: frb = FixedRateBond(dt(2000, 1, 3), "10y", fixed_rate=2.5, spec="us_gb")

In [40]: pf = Portfolio([irs, sbs, fra, xcs, frn, stir, iirs, zcs, frb])

In [41]: pf.fixings_table(approximate=True, right=dt(2000, 8, 1))
Out[41]: 
                 estr                   euribor3m                    euribor6m                    euribor1m                 
             notional risk  dcf rates    notional   risk  dcf rates   notional   risk  dcf rates   notional  risk  dcf rates
obs_dates                                                                                                                   
2000-01-04        NaN  NaN  NaN   NaN -3000000.00 -75.63 0.25  1.01 3000000.00 150.87 0.51  1.01        NaN   NaN  NaN   NaN
2000-01-05        NaN  NaN  NaN   NaN  -999887.71 -25.21 0.25  1.01        NaN    NaN  NaN   NaN        NaN   NaN  NaN   NaN
2000-01-06        NaN  NaN  NaN   NaN         NaN    NaN  NaN   NaN        NaN    NaN  NaN   NaN 5444899.81 46.83 0.09  1.01
2000-01-10 1999943.85 0.56 0.00  1.02         NaN    NaN  NaN   NaN        NaN    NaN  NaN   NaN        NaN   NaN  NaN   NaN
2000-01-11 2000000.00 0.56 0.00  1.02  -986301.37 -24.86 0.25  2.21        NaN    NaN  NaN   NaN        NaN   NaN  NaN   NaN
...               ...  ...  ...   ...         ...    ...  ...   ...        ...    ...  ...   ...        ...   ...  ...   ...
2000-07-26 2011092.25 0.56 0.00  1.02         NaN    NaN  NaN   NaN        NaN    NaN  NaN   NaN        NaN   NaN  NaN   NaN
2000-07-27 2011148.72 0.56 0.00  1.02         NaN    NaN  NaN   NaN        NaN    NaN  NaN   NaN        NaN   NaN  NaN   NaN
2000-07-28 2011318.11 1.67 0.01  1.02         NaN    NaN  NaN   NaN        NaN    NaN  NaN   NaN        NaN   NaN  NaN   NaN
2000-07-31 2011374.58 0.56 0.00  1.02         NaN    NaN  NaN   NaN        NaN    NaN  NaN   NaN        NaN   NaN  NaN   NaN
2000-08-01 2011431.05 0.56 0.00  1.02         NaN    NaN  NaN   NaN        NaN    NaN  NaN   NaN        NaN   NaN  NaN   NaN

[147 rows x 16 columns]