Interest Rate Swaps: Pricing Swaps and the Yield Curve
Discounting and Forecasting rates, a common fallacy
The formula for getting the present value (PV) of an interest rate swap (IRS) where we are receiving the floating leg and paying the fixed leg is as follows:
- N is the notional
- r is the floating rate
- Δ is the day count fraction
- df is the discount factor
- f is the fixed rate or swap rate
Therefore from this formula we can say that for a par swap, i.e. one whose PV is zero (or more specifically a swap where the fixed rate is on market ) the fixed rate can be calculated using this formula:
In a lot of old financial literature you might come across a short cut for the floating leg component of this equation. The floating leg part of this equation is the numerator of the fraction on the right hand side:
However if we are discounting (df) and forecasting (r) with the same curve this breaks down to:
So how does this work? Let’s look at a single floating rate payment (let us presume we are paying in pound sterling):
|Ti – Δ|
|T||ri * Δ|
Let’s now alter this so we now pay £1 and receive £1 at time T. The new cashflows table will be this:
|Ti – Δ|
|T||(ri * Δ) + 1||1|
As you can see, we have not changed the present value of this swap as we are simply paying £1 and receiving £1 and 1 – 1 = 0. However if you now look at the term we are receiving it is 1 + rΔ. This is simply what you would receive if you invested £1 at time T - Δ ( future value = £1 * (1 + r.Δ)). So now let’s write out the table again:
|Ti – Δ||1|
So what about the other flows if the swap pays 4 floating payments? Well here’s the new table which shows this scenario:
Notice how the flows in the middle cancel each other out so we are left with 1 – dfT. (dfT) is the last flow discounted back to today.
This formula assumes that the swap starts today. You would need to adjust it to df0 – dfT if your swap is forward starting where df0 is the discount factor from the starting date of the swap.
However since the widening of basis between lending terms this is not a valid assumption anymore. The rate at which you would discount these flows is not derived from the same yield curve as the one used to forecast the floating rates so therefore you are left with the old equation. Even today however when bootstrapping a yield curve it is easier to make this assumption so you will find a lot of financial libraries with this built into the bootstrapping algorithm.
It is not as disastrous as you might think so long as you are aware of the fact that the rate you are putting in contains this pricing defect. So long as the swap rate you calculate from the curve contains the same assumption as the bootstrapping you will reprice the correct market rate. For example if your curve is built with a 2yr swap rate from the market of 5% and you want to calculate the swap rate from it, if you make sure you use the same discount and forecasting curve it will guarantee you get back 5%. The internal consistency here is what matters as the rate itself has the discounting basis built into it so you are at least repricing the market.
When you are pricing off-market swaps however this accuracy becomes more of an issue and you should build two different curves with this factor adjusted either through a more complex bootstrapping algorithm or an adjustment to the market rates you enter.
Below is a video where we show a simple curve bootstrap using this assumption in the ThinxLab, our embedded risk and derivatives pricing engine. We also show the effect of mis-pricing when this assumption no longer holds true. We are trying to bootstrap the end of the curve using a 2 year swap that pays fixed annually and float quarterly (notice how the floating frequency doesn’t matter when we use this assumption). Therefore the fixed leg consists of paying two cash flow:
- c is the fixed rate of the swap
- df is the discount factor
- Δ1 and ΔT are each of the flow’s day count fractions at flows 1 and 2(T is last flow = flow 2) respectively.
Now as this is annual we can make the daycount fractions equal to 1 so they disappear. This swap starts today so df0 is equal to 1. Finally this is a par swap so we know FixedLeg and FloatLeg are equal as the PV is 0. With these simplifications and assumptions we can derive the following equation for the calculating df2: