ThirdMomentQuantX

Chapter 10

Term rates, swaps of any legs and FRAs

Contents
  1. 10.1 Notation
  2. 10.2 Term-rate indices
  3. 10.3 Term-rate leg
  4. 10.4 Pricing a term-rate leg
  5. 10.5 Swaps of any legs
  6. 10.6 Interest rate swaps
  7. 10.7 Forward rate agreements
  8. 10.8 SAIBOR and the SAR conventions
  9. 10.9 Projected cash flows
  10. 10.10 Worked examples

A term rate such as 3M SAIBOR is fixed once for a deposit of a given tenor. This chapter defines a term-rate index and the dates of each fixing, the term-rate leg that pays it, how the leg is priced from fixings and a projection curve, swaps made of any fixed, term-rate or overnight legs in one currency or several, the interest rate swap (IRS) of a fixed leg against a term-rate leg, and the forward rate agreement (FRA). Dates, calendars, day counts and schedules are those of the first chapters; fixed and overnight legs are those of Chapter 6; curves are those of Chapter 7; amounts and FX rates are those of Chapter 8.

10.1 Notation

Symbol Meaning
\(v\) The valuation date
\(C\) The index's fixing calendar
\(L\) The index's fixing lag, in business days of \(C\)
\(\tau\) The index's tenor (ISDA "Designated Maturity"), for example 3M
\(f_i\) The fixing date of period \(i\)
\([s'_i, e'_i)\) The deposit the fixing of period \(i\) is for: its value date and maturity
\(\delta'_i\) The accrual of that deposit under the index's day count
\([s_i, e_i)\), \(p_i\) Adjusted period \(i\) of the leg and its payment date
\(\delta_i\) The accrual of period \(i\) under the leg's day count
\(N_i\), \(s^{\text{spr}}_i\) The (positive) notional and the spread of period \(i\)
\(F_i\) The index rate of period \(i\): its fixing, or its projected value
\(R_d\) The published fixing of the index on date \(d\)
\(P(t)\) The discount factor on the discount curve of the leg's currency
\(\hat P(t)\) The discount factor on the projection curve of the index
\(\sigma\) The direction of a leg: \(-1\) when paid, \(+1\) when received
\(K\) A fixed rate (IRS) or FRA rate
\(X_{c \to r}\) The FX rate converting currency \(c\) into currency \(r\) (Section 8.5)

10.2 Term-rate indices

A term-rate index fixes, on each business day \(f\) of its fixing calendar \(C\), the rate of a deposit of tenor \(\tau\) in its currency. The deposit starts on the value date, \(L\) business days of \(C\) after the fixing date, and accrues with the index's day count. In the other direction, the rate for a deposit starting on date \(s\) is fixed \(L\) business days before \(s\):

\[f = s \ominus_C L, \qquad s' = f \oplus_C L ,\]
(10.1)

where \(\oplus_C\) and \(\ominus_C\) add and subtract business days of \(C\) (Chapter 2). When \(s\) is itself a business day, \(s' = s\). With \(L = 0\), the fixing date is \(s\) moved back to a business day (the Preceding convention). For example, with \(L = 2\) on the Federal Reserve calendar, the rate for a deposit starting on Monday 19-Oct-2026 is fixed on Thursday 15-Oct-2026, and a fixing on 15-Oct-2026 has value date 19-Oct-2026.

The maturity of the deposit is one tenor after its value date, adjusted:

\[e' = \mathrm{AddTenor}_C^{c, E}(s', \tau) ,\]
(10.2)

with \(\mathrm{AddTenor}\) as in Equation (4.11): \(s' + \tau\) adds calendar months or years (Chapter 1), adjusted with the index's business-day convention \(c\), by default Modified Following (Chapter 2), except that, when the index's end-of-month rule \(E\) is set and \(s'\) is the last business day of its month, \(e'\) is the last business day of its month. The end-of-month rule applies only to tenors in months or years. The index also names its currency and a day count of two dates.

In plain words: the rate is agreed two business days before the money moves, and the deposit ends one tenor later on a business day; a deposit that starts on the last business day of a month ends on the last business day of a month.

The library ships the SAIBOR indices in 1M, 3M, 6M and 12M (Section 10.8).

10.3 Term-rate leg

A term-rate leg has an index, a day count, a direction and a list of periods built from a schedule (Chapter 4) or written by hand. Each period \(i\) is fixed in advance: its fixing date and deposit come from its start date by Equation (10.1) and Equation (10.2), \(f_i = s_i \ominus_C L\), \(s'_i = f_i \oplus_C L\), \(e'_i\) one tenor later. The period pays, on \(p_i\),

\[N_i \,\big(F_i + s^{\text{spr}}_i\big)\, \delta_i ,\]
(10.3)

with \(\delta_i\) the leg's day count fraction over the adjusted period \([s_i, e_i)\).

Every period pays the rate of the index's own tenor, stubs included: a two-month stub on a 3M index pays the 3M rate over two months of accrual. Interpolating between two tenors for stubs (2006 Definitions, Section 8.3) is not modelled yet. A period's deposit and the period itself have the same dates for a regular period whose start is a business day of \(C\); they differ for a stub, for a period longer than the tenor, and when the period is adjusted on another calendar.

10.4 Pricing a term-rate leg

Cash flows paid on or before the valuation date are settled and left out. The rate of an unsettled period is

\[F_i = \begin{cases} R_{f_i} & f_i < v \quad\text{(required)}, \\ R_{f_i} & f_i = v \text{ and published}, \\ \dfrac{1}{\delta'_i}\left(\dfrac{\hat P(s'_i)}{\hat P(e'_i)} - 1\right) & \text{otherwise}. \end{cases}\]
(10.4)

A fixing dated before the valuation date must be given; a missing one is an error. A fixing on the valuation date is used when the caller passes it (a valuation after the fixing time) and projected otherwise. A projected rate is the simple forward rate of the deposit on the index's projection curve: the rate that turns one unit invested on \(s'_i\) into \(\hat P(s'_i)/\hat P(e'_i)\) on \(e'_i\). It is computed over the deposit's dates, not the period's, because the deposit is what fixes.

The leg's value before its direction, discounted on the curve of its currency, is

\[V = \sum_{i:\, p_i > v} N_i \big(F_i + s^{\text{spr}}_i\big)\, \delta_i\, P(p_i) .\]
(10.5)

The value to the holder is \(\sigma V\). For single-curve pricing \(\hat P = P\). A leg fixed in arrears fixes each period on the fixing date of its end and adds a timing adjustment to each projected rate (Section 22.2). For a vanilla swap the fixing timing is a term of the trade (IrsSwap, in advance unless stated), not of its convention: the market standard fixes in advance, and an in-arrears swap priced on a market context reads the index's caplet volatilities for its adjustments. Its par rate and par spread (Equation (10.9), Equation (10.10)) then include the adjustments too.

Edge cases. A deposit maturing before the valuation date can only belong to a period whose fixing is in the past, so Equation (10.4) never projects over negative times. A spread of zero leaves the index rate alone. With \(\hat P = P\), no spread, and deposits equal to the periods, a leg with its notional repaid at the end prices to par: the telescoping of Equation (10.5).

10.5 Swaps of any legs

A swap is a list of legs, each fixed, term-rate (Section 10.3) or overnight compounded (Section 6.6), each with its own direction and currency: fixed-term, fixed-overnight, term-term, term-overnight, overnight-overnight and fixed-fixed swaps, in one currency or two, are all swaps. Each leg is valued in its own currency, on the discount curve of that currency and the projection curve and fixings of its index (fixed legs by Equation (6.2), term-rate legs by Equation (10.5), overnight legs by Equation (6.5)), and the swap's value is one amount per currency:

\[V_c = \sum_{\text{legs } \ell \text{ in } c} \sigma_\ell V_\ell .\]
(10.6)

Different currencies are never added. Converting to a reporting currency \(r\) is a separate, final step at the market's FX rates (Section 8.6):

\[V^{(r)} = \sum_c X_{c \to r}\, V_c .\]
(10.7)

A leg may also exchange its notional at its start and end (Section 12.4); its value then includes the exchanges. Mark-to-market FX resets of cross-currency swaps scale each period's notional (Section 12.7).

10.6 Interest rate swaps

An IRS exchanges a fixed leg for a term-rate leg in one currency. Its convention fixes the index; the spot lag; each leg's frequency and day count (the floating day count is the index's unless stated); the payment lag; the business-day convention; the date generation rule; and the calendar of the spot, accrual and payment dates (by default the index's fixing calendar, which always governs fixings). A swap traded on date \(T\) with tenor \(n\) starts on \(T \oplus \text{spot lag}\) and ends \(n\) after its start, and resolves into the two legs exactly as an OIS does (Section 6.5): the trade's signed notional gives the directions, a negative notional paying fixed, and each floating period takes the notional of the fixed period it starts in.

When the convention's end-of-month rule is set, a swap whose start is the last business day of its month ends on the last calendar day of the month \(n\) later (before adjustment), and a swap whose end (its start, for dates generated forward) is a month end, calendar or business, rolls on month ends (Chapter 4): every regular period of both legs ends on the last day of its month, adjusted with the business-day convention. Without the rule the periods keep the day of the month of the end date. The rule applies to tenors and frequencies in months or years only.

With \(\mathcal{A} = \sum_j N_j \alpha_j P(q_j)\) the annuity of the fixed leg (Equation (6.2)), \(V_{\text{fix}} = \sum_j N_j K_j \alpha_j P(q_j)\) its value and \(V_{\text{flt}}\) the floating leg's value by Equation (10.5), the value to the holder, the par rate and the par spread are

\[V = \sigma_{\text{fix}} V_{\text{fix}} + \sigma_{\text{flt}} V_{\text{flt}} ,\]
(10.8)
\[K^{\text{par}} = \frac{V_{\text{flt}}}{\mathcal{A}} ,\]
(10.9)
\[\Delta K = \frac{V_{\text{flt}} - V_{\text{fix}}}{\mathcal{A}} .\]
(10.10)

The par rate is the flat fixed rate that gives the swap a value of zero; the par spread is the amount added to every fixed rate that does. Both use the discount curve of the swap's currency and the projection curve of its index, which may differ (multi-curve). The SAR convention is in Section 10.8.

10.7 Forward rate agreements

An FRA settles, at the start of its period, the difference between the index rate fixed for the period and the FRA rate \(K\). Its convention fixes the index, the spot lag (by default the index's fixing lag), the day count (by default the index's), the business-day convention and the calendar. An "\(m \times (m + \tau)\)" FRA traded on \(T\), for example 3x6 on a 3M index, has

\[s = \mathrm{AddTenor}_C^{c, E}(T \oplus \text{spot lag},\, m), \qquad e = \mathrm{AddTenor}_C^{c, E}(s,\, \tau) ,\]
(10.11)

with \(\mathrm{AddTenor}\) as in Equation (4.11), the convention's business-day convention \(c\) and calendar \(C\), and the index's end-of-month rule \(E\). The period fixes by Equation (10.1) and settles on \(s\).

Under FRA Discounting (2006 Definitions, Section 8.4(b)), with the discount rate equal to the floating rate and the floating day count fraction, the amount the fixed-rate payer receives on \(s\) is

\[A = N \, \frac{(F - K)\, \delta}{1 + F \delta} ,\]
(10.12)

with \(F\) the index rate of the period by Equation (10.4) and \(\delta\) its accrual fraction. A negative \(A\) is paid. The FRA's value to the holder is the settlement amount discounted from \(s\), signed by the direction of the fixed rate (\(\sigma_{\text{fix}} = -1\) for the buyer, who pays fixed and holds a negative notional):

\[V = -\sigma_{\text{fix}}\, A\, P(s) , \qquad V = 0 \text{ once } s \le v ,\]
(10.13)

and the par FRA rate, which gives a value of zero, is the index rate itself:

\[K^{\text{par}} = F .\]
(10.14)

In plain words: the buyer of an FRA gains when the rate fixes above the FRA rate; the difference is paid at the start of the period, so it is discounted over the period at the fixed rate (the factor \(1 + F\delta\)).

10.8 SAIBOR and the SAR conventions

The library ships these definitions. All dates use the Riyadh bank calendar of Section 2.12 (weekend Friday and Saturday since 29-Jun-2013).

Definition Terms
SAR-SAIBOR-1M, -3M, -6M, -12M Saudi Arabian Interbank Offered Rate. Fixing lag \(L = 2\) business days on Riyadh, Act/360, maturity Modified Following with the end-of-month rule (Section 10.2). Published at 12:00 Riyadh time each business day.
SAR-SAIBOR-3M-IRS Spot lag 2. Fixed leg annual Act/360, floating leg quarterly Act/360 on 3M SAIBOR. Payment lag 0. Modified Following, dates generated backward with the end-of-month rule (Section 10.6). Fixings 2 business days before each period start.
SAR-SAIBOR-3M-FRA Spot lag 2, Act/360, start and end dates Modified Following with the end-of-month rule, as the index's deposit (Section 10.7).

The FX forward and basis swap conventions of the SAR curve, and the shipped SAR curve group, are in Section 12.6.

The fixing time matters only for which fixings exist on the valuation date. The library takes fixings as dated values, and the valuation date and the fixings are inputs, so the time is recorded here and not modelled: a SAIBOR fixing dated on the valuation date is used when it is supplied (Section 10.4).

In plain words: a SAR swap traded on a Wednesday starts on the Sunday (Thursday, then Sunday, since Friday and Saturday are the weekend). Each quarter's rate is fixed two Riyadh business days before the quarter starts, and both legs pay on the period end.

10.9 Projected cash flows

The value of a swap is a sum over its cash flows; listing those cash flows one by one shows the user what the value is made of. For each leg \(\ell\) of a swap and each unsettled period \(i\) (payment date \(p_i\) after the valuation date \(t\)), the library reports:

Column Definition
Notional \(N_i\) The period's notional, after any FX reset (Section 12.7)
Rate \(R_i\) The fixed rate \(K_i\); or the index rate, fixed or projected, plus the spread, \(F_i + s_i\) (Equation (10.5); for an overnight leg, the compounded rate \((\Phi_i - 1)/\delta_i + s_i\) of Section 6.6)
Accrual \(\delta_i\) The period's accrual fraction under the leg's day count
Kind What the row pays: interest, principal, a fee or a settlement amount (below)
Discount factor \(P(t, p_i)\) on the leg's discount curve
Amount \(A_i = \sigma_\ell N_i R_i \delta_i\)
Present value \(A_i\, P(t, p_i)\)

where \(\sigma_\ell\) is \(+1\) for a received leg and \(-1\) for a paid one, so received amounts are positive and paid amounts negative. A notional exchange (Section 12.4) is a row of its own: the amount of Equation (12.6) times \(\sigma_\ell\), with no rate or accrual. An amortisation exchange is listed on each period start where the stated notional changes; on a leg with FX resets it is listed on every period start, even when the reset notional happens to equal the previous one, because that row still carries the FX sensitivity of the reset. In words: each row is what the holder expects to receive (positive) or pay (negative) on that date, in the leg's own currency, and what that is worth today.

The rows come from the same period values as the leg's price, and each amount is the period's present value divided by its discount factor, so

\[\sum_{\text{rows of leg } \ell} A_i\, P(t, p_i) = \sigma_\ell V_\ell\]
(10.15)

holds exactly: the cash flows add up to the leg's value of Equation (10.6). Flows paid on or before the valuation date are settled and are not listed, as they are not in the value. Amounts of different currencies are never added.

The same row describes the other products' cash flows. An FRA has one row: the settlement amount of Equation (10.12) on its payment date, with the index rate \(F\), fixed or projected, as its rate. An FX forward has two principal rows, one per currency, the amounts delivered (Section 12.2). In every case the rows' present values are the product's value, leg by leg.

Each row has a kind, so that a treasury report can group payables:

Kind Rows
Interest Interest, coupon or profit for a period, including a loan's floorlets (Section 21.4), which add to its interest
Principal A notional exchange, a currency delivered, a drawdown, a repayment or a redemption
Fee A fee (upfront, commitment, agency); no product lists one yet
Settlement An amount that settles a trade at once: an FRA's settlement amount, a bond trade's settlement amount (Section 19.4)

A row without a period (principal, a bond's settlement) has its payment date as start and end, no rate and no accrual. The kinds are product-neutral: labels such as coupon, profit or hedge interest are for front ends to derive from the product and the position.

Settled rows. A treasury report also needs the flows already paid. They are a second list, asked for with a window start \(f\): every row whose payment date \(p_i\) satisfies \(f \le p_i \le t\), with status settled (Section 20.2.1). A settled row has the columns above, with the amount actually paid: the rate is the fixed rate, or the published fixing plus the spread; an overnight period compounds its published daily fixings over the whole period with the leg's lookback and shift (Section 6.6); the notional of a resetting leg is the stated notional converted at the published FX fixing (Section 12.7). Its present value is 0 by definition and its discount factor is not defined (a front end shows a dash for both): a paid flow is not part of the value, so Equation (10.15) holds for the unsettled list unchanged. Settled amounts read fixings only, never a curve; a fixing missing from the market throws, naming the index and the date.

Example: a 3-year USD swap paying 4.1% annually on 2,000,000 under Act/360 has a first fixed period of 365 days, \(\delta = 365/360 = 1.013889\); its row shows an amount of \(-2{,}000{,}000 \times 0.041 \times 1.013889 = -83{,}138.89\) and, discounted at \(P = 0.9608\), a present value of about \(-79{,}880\).

10.10 Worked examples

Index dates. On the Federal Reserve calendar with \(L = 2\) and \(\tau\) = 3M: the deposit starting 19-Oct-2026 is fixed on 15-Oct-2026 and matures on 19-Jan-2027 (92 days, \(\delta' = 92/360\)). Friday 27-Feb-2026 is February's last business day, so with the end-of-month rule its 3M deposit matures on Friday 29-May-2026, May's last business day; without the rule it matures on 27-May-2026.

Stub. A period from 19-Jan-2027 to 19-Mar-2027 (59 days) fixes on 14-Jan-2027 (18-Jan-2027 is a holiday) and pays the 3M rate of the deposit 19-Jan-2027 to 19-Apr-2027 (90 days) over \(\delta = 59/360\).

Forward rate. On a curve with a flat 4% continuously compounded zero rate and valuation date 14-Oct-2026, the deposit 19-Oct-2026 to 19-Jan-2027 has \(\hat P(s')/\hat P(e') = e^{0.04 \times 92/365}\) and

\[F = \frac{e^{0.04 \times 92/365} - 1}{92/360} = 3.96516\% .\]

FRA amount. Fixed at \(F = 5\%\) against \(K = 4\%\) on 1,000,000 for 90 days (\(\delta = 0.25\)), the buyer receives

\[1{,}000{,}000 \times \frac{(5\% - 4\%) \times 0.25}{1 + 5\% \times 0.25} = 2{,}469.14 ,\]

on the settlement date; the seller pays it.

SAR dates. Traded Wednesday 14-Oct-2026, a 5Y SAR-SAIBOR-3M-IRS starts on Sunday 18-Oct-2026. Its first SAIBOR period runs to Monday 18-Jan-2027 and fixes on Wednesday 14-Oct-2026; its last ends on Sunday 19-Oct-2031, since 18-Oct-2031 is a Saturday. Traded Tuesday 28-Apr-2026, it starts on Thursday 30-Apr-2026, April's last business day, so the end-of-month rule applies: the periods end on 30-Jul-2026 (31-Jul is a Friday), 29-Oct-2026 (30 and 31 Oct are the weekend) and 31-Jan-2027. Without the rule, January 2028 would end on 30-Jan-2028 instead of 31-Jan-2028. A 3x6 SAR-SAIBOR-3M-FRA traded on 14-Oct-2026 runs from 18-Jan-2027 to 18-Apr-2027 and fixes on 14-Jan-2027.

Two currencies. A swap receiving a USD fixed leg and paying a EUR term-rate leg is valued as \(\{(V_{\text{USD}}, \text{USD}), (V_{\text{EUR}}, \text{EUR})\}\); in USD at EUR/USD 1.08 it is worth \(V_{\text{USD}} + 1.08\, V_{\text{EUR}}\) (Equation (10.7)).

Reconnecting Connection paused Could not reconnect Could not resume Session expired

The connection to the server was lost. Trying to restore it. Next attempt in 0s. The connection was paused. It will resume on its own. The server did not answer. Your work is still here. The paused session could not be resumed. The server could not restore this session. Reloading will start a new one.

An unhandled error has occurred. Reload 🗙