Quant Sandbox
DerivativesPortfolio & RiskFixed IncomeCorporate FinanceStochastic ModelsGuide
Guide
Derivatives pricing
01Forwards, calls and puts02Combining positions03Arbitrage and the forward price04Put–call parity05The one-step binomial model06Risk-neutral probabilities07Multi-step trees and backward induction08American options and early exercise09Delta and hedging10Geometric Brownian motion11The Black–Scholes formula12The Greeks: gamma, vega, theta and rho13Implied volatility and the volatility smile14Stochastic volatility and the Heston model15Static replication: Breeden–Litzenberger and Carr–Madan16Exotic options: barriers, Asians and digitals
Portfolio & risk
01Returns and volatility02Diversification and correlation03The efficient frontier and the capital market line04Risk aversion and the optimal complete portfolio05CAPM, beta and the security market line06Performance measures: Sharpe, Treynor, Jensen and information ratio07Factor models and systematic risk08Value at Risk and expected shortfall
Fixed income
01Bond prices and yields02Duration and convexity03Immunization and duration matching04Spot rates, forward rates and the yield curve05Bond futures and the cheapest-to-deliver06Interest rate swaps07Callable bonds and negative convexity08Credit risk: default probabilities and credit spreads
Corporate finance
01Interest, compounding and discounting02Annuities, perpetuities and loan amortization03Net present value and internal rate of return04The weighted average cost of capital05Capital structure and the Modigliani–Miller theorems06Discounted cash flow valuation07Relative valuation with multiples08Real options: the value of flexibility
Stochastic models
01Random walks and Brownian motion02Probability spaces, σ-algebras and random variables03Filtrations, adapted processes and stopping times04Conditional expectation and martingales05Properties of Brownian motion06The reflection principle and first passage times07The Brownian bridge08The Itô integral09Itô's lemma10Kolmogorov equations and the Feynman–Kac formula11Change of measure and Girsanov's theorem12Monte Carlo option pricing13Simulating SDEs: the Euler–Maruyama scheme14Mean reversion: Ornstein–Uhlenbeck and Vasicek15Jumps and the Merton jump-diffusion model
Knowledge graph

© 2026 Quant Sandbox · A study aid for quantitative finance

Privacy & dataNo cookies

This site does not use cookies and asks for no personal data. It keeps a few small settings in your browser's local storage — your chosen theme and language, the sidebar layout, and your progress and answers in the Guides — so it remembers them on your next visit. This data never leaves your device; clearing your browser storage removes it. Inputs you change can also be captured in the page URL, so you can share or bookmark a specific setup. The site uses Vercel Web Analytics, a privacy-friendly, cookieless service that records only anonymous, aggregated usage (such as page views) without identifying you or tracking you across other sites.

Guide/Fixed income

Interest rate swaps

Lesson 6 of 8 · 1 min read

An interest rate swap is the most traded interest rate derivative. Two parties exchange interest payments on the same amount: one pays a fixed rate, the other a floating rate that is reset every period. This lesson shows that a swap is a pair of bonds in disguise, prices it with the discount factors of "Spot rates, forward rates and the yield curve", and derives the par swap rate. It also uses bond pricing from "Bond prices and yields".

A plain-vanilla swap

A plain-vanilla interest rate swap is fixed by four things:

  • a notional NNN, the amount on which interest is calculated. It is never exchanged;
  • a fixed rate sss, agreed today for the whole life of the swap;
  • a floating rate LiL_iLi​ for each period, a short-term reference rate observed at the start of the period (the reset date) and paid at its end;
  • payment dates t1<t2<⋯<tnt_1 < t_2 < \dots < t_nt1​<t2​<⋯<tn​, with accrual fractions τi=ti−ti−1\tau_i = t_i - t_{i-1}τi​=ti​−ti−1​ in years (t0=0t_0 = 0t0​=0).

On each date tit_iti​ the fixed leg pays Ns τiN s\,\tau_iNsτi​ and the floating leg pays NLi τiN L_i\,\tau_iNLi​τi​. In practice only the difference changes hands. The party that pays fixed and receives floating holds a payer swap; the other side holds a receiver swap. Throughout this lesson payments are annual, so τi=1\tau_i = 1τi​=1, but the formulas keep τi\tau_iτi​ so they work for any frequency.

The swap as two bonds

Add a fictitious exchange of the notional NNN at maturity tnt_ntn​ on both legs. The two exchanges cancel, so the swap is unchanged. Now each leg is a bond:

  • the fixed leg is a fixed-rate bond with face value NNN and coupon s τis\,\tau_isτi​ per period;
  • the floating leg is a floating-rate note (FRN), a bond whose coupon is the floating rate of each period.

A receiver swap is therefore long the fixed-rate bond and short the FRN, and a payer swap is the reverse. Its value is the difference of two bond prices:

Vreceiver=Bfix−Bfloat,Vpayer=Bfloat−Bfix.V_{\text{receiver}} = B_{\text{fix}} - B_{\text{float}}, \qquad V_{\text{payer}} = B_{\text{float}} - B_{\text{fix}}.Vreceiver​=Bfix​−Bfloat​,Vpayer​=Bfloat​−Bfix​.

The floating-rate note on a reset date

Assume the floating rate LiL_iLi​ is the market rate for lending from ti−1t_{i-1}ti−1​ to tit_iti​, the same rate the discount factors are built from. Then an FRN is worth exactly its face value on every reset date. Work backwards from the end:

  1. At the last reset date tn−1t_{n-1}tn−1​ the note will pay N(1+Lnτn)N(1 + L_n\tau_n)N(1+Ln​τn​) at tnt_ntn​. Discounting one period at the same rate LnL_nLn​ gives N(1+Lnτn)/(1+Lnτn)=NN(1 + L_n\tau_n)/(1 + L_n\tau_n) = NN(1+Ln​τn​)/(1+Ln​τn​)=N.
  2. At tn−2t_{n-2}tn−2​ the note pays the coupon NLn−1τn−1N L_{n-1}\tau_{n-1}NLn−1​τn−1​ at tn−1t_{n-1}tn−1​ and is then worth NNN. Together that is N(1+Ln−1τn−1)N(1 + L_{n-1}\tau_{n-1})N(1+Ln−1​τn−1​), which again discounts to NNN.
  3. Repeating the argument back to today gives Bfloat=NB_{\text{float}} = NBfloat​=N at t0=0t_0 = 0t0​=0.

The intuition: the coupon always pays the current market rate, so the note never trades away from par at a reset. Between reset dates its value moves only a little, because the next coupon is already fixed.

The fixed leg and the par swap rate

Write P(0,t)P(0,t)P(0,t) for the discount factor, the price today of 1 paid at ttt. The fixed-rate bond is a set of known cash flows, so

Bfix=Ns∑i=1nτi P(0,ti)+N P(0,tn).B_{\text{fix}} = N s \sum_{i=1}^{n} \tau_i\,P(0,t_i) + N\,P(0,t_n).Bfix​=Nsi=1∑n​τi​P(0,ti​)+NP(0,tn​).

The sum A=∑iτiP(0,ti)A = \sum_i \tau_i P(0,t_i)A=∑i​τi​P(0,ti​) is the annuity factor: the value today of receiving 1 per year on the payment dates. A new swap is agreed at the fixed rate that makes it worth zero to both sides, Bfix=Bfloat=NB_{\text{fix}} = B_{\text{float}} = NBfix​=Bfloat​=N. Dividing by NNN and solving for that rate gives the par swap rate SnS_nSn​ of an nnn-period swap:

Sn=1−P(0,tn)∑i=1nτi P(0,ti)=1−P(0,tn)A.S_n = \frac{1 - P(0,t_n)}{\sum_{i=1}^{n} \tau_i\,P(0,t_i)} = \frac{1 - P(0,t_n)}{A}.Sn​=∑i=1n​τi​P(0,ti​)1−P(0,tn​)​=A1−P(0,tn​)​.

The par swap rate is the coupon of a bond priced at par: Sn=(1−P(0,tn))/AS_n = (1 - P(0,t_n))/ASn​=(1−P(0,tn​))/A, where A=∑iτiP(0,ti)A = \sum_i \tau_i P(0,t_i)A=∑i​τi​P(0,ti​) is the annuity factor.

A three-year example

Take annual payments and the discount factors P(0,1)=0.9589P(0,1) = 0.9589P(0,1)=0.9589, P(0,2)=0.9160P(0,2) = 0.9160P(0,2)=0.9160 and P(0,3)=0.8730P(0,3) = 0.8730P(0,3)=0.8730. They come from an upward-sloping curve with annually compounded zero rates of about 4.28%, 4.49% and 4.63%, via P(0,t)=(1+r(t))−tP(0,t) = (1 + r(t))^{-t}P(0,t)=(1+r(t))−t; this is the default curve of the figure below. The annuity factor is A=0.9589+0.9160+0.8730=2.7479A = 0.9589 + 0.9160 + 0.8730 = 2.7479A=0.9589+0.9160+0.8730=2.7479, and

S3=1−0.87302.7479=0.12702.7479≈4.62%.S_3 = \frac{1 - 0.8730}{2.7479} = \frac{0.1270}{2.7479} \approx 4.62\%.S3​=2.74791−0.8730​=2.74790.1270​≈4.62%.

Check: a bond paying 4.62 per year on 100 for three years is worth 4.62⋅2.7479+100⋅0.8730≈100.04.62 \cdot 2.7479 + 100 \cdot 0.8730 \approx 100.04.62⋅2.7479+100⋅0.8730≈100.0, so it trades at par, as it should.

The one-year forward rates implied by these discount factors are fi=P(0,ti−1)/P(0,ti)−1f_i = P(0,t_{i-1})/P(0,t_i) - 1fi​=P(0,ti−1​)/P(0,ti​)−1: about 4.28%, 4.69% and 4.92%. The par swap rate lies between them. It is their average weighted by the discount factors, Sn=∑iτiP(0,ti) fi/AS_n = \sum_i \tau_i P(0,t_i)\,f_i / ASn​=∑i​τi​P(0,ti​)fi​/A, which follows from 1−P(0,tn)=∑i(P(0,ti−1)−P(0,ti))1 - P(0,t_n) = \sum_i \big(P(0,t_{i-1}) - P(0,t_i)\big)1−P(0,tn​)=∑i​(P(0,ti−1​)−P(0,ti​)).

The value of an existing swap

After a swap is agreed, rates move and its value is no longer zero. Suppose right after the trade above the whole curve shifts up by half a percentage point, and the discount factors become 0.95430.95430.9543, 0.90730.90730.9073 and 0.86060.86060.8606. The new annuity factor is A′=2.7222A' = 2.7222A′=2.7222, and the new par rate is S3′=0.1394/2.7222≈5.12%S_3' = 0.1394/2.7222 \approx 5.12\%S3′​=0.1394/2.7222≈5.12%.

Consider the payer swap with notional N=10,000,000N = 10{,}000{,}000N=10,000,000 that pays the contracted rate s=S3≈4.62%s = S_3 \approx 4.62\%s=S3​≈4.62%. The floating leg is still worth NNN; the fixed leg is now worth less. Its value is

Vpayer=N[(1−P(0,tn))−s A′]=N (Sn′−s) A′≈10,000,000×0.00499×2.7222≈135,900.V_{\text{payer}} = N\big[(1 - P(0,t_n)) - s\,A'\big] = N\,(S_n' - s)\,A' \approx 10{,}000{,}000 \times 0.00499 \times 2.7222 \approx 135{,}900.Vpayer​=N[(1−P(0,tn​))−sA′]=N(Sn′​−s)A′≈10,000,000×0.00499×2.7222≈135,900.

The payer gains because it locked in paying 4.62% when the market rate for the same swap is now 5.12%. The second form is worth remembering: an existing swap is worth the difference between the current and the contracted swap rate, paid on the annuity.

The same formula gives the swap's sensitivity. A change of one basis point (0.01%) in the swap rate changes the value by about NA×0.0001N A \times 0.0001NA×0.0001. This is the swap's DV01, here 10,000,000×2.7222×0.0001≈2,72210{,}000{,}000 \times 2.7222 \times 0.0001 \approx 2{,}72210,000,000×2.7222×0.0001≈2,722. It plays the role that duration played in "Duration and convexity".

The figure lays out this swap's cash flows on a timeline. Each year the payer receives the floating payment, an upward arrow of length NfiN f_iNfi​ (its expected value, from the forward rate), and pays the fixed payment NsN sNs, a downward arrow. The solid part of each arrow is its present value and the faded rest is the discount. Hover over, focus or tap a payment to see its amount, its discount factor P(0,ti)P(0,t_i)P(0,ti​) and the multiplication that gives its present value. On today's curve the two legs are worth the same, so the swap is worth 0. Then switch the curve to +50 bp and note that only the floating arrows grow, because the fixed rate was agreed at 4.62%; the value to the payer becomes about 135,800, the number computed above. The small gap to 135,900 comes from rounding the swap rates.

Cash flows of a three-year payer swapOpen in Yield Curve →
Curve
  • Floating (received)
  • Fixed (paid)
  • Solid part: present value, faded part: the discount

Hover, focus or tap a payment to see how it is discounted.

PV of fixed leg
1,270,187
PV of floating leg
1,270,187
Value to the payer
0
DV01
2,748

Now let the curve fall instead: the whole zero curve moves down by half a percentage point, and the discount factors become 0.96350.96350.9635, 0.92480.92480.9248 and 0.88560.88560.8856.

