Swaps

A casual breakdown of how interest rate swaps work — exchanging fixed and floating payments on a notional principal, and why anyone would actually do that.

OK, time to wrangle swaps into a single post.

First up, the textbook definition:

An over-the-counter derivative contract between two companies that exchange cash flows at agreed-upon future dates.

Compare this with a forward. A forward is a contract for cash flows at one point in the future. A swap is a contract for cash flows at multiple points in the future — periodically.

So… think of a swap as a sequence of forward-style cash-flow exchanges, rather than one literally continuous forward.

Here in Chapter 7 we’re covering interest rate swaps and currency swaps. There are tons of other swap flavors out there, but those show up waaay later, around Chapter 22.

Let’s build it up step by step, starting with interest rate swaps.

Interest rate swaps — the basic idea

The plain-vanilla interest rate swap studied here exchanges fixed-rate and floating-rate payments. By entering one, a company can change the rate exposure of its liabilities.

Example: a company enters a swap and agrees to pay a fixed rate for several years. During that same period, it receives floating-rate payments on the same principal.

You’re probably thinking, “wait — couldn’t it be the other way around?” or “the counterparty would be doing the exact opposite, right?” Yep. All of that is right.

The floating benchmark in these 2016 examples is LIBOR. That is historical: all LIBOR settings ended in September 2024 . New contracts specify other benchmarks, such as SOFR for USD, with conventions that can differ from the six-month LIBOR example below.

Let’s get concrete.

Say Company A and Company B enter a 3-year swap.

  • A pays B at an annual rate of 5% on a notional principal of $100 million (semi-annually compounded).
  • B pays A the 6-month LIBOR on that same $100 million.

Interest gets exchanged every 6 months.

After the first 6 months, A hands B $2.5 million. (Quick check: half of 5% of $100M is $2.5M. ✓)

And let’s say the 6-month LIBOR at the time the contract was signed was 4.2%. Then B pays $100M × (0.042 / 2) = $2.1 million.

Now it’s 6 months after signing — the first payment date. Say the 6-month LIBOR on that day was 4.8%.

Another 6 months later, exchange time again:

  • A still pays B $2.5 million, no questions asked.
  • B pays based on the 6-month LIBOR from 6 months ago — that 4.8%. So B pays $100M × (0.048 / 2) = $2.4 million.

And it just keeps going like this allll the way to 3 years!!!!

Quick correction to what I said above: in real interest rate swaps, the two parties don’t actually hand each other the full payments back and forth. Only the difference in interest gets exchanged.

Also notice — the $100M principal doesn’t actually move at all. It’s just there to compute interest off of. That’s why it’s called the notional principal!

But why the heck would anyone do this?

Did A and B just collectively lose their minds and decide to wiggle money back and forth for fun? Obviously not.

Suppose Company C chose fixed-rate borrowing at 5.2%, while Company D chose floating at LIBOR + 0.1%, because those were their more attractive funding opportunities.

Equation from the original notes

But now, both of them are looking at their books and realizing… C doesn’t actually want to pay fixed. D doesn’t actually want to pay floating.

Then C and D meet.

Equation from the original notes

Ahh — now it makes sense what I said earlier: an interest rate swap changes the nature of your liabilities from fixed to floating, or floating to fixed.

But hold on — another question pops up. Why didn’t they just do what they wanted from the start?? Why didn’t C just borrow at floating itself, and D borrow at fixed itself???

I mean, is corporate funding really that easy? “I changed my mind, give me a different rate!” — does that fly???

It probably doesn’t fly. So what’s going on.

The point is relative borrowing cost, not literally being barred from the other market. Each company can borrow where it has the better cost advantage, then swap into its desired rate exposure.

In other words: C had a comparative advantage in raising fixed, D had a comparative advantage in raising floating.

Why does that comparative advantage exist? Because lenders charge different rates based on a borrower’s credit.

Let’s make this sharper. Say Company E has good credit, so it gets quoted:

  • Fixed: 4.0%
  • Floating: 6-month LIBOR − 0.1%

And Company F has weaker credit, so it gets quoted:

  • Fixed: 5.2%
  • Floating: 6-month LIBOR + 0.6%

Equation from the original notes

Now let’s look at it from F’s perspective.

F wants to compete with E. So F thinks:

“On fixed, we’re behind by 1.2%. On floating, we’re only behind by 0.7%!! Let’s pick floating to close the gap!! go go go go!!!”

Meanwhile, Company E is thinking… (OK we have to make everyone a little extra evil to make the example work, bear with me)

“Ugh, F is so persistent, why can’t we shake them?? Do we have to crush them ourselves???

OK fine. We want floating, but on floating we’re only 0.7% better. Let’s instead pick fixed, where we’re 1.2% better — widen the gap and bury them.

Yeah! Let’s pull the ladder up behind us!!! Big-corp-ladder-kicking power!!!!”

So the situation lands here:

Equation from the original notes

Up to this point!?!?

But — plot twist — the two of them meet anyway, right???

If they do a “fair” swap (we’ll get to what fair means in a sec):

Equation from the original notes

…it works out like this.

Look closely. The floating-rate funding that E was so desperately after? E ends up at LIBOR − 0.35% — cheaper than the LIBOR − 0.1% it was quoted directly.

And F? F gets the fixed rate it wanted — and effectively borrows at 4.95%, cheaper than its original 5.2%.

Whoa. So the reason swaps even need to exist is comparative advantage.

(There are people who push back on the “swaps exist because of comparative advantage” view — so don’t take this as gospel. It’s not an axiom.)

I called the swap above a “fair” swap. Why is it fair? Look at the result: both E and F improved by exactly 0.25% vs. their original quotes.

That comes from:

  • Fixed-rate spread between them: 1.2%
  • Floating-rate spread between them: 0.7%
  • Difference: 0.5%

And 0.5% / 2 = 0.25% — they each get half. That’s what “fair” means here:

(Fixed-market spread − Floating-market spread) / 2 = each side’s improvement

OK but how do you even find the right counterparty?

Here’s the thing — how is some company supposed to find another company that’s exactly its mirror image?

Turns out unlike the A↔B, C↔D, E↔F examples I drew, swaps don’t usually happen as direct two-party deals.

Each company actually swaps with a financial institution in the middle. And honestly, the company on one side often doesn’t even know whether there’s a real counterparty on the other side or not lol.

In this textbook illustration, assume a dealer spread of 2–4 bp (0.02%–0.04%); actual spreads vary.

So if we drop a financial institution into the middle of the E/F deal:

Equation from the original notes

It comes out like this!!! Even with the bank in the middle, both E and F still come out ahead (just slightly trimmed), and the bank pockets a margin too!!

But it’s not like the bank is just shaving free profit. Two reasons:

  1. Neither side has to go hunting for a counterparty.
  2. The dealer also faces replacement and hedging costs if one client defaults. Its separate contract with the other client still has to be honored, but that client remains exposed to the dealer itself defaulting.

So those 2–4 bp leaking to the bank? That’s the price of those services.

Now from the bank’s perspective — is it actually easy to pinpoint two perfectly-matched companies and broker the deal? Nope. So banks build their own menus of swap quotes and operate off of those.

Companies look at the menu and go, “OK, the swaps available to us are limited to what’s on this menu. Now how do we use it to our benefit?” — and that’s up to each company.

When financial institutions construct these structures in the market, that’s called acting as a market maker. The market makers build tables like this:

Equation from the original notes

…and they’ll enter swaps even before the matching counterparty exists.

The midpoint of bid and offer is the quoted mid-swap rate. A par swap’s fixed rate makes its initial value zero under the valuation assumptions; the arithmetic midpoint is a quotation convention.

That’s the basic concept of swaps. Now that we’ve got the feel — time to dig deeper. (T_T) I found this part genuinely exhausting…

OIS (overnight index swaps)

Banks lend each other money overnight on an unsecured basis — funds flow from banks with surplus to banks with shortfall. (In Korea back in the day, this was called the call market, and the rate was the call rate.)

In USD, the effective federal funds rate is one overnight unsecured benchmark. It is not the generic name for every overnight rate: other currencies have their own benchmarks, and USD SOFR measures secured Treasury-repo funding instead.

There’s a whole field that branches off the FFR — monetary economics. I’ve got a section on monetary economics elsewhere on the blog, might be worth a look.

Anyway, why am I bringing OIS up here? Because we need to talk about overnight index swaps.

So what’s an OIS? It exchanges a fixed rate (the OIS rate) for a payment based on overnight interest accumulated over the coupon period. For the compounded version, that floating return is $\prod_i(1+r_i\delta_i)-1$, with each overnight rate $r_i$ applied for its day-count fraction $\delta_i$ — not an unweighted geometric mean of the quoted rates.

OIS can have short or long maturities, including many years. A long OIS is one contract with its specified payment schedule; rolling a succession of short OIS contracts is a different strategy.

To repeat: fixed interest is exchanged for the accumulated overnight floating payment, using the contract’s actual accrual and payment conventions.

The “OIS rate” is the fixed rate.

From here on out — both in what follows and on practice problems — you need to know OIS. (T_T)(T_T)(T_T)(T_T)

Because what’s coming next is… swap valuation.

Valuing a swap

Anyone paying attention already knows: a swap can be viewed as either an exchange of two bonds, or as a series of FRAs.

When we do bond valuation, we discount future cash flows back to present value using the risk-free rate. The older single-curve examples use a LIBOR-based curve for both floating-rate projection and discounting; that is a modeling convention, not an automatic consequence of the coupon label.

Historically, LIBOR was published at specified short tenors. Longer LIBOR/swap curves had to be bootstrapped from market instruments; there was not a published LIBOR fixing for every maturity.

My old notes associated the London fixing with 11 a.m. each business day. Keep that as the historical time convention I was referring to, not a current publication schedule — and distinguish the fixing time from the later publication time.

But here’s the thing: LIBOR has a risk premium baked into it.

For a collateralized swap, the collateral remuneration convention matters for discounting. Collateral reduces credit exposure; it does not make every possible risk disappear.

LIBOR was unsecured bank funding, so calling it risk-free for all uncollateralized transactions is not right either. Those valuations can require credit and funding adjustments. For swaps collateralized at an overnight benchmark, the matching overnight/OIS curve commonly provides the discount curve.

(These are2016 study notes, so keep the historical single-curve examples separate from the collateral-aware valuation convention. (T_T))

Back then I felt the textbook wasn’t giving this much weight: ‘Is it still a controversial issue? Either way, if we’re studying derivatives, shouldn’t we at least know what the debate is about… T_T’ That’s my learning reaction, rather than an assertion that every part remains unsettled today.

Valuation of interest rate swaps

Earlier I sketched out swaps in a hand-wavy “look, both sides win!” kind of way. Now let’s actually figure out: given fixed rate = x, floating rate = y, how are x and y determined?

The principle is dead simple:

At inception, the value of the swap is set to zero.

So… how do we calculate the value of a swap?

Suppose we have a swap A → B (fixed) / B → A (floating), maturity 3 years with semiannual payments, so six cash-flow exchanges total. Entered on March 5. The cash flow timeline looks like:

Equation from the original notes

Timeline checkpoint: a three-year swap with semiannual payments has six exchanges, as the six rows show. Under the six-month-LIBOR convention used in this text, read the first two floating labels as six-month LIBOR, rather than the pictured three-month LIBOR.

Some of those cash flows were locked in at contract time, others weren’t. Step one of swap valuation: treat each of those six individual cash-flow exchanges as its own forward-style interest payment.

Recall from FRAs: the textbook single-curve model uses forward rates as pricing inputs, not forecasts guaranteed to realize.

So: project each not-yet-fixed LIBOR payment from the appropriate forward curve, discount the resulting cash flows with the valuation’s discount curve, and sum them. Already fixed coupons use their known rates.

(→ The next topic will be: what’s the “appropriate rate”? LIBOR? OIS?)

Ex. 7.2

A financial institution recently entered a swap to pay 3% per year semi-annually on a $100M notional and receive LIBOR.

Time to maturity: 1.25 years. Payments at 0.25, 0.75, and 1.25 years from today.

Continuously-compounded risk-free rates for 3, 9, and 15 months: 2.8%, 3.2%, 3.4%.

Forward LIBOR rates for the 3-to-9 month and 9-to-15 month periods are implied to be 3.4% and 3.7% (continuous compounding).

Equation from the original notes

The 3.4% forward rate is continuously compounded, so converting it to semi-annual compounding:

Equation from the original notes

And converting 3.7% continuous to semi-annual compounding gives 3.734%.

