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… couldn’t you basically call a swap a continuous forward? Yeah, kinda.

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

At its core, an interest rate swap is just an exchange of a fixed rate and a floating rate. By entering one, a company can change the nature 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 rate used in this swap is LIBOR. (LIBOR is basically the benchmark rate in international finance.)

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 another 6 months pass. 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.

Here’s the actual reason. Suppose Company C, for whatever reason, had to raise funds at a fixed rate — and ended up borrowing at fixed 5.2%. Company D had to go floating, and ended up at LIBOR + 0.1%.

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.

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.

When I said “C had no choice but to go fixed” and “D had no choice but to go floating” — that’s exactly the point. Even though floating would’ve been better for C, fixed was the only door open. Same deal for D in reverse.

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%

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:

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):

…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 exchange, the financial institution skims a margin of about 2–4 bp (0.02%–0.04%).

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

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. More importantly: if one side defaults, the financial institution eats all the damage. The bank then has to scramble to re-enter the broken position so cash keeps flowing to the side that didn’t default.

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:

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

The midpoint of the bid fixed rate and the offer fixed rate is what we call the swap rate.

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.)

The rate applied to this overnight borrowing is the overnight rate — and that overnight rate is, in fact, the federal funds rate we know from the central bank!! (The Fed has the right to nudge the FFR around.)

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? Typically a short-maturity swap (1 to 3 months) where a fixed rate (the OIS rate) is exchanged for the geometric mean of the overnight rate.

Maturity is usually 1–3 months, but it’s common to roll the OIS continuously in 3-month chunks, running it for 5 to 10 years total.

To repeat: what gets exchanged is the geometric mean of the overnight rate (refreshing every 3 months) vs. the fixed rate (OIS rate).

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. For floating-rate bonds that pay LIBOR, we discount at LIBOR — natural.

LIBOR, by the way, is announced every morning at 11am London time, for major currencies and basically every standard maturity.

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

Now, using a rate-with-risk-premium for collateralized transactions doesn’t really make sense, right? Collateralized = should be (basically) risk-free.

So the modern view is: LIBOR is appropriate as a “risk-free” rate only for uncollateralized transactions. For collateralized ones, the OIS rate (set off the overnight rate we just talked about) is more appropriate than LIBOR.

(The book doesn’t seem to weigh on this super hard — maybe because it’s still an open/contested area? But as people studying derivatives, we should at least know the controversy exists. I think so anyway. (T_T))

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, so 5 cash-flow exchanges total. Entered on March 5. The cash flow timeline looks like:

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

Recall from FRAs: the value of a forward rate agreement could be derived under the assumption “the forward rate is realized.”

So: compute the forward rate for each LIBOR in the swap’s cash flows, assume those forward rates are what gets realized, then discount everything back to present value at the “appropriate rate” and sum it up. That’s your swap value.

(→ 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 expected to be 3.4% and 3.7% (continuous compounding).

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

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 flows are pinned down.

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.

And the swap rate (midpoint of bid and offer) is itself a kind of par yield (coupon rate).

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.

  • 1-month OIS rate = 1-month zero-coupon rate.
  • 3-month OIS rate = 3-month zero-coupon rate.
  • n-month OIS rate = n-month zero-coupon rate.

But OIS rates have shorter maturities than LIBOR rates, so for something like a 13-year horizon, you may not have an OIS rate quoted at all.

In that case, derive the 13-year OIS rate under the assumption that the OIS–LIBOR spread is constant.

Forward rates when LIBOR discounting is used

For the forward LIBOR rate, we use:

$$\text{[relationship formula]}$$

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.)

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:

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. If instead we discount with OIS, you just swap OIS in for the discount rate — everything else stays the same.

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:

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

Now,

is computable just like any bond — same as before.

But

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:

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, right after the floating coupon is paid:

At that moment, the floating-rate bond is worth 101.45. Discount that back 3 months to today:

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

So the swap value = (fixed bond value) − (floating 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.

A currency swap can basically be viewed as a fixed–fixed rate exchange (unlike an interest rate swap). Why? Because each country has its own risk-free rate for its own currency.

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:

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$
GE5.0%7.6%
QA7.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.

(Also, from a tax perspective, GE has a comparative advantage in USD and QA in AU$ — but let’s not worry about taxes.)

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.

That’s the starting state.

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

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.

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%.

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.

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. Most likely one side ends up over- or undervalued. That’s exchange rate risk (currency risk), and in currency swaps the financial institution generally bears it.

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:

Hmm wait — if I write it like this:

and

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:

Done!

For the opposite swap:

Looks reasonable, right?

Ex. 7.7

The risk-free term structures of Japan and the US are both flat (i.e., assume future rates are constant).

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:

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:

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

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

Swap value from the US perspective:

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:

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

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

If the pound rate equivalent to 3% semi-annual is 4%:

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.


Originally written in Korean on my Naver blog (2016-11). Translated to English for gdpark.blog.