Computing Cash Flows for a Short-Dated SOFR Swap Quote
Summary
The document explains how to interpret a short-term fixed-for-floating SOFR swap quote and reproduce its cash flows. The quoted ticker represents a swap with specified settlement and maturity dates; generic instrument descriptions alone do not identify those dates. For a historical example, the author uses observed business-day SOFR fixings, applies ACT/360 accrual for each interval, and compounds the daily factors to obtain the floating-leg return. The fixed leg is calculated from its quote over the swap's accrual period.
To compare the floating result with a swap-pricing screen, the compounded return is converted to an equivalent annual coupon, rounded to the stated precision, then applied over the period. The author reports that the calculation matches the screen's cash-flow tab. The example uses a particular historical date range, notional, and market convention; reproducing other quotes requires their own settlement dates, fixings, accrual details, and rounding conventions.
Key ideas
- A ticker's settlement date, maturity, and quote define the specific swap, while generic descriptions show only broad conventions.
- The floating leg compounds daily SOFR fixings using ACT/360 accrual fractions.
- The fixed leg uses the quoted rate over the swap's accrual period.
- The compounded floating return can be expressed as an equivalent annual coupon for comparison with a pricing screen.
- Exact replication depends on dates, fixings, day-count conventions, and rounding.
Tags
Full text
# What could the cashflows of US0SFR1Z Curncy be?
# What could the cashflows of US0SFR1Z Curncy be?
So this "SOFR vs fixed" swap has a fixed leg paying 5.231% yearly and a floating leg paying yearly the yearly compounded SOFR rate, and has a 1W term. If it has started today, it won't have any cashflows exchanged as 1W < 1Y. So necessarily it is a swap having started earlier but then, which swap is it ?
## Answer by AKdemy (score 1, accepted)
https://quant.stackexchange.com/a/76206
The DES page always displays very generic information, the basic SOFR swap conventions in the case of `US0SFR1Z`.
Settlement, term and quote are all for the specific ticker though. So you have a fixed-float SOFR swap, which settles on 25th of July and matures in 1 week (August 1st).
In terms of computing, this is actually simpler with such short term swaps. The next screenshot shows how SWPM matches the HP, which is the quoted swap with standard T+2 settlement.
I chose a historical start date because you can directly observe the fixings on the `Resets` tab to compute the actual cashflows.
Replicating the computation in Python looks like this:
```
from datetime import date
import pandas as pd
from math import prod
start = date(2023, 7, 13)
end = date(2023, 7, 20)
pd.date_range(start, end, freq='B')
df = pd.DataFrame({"Dates" : pd.date_range(start, end, freq='B'), "Reset Rate" : [5.06,5.05,5.06,5.06,5.05, 5.06]})
days = [(df.Dates[i+1]-df.Dates[i]).days for i in range(0,len(df)-1)]
days.append(0)
df["Days"] = days
df["Rate"] = 1+df["Reset Rate"]/100*df.Days/360
df
```
This creates a DataFrame that shows the Dates, associated Resets (fixings), and the computed rate, which is computed as $1+df["Reset Rate"]/100*df.Days/360$ to adjust for ACT/360 daycount.
The fixed leg is trivial, and for the float leg, one needs to round the compounded value by 7 decimal points and adjust for daycount again to get an annual value, called `Equivalent Coupon` in SWPM.
```
N = 10000000
quote = 0.05058
fixed_leg = N*(1+quote*7/360)
Equiv_Coupon = round((prod(df.Rate[0:5])-1)*360/7,7)
float_leg = 10000000*(1+Equiv_Coupon*7/360)
pd.set_option('display.float_format', lambda x: '%.7f' % x)
pd.DataFrame({"Notional" : [N], "Quote" : [quote], "Fixed Leg Payment" : fixed_leg, "Equivalent Coupon" : Equiv_Coupon, "Float Leg Payment" : float_leg,})
```
Which is identical to the casfhlow tab in BBG:Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.