Also: the LIBOR to be exchanged 0.25 years from now would have been determined at contract time. Say it was 2.9%.

Now all the cash-flow inputs for this valuation are pinned down.

Equation from the original notes

Equation from the original notes

Swap as bond exchange (LIBOR/swap zero rate)

When LIBOR rates and swap rates are used as the discount rates, a swap can be viewed as an exchange between a floating-rate bond and a fixed-rate bond. At inception, the values of those two bonds must be equal.

And a floating-rate bond — because it pays LIBOR and is discounted at LIBOR — has the property that its value equals its face value (at issue).

Which means: floating-rate bond = fixed-rate bond = face value = notional principal.

What does that mean? If a 2-year swap rate of 5% (semi-annual compounding) is being quoted, that’s equivalent to saying: a bond with face value 100 paying 5% (semi-annual compounded) is being sold at par.

(Try it on the practice problems!) → The zero-coupon rate derived this way is called the LIBOR/swap zero rate.

In this single-curve setup, the par swap fixed rate is a kind of par yield (coupon rate); bid/offer quotes surround a quoted midpoint.

Determining zero-coupon rates for OIS discounting

The previous section was about deriving the LIBOR/swap zero yield. This time it’s the OIS zero yield — which honestly, even I’m meeting for the first time.

  • A single-payment OIS quote can imply a discount factor once its day-count and compounding conventions are matched.
  • With matching overnight discounting and no payment lag, a simple fixed quote $K$ over year fraction $\tau$ gives $P(0,T)=1/(1+K\tau)$. Convert that discount factor to the desired zero-rate convention.
  • A multi-payment par OIS rate is not the zero rate at the same maturity; bootstrap the curve from its full cash-flow schedule.

Long-dated OIS quotes also exist. If a required maturity is illiquid or unavailable, constructing the curve needs an interpolation or extrapolation choice.

A constant OIS–LIBOR spread is one historical extrapolation assumption, not a pricing identity or a requirement for a 13-year OIS curve.

Forward rates when LIBOR discounting is used

For the forward LIBOR rate, we can use this relationship:

Equation from the original notes

Same relationship as before. To get a feel, let’s work an example.

Say the 6, 12, 18, 24-month LIBOR/swap zero rates (continuous compounding) are 4%, 4.5%, 4.8%, 4.953%.

The 6-month rate converts to 4.040% semi-annual compounding.

The forward rate between 6 and 12 months: 5% continuous = 5.063% semi-annual.

By the same principle, the forward rate between 12 and 18 months: 5.4% continuous = 5.474% semi-annual.

And so on, you just keep converting. Same principle as the zero coupons earlier. When you do PV, you use these converted rates.

You’ll feel it through the practice problems. (T_T)

Another problem

Suppose the 2-year swap rate is being quoted at 5%.

That means floating LIBOR and fixed 5% are exchanged at 6, 12, 18, 24 months. And since it’s currently being quoted, the swap value should be 0, right?

We’ve already derived all the forward rates, so let’s compute it. (Notional = 100.)

Calculation checkpoint: in the first row, the floating rate should be $0.0404$, not $0.404$, and its present value is about $-0.4704$, not $-0.04704$. In the18-month row the discount exponent is $-0.048\times(3/2)$, not $-0.048\times(1/2)$. With the unrounded rates, the first three present values sum to about $-0.2199$, as used below.

Equation from the original notes

Sum of all the red (present values) = −0.2199.

For the swap value to equal 0, the cash flow at 24 months must contribute +0.2199. So:

Equation from the original notes

And converting to continuous compounding gives 5.412%.

How clean is that?!

About the blue: the discount rate used here is the LIBOR/swap zero rate. For a given set of projected cash flows, OIS discounting changes the discount factors. If we are also calibrating a projection curve to quoted par swaps, that curve must be fitted consistently with the chosen discount curve; we cannot assume every calibrated forward stays unchanged.

Onward!

Swap as bond exchange — valuation later in the contract

A swap, we said, can be viewed as an exchange of a fixed-rate bond and a floating-rate bond, and at inception the swap value is 0. So at inception:

Equation from the original notes

Cool. Then not at inception, the difference between the two bond values is the swap value, right?

Now,

Equation from the original notes

is computable just like any bond — same as before.

But