Worked example

The same payer swap after a 50 bp fall

  1. New annuity factor.

    A′=∑i=13P′(0,ti)\displaystyle A' = \sum_{i=1}^{3} P'(0,t_i)A′=i=1∑3​P′(0,ti​)=2.7739
  2. New three-year par swap rate.

    S3′=1−P′(0,t3)A′\displaystyle S_3' = \frac{1 - P'(0,t_3)}{A'}S3′​=A′1−P′(0,t3​)​=4.124%
  3. Value to the payer, who still pays s=4.62%s = 4.62\%s=4.62% (more precisely 4.622%) on N=10,000,000N = 10{,}000{,}000N=10,000,000.

    Vpayer=N (S3′−s) A′\displaystyle V_{\text{payer}} = N\,(S_3' - s)\,A'Vpayer​=N(S3′​−s)A′=-138,100
  4. DV01 on the new curve.

    N A′×0.0001\displaystyle N\,A' \times 0.0001NA′×0.0001=2,774

The loss on a fall is a little larger than the gain on a rise of the same size, because the annuity factor is larger when rates are lower.

Uses of swaps

  • Changing the type of debt. A firm that issued a fixed-rate bond and enters a receiver swap receives fixed and pays floating, so in total it pays a floating rate. A payer swap turns floating-rate debt into fixed.
  • Hedging interest rate risk. A bank whose assets are long fixed-rate loans can pay fixed on a swap so that a rise in rates no longer hurts it.
  • Expressing a view on rates. A payer swap gains when rates rise and a receiver swap gains when they fall, without buying or selling any bonds.

Par swap rates and the zero curve

The figure uses a smooth zero curve r(t)=level+slope (1−e−t/3)r(t) = \text{level} + \text{slope}\,(1 - e^{-t/3})r(t)=level+slope(1−e−t/3) with annual compounding, so P(0,t)=(1+r(t))−tP(0,t) = (1 + r(t))^{-t}P(0,t)=(1+r(t))−t, the same convention as the annual fixed payments. The level is the rate at the short end (r(0)=levelr(0) = \text{level}r(0)=level), and the slope is how far the long end lies above it: as ttt grows, r(t)r(t)r(t) approaches level + slope. For each maturity nnn from 1 to 10 years it draws the zero rate r(n)r(n)r(n) and the par swap rate SnS_nSn​. The readouts give the 5-year par swap rate, the 5-year annuity factor, the DV01 of a 5-year swap per 1,000,000 of notional and the 10-year par swap rate. At the defaults (level 4%, slope +1 percentage point) the 5-year swap rate is about 4.79% against a 5-year zero rate of 4.81%, the annuity factor is 4.3695, the DV01 about 437 and the 10-year swap rate 4.94% against a zero rate of 4.96%. Set the slope to zero: with a flat curve the par swap rate equals the zero rate at every maturity. With a rising curve the swap rate lies slightly below the zero rate of the same maturity, because it weights the early, lower forward rates more heavily; in the example above S3≈4.62%S_3 \approx 4.62\%S3​≈4.62% against a 3-year zero rate of 4.63%. Make the slope negative and the swap rate lies slightly above.

Zero curve and par swap ratesOpen in Yield Curve →
4.00%
00.08
1.00%
-0.020.03
Zero ratePar swap rate
5-year swap rate
4.792%
5-year annuity factor
4.3695
DV01, 5y, 1m notional
436.95
10-year swap rate
4.935%

Summary

  • A swap exchanges fixed payments NsτiN s\tau_iNsτi​ for floating payments NLiτiN L_i\tau_iNLi​τi​ on a notional that is never exchanged.
  • A receiver swap is a long fixed-rate bond and a short floating-rate note; the note is worth par on every reset date.
  • The par swap rate is Sn=(1−P(0,tn))/AS_n = (1 - P(0,t_n))/ASn​=(1−P(0,tn​))/A with the annuity factor A=∑iτiP(0,ti)A = \sum_i \tau_i P(0,t_i)A=∑i​τi​P(0,ti​).
  • An existing payer swap paying sss is worth N(Sn′−s)A′N(S_n' - s)A'N(Sn′​−s)A′, and its DV01 is about NA×0.0001N A \times 0.0001NA×0.0001.
Try itShape the curve whose discount factors price the swap in the Yield Curve lab →
2 questions on this lesson at the end of the series →
← PreviousBond futures and the cheapest-to-deliverNext →Callable bonds and negative convexity
Connections
Interest rate swaps
Open the full graph →
Labs for this lesson
Yield Curve