Equation from the original notes

is the tricky one. We can’t pin down the future floating payments exactly.

But we can use a basic principle: a floating-rate bond at issuance is worth par. Why? Because it pays LIBOR and gets discounted at LIBOR.

Using that, we can derive the theoretical price.

Let’s feel it with an example.

Ex. 7.6

A financial institution is paying 3% semi-annually on a $100M notional and receiving LIBOR.

Next exchange: 0.25 years from now (so 3 months have passed since contract). The floating cash flow at that exchange will be $1.45 million.

Subsequent cash flows occur at 0.75 and 1.25 years. The LIBOR/swap risk-free rates at 0.25, 0.75, 1.25 years are 2.8%, 3.2%, 3.4%.

First, the fixed-rate bond. Cash flows at 0.25 / 0.75 / 1.25 years are 1.5 / 1.5 / 101.50. Discount each at the corresponding LIBOR/swap zero rate:

Equation from the original notes

Now the floating-rate bond is the problem. We only know the $1.45M cash flow at 0.25 years; we don’t know the ones after.

But — think about that exact moment, 0.25 years from now, just before the known floating coupon is paid. Immediately after payment and reset, the floating bond is at par in this single-curve model:

Equation from the original notes

Just before payment, the value is par 100 plus the coupon 1.45, or 101.45. Discount that back 3 months to today:

$$101.45 \cdot e^{-0.028 \times (3/12)} = 100.7423$$

So the value to this fixed-rate payer = (floating bond value) − (fixed bond value). Done.

Currency swaps

OK enough interest rate swaps. Currency swaps.

A currency swap, as the name says, is an exchange of currencies — naturally between currencies of two different countries.

We will start with a fixed–fixed currency swap: each leg pays fixed interest in its own currency. Floating-leg currency swaps come later in this post.

Let’s draw some swap diagrams without overthinking it.

Considering the exchange rate at contract time, currency swaps start with the principals chosen so that the two principals are equal at inception (in value).

For the diagrams below, just assume everything’s been set so the principals match up. Focus on the mechanism.

Example: IBM and BP enter a 5-year currency swap on Feb 1, 2013. IBM pays BP a fixed 5% in pounds, and receives from BP a fixed 6% in dollars annually. Interest paid once per year. Principals: $15M and £10M.

IBM’s cash flows over 5 years:

Equation from the original notes

You can also reframe this as: IBM uses its $15M to effectively “borrow” £10M at a 5% interest rate.

I said interest rate swaps exist because of comparative advantage. Do currency swaps too? Let’s check.

Suppose GE and QA both want to borrow at a fixed rate for 5 years. Their offered rates:

US$ AU$
GE 5.0% 7.6%
QA 7.0% 8.0%

From GE’s perspective: to crush QA, US$ is the move (2.0% better vs. just 0.4% better in AU$).

From QA’s perspective: AU$ closes the gap more than US$ would.

(This example takes the quoted borrowing costs as given and leaves taxes out.)

The class also mentioned taxes as one possible reason for GE having a relative advantage in USD and QA in AUD. We’re not modeling that tax explanation here; the calculation simply starts with the quoted costs.

But — what if GE actually wants AU$ and QA actually wants US$??

Then they should meet up.

Say the current exchange rate is 0.75 US$/AU$. Say GE wants AU$20M and QA wants US$15M. (Conveniently: 20M × 0.75 = 15M. Matches.)

Each borrows where they have a comparative advantage. So GE borrows US$15M and QA borrows AU$20M.

Equation from the original notes

That’s the starting state.

Step one of the swap: at contract inception, the two exchange those principals.

Equation from the original notes

And one year on, at what rate do they swap interest?

Same logic as interest rate swaps:

(US$ rate spread) − (AU$ rate spread) = 2.0% − 0.4% = 1.6%

Each side should benefit by half: 0.8%.

So GE ends up paying 6.8% (vs. its original AU$ quote of 7.6%) — 0.8% better. QA ends up paying 6.2% (vs. its original US$ quote of 7.0%) — 0.8% better.

Equation from the original notes

But — as we IRS-trained folks know — direct two-party swaps without a bank are tough. Let’s drop a financial institution in the middle, and shave both sides by 0.1%.

Equation from the original notes

Quick math (assume FX stays at 0.75 US$/AU$):

  • 6.9% on AU$20M = AU$1.38M → US$1.035M
  • 6.3% on US$15M = US$0.945M → AU$1.26M

Now how does the bank route this to GE and QA so that:

  • GE can offset its existing 5.0% interest, and
  • QA can offset its existing 8.0% interest?

It sends 5% and 8% respectively.

Equation from the original notes

How does this work?

The bank gains 1.3% on US$ — that’s US$195,000. The bank loses 1.1% on AU$ — that’s AU$220,000.

Can US$195,000 cover AU$220,000? At 0.75 US$/AU$, US$195,000 = AU$260,000. So the bank nets AU$40,000 profit.

(This was actually predictable. 0.1% on US$15M = US$15K, 0.1% on AU$20M = AU$20K. Convert and add: AU$40K. ✓)

But — would the FX rate really stay constant for a whole year?

Probably not. In this diagram the bank has an unmatched USD receipt and AUD payment, so changing FX affects its net income. That is exchange rate risk in this particular intermediation structure; its allocation depends on the contracts and hedges, rather than automatically falling on every swap dealer.

Why? Because the bank’s in the best position to hedge it. They’ve got the tools, they’ll handle it themselves — so let’s just hurry up and swap, gogogogogogo.

Valuing a currency swap

Quick look at how to compute the value of a currency swap.

It can be viewed as an exchange of two bonds, just like before. So the swap value = the difference between the bond values being exchanged.

For a swap where I pay foreign currency and receive my own currency: I’m earning my own country’s interest, so I “hold” my own country’s bond. And paying interest in foreign currency is like having “sold” a foreign-currency-denominated bond. So:

Equation from the original notes

Hmm wait — if I write it like this:

Equation from the original notes

and

Equation from the original notes

the units of these two are different, no?

To match units, we need to multiply by an exchange rate — but which one? Spot, of course, since we’re computing the difference in value right now.

So:

Equation from the original notes

Done!

For the opposite swap:

Equation from the original notes

Looks reasonable, right?

Ex. 7.7

The current risk-free zero curves of Japan and the US are both flat.

Japanese rate: 4% per year (continuous compounding). US rate: 9%.

A financial institution has entered a currency swap where it receives 5% in yen and pays 8% in dollars.

Principals: $10M and ¥1.2B. Maturity: 3 years. Current exchange rate: 110 yen/$.

Drawing it out:

Equation from the original notes

OK so we want to compute, from the US side, the value of the bond bought and the bond sold.

The US holds a bond receiving 8% interest on $10M, with $10M face at maturity:

Equation from the original notes

The bond it sold pays 5% on ¥1.2B with ¥1.2B face:

Equation from the original notes

Expressing that in dollars: $11,186,900.

Swap value from the US perspective:

Equation from the original notes

Like that! (From the financial institution’s side, the sign just flips.)

Other currency swaps

Two widely-used variants:

  1. Floating–fixed currency swap
  2. Floating–floating currency swap

For #1: same direction of cash flows as a fixed–fixed currency swap, just one side is now floating instead of fixed.

Say: principals £7M and $10M. Pound side pays pound LIBOR. Dollar side pays fixed 3% semi-annual.

Looks like this:

Equation from the original notes

To value this swap, decompose it. It can be analyzed as:

Fixed–fixed currency swap + fixed–floating interest rate swap

Choose 4% as the auxiliary pound fixed rate in this decomposition; it is not a compounding conversion of the 3% dollar rate:

Equation from the original notes

That’s how you read it.

For #2 — I won’t draw the diagram, but you can decompose it as one fixed–fixed currency swap + two fixed–floating interest rate swaps.

The currency swaps with floating legs will get more love through the practice problems, so don’t sweat it.


Heads-up. The figures here are the original notes, slips and all. A few things to watch for:

  • In the yen/dollar swap figure, the yen principal reads 1×10⁸ + 2000×10⁴ yen, which is only 120 million. The problem’s principal is ¥1.2 billion (1,200 million yen), and that is what the bond calculation right after it uses (the 6000×10⁴ yen coupons).

Questions or corrections?

Did a step lose you, or does a number look off? Email me or use the contact page. Include the note title and the step or figure you mean.

Feedback goes to me privately by email; it is not posted as a public comment.