### Interest Rate Swap Tutorial, Part 5 of 5, building your swap curve

This is the fifth in a series of articles that will go from the basics about interest rate swaps, to how to value them and how to build a zero curve.

- Introduction to Interest Rate Swaps
- Fixed legs
- Floating legs
- Swap Curve building Part I
**Swap Curve building Part II**

## Swap Curve

In the final article in this series, we will continue to build out our discount factor curve using longer dated **par swap rates**. **Par Swap rates** are quoted rates that reflect the fixed coupon for a swap that would have a zero value at inception.

Let look at our zero curve that we have built so far using **LIBOR** rates.

We are now going to build out this curve out to 30 years using par swap rates. These rates are as of Nov 10, 2011, and reflect USD par swap rates for semi-annual LIBOR swaps. The daycount convention is 30/360 ISDA.

Also keep in mind that these rates reflect the settlement conventions, so the one year rate is for an effective date of Nov 14, 2011 and termination of Nov 14, 2012. If we were to price a one year swap from the curve we have built so far, we can derive the 6mo discount factor, but we are currently missing the 1year factor. Since we know the swap should be worth par if we receive the principal at maturity, then the formula for a one year swap is:

Notice that the T's would be adjusted for holidays & weekends and are calculated using the appropriate discount factor. We can rearrange our formula to solve for df(1year).

Using our example data:

We calculate the missing discount factor as: 0.99422634. But, this for a swap which settles on November 14th, and we are building our curve as of November 10th. So we need to multiple this by the discount factor for November 14th to present value the swap to November 10th. So the discount factor we use in our curve for Nov 14, 2012 is 0.9942107.

We continue by calculating discount factors for all the cashflow dates for our par swap rates. The next step is to calculate the discount factor for May 14, 2013. Our first step is to calculate a par swap rate for this date as it is not an input into our curve. We linear interpolate a rate between our 1 year and 2 year rates.

1.5 year par swap rate = 1 year + (2 year - 1 year)/365 x days

= .58% + (.60%-.58%)/365 x 181 = 0.589918%

We now can solve for the missing discount factor, continuing our bootstrapping through the curve.

You can download ResolutionPro for a free trial to use our curve building functions and for interest rate swap pricing.

## Comments

I was able to follow the steps till the Part-4.

But I got confused at the Part-5. How we got the discount factor

0.9942107forNov 14, 2012?Also, how can I calculate the 8 year par swap rate?

Please help me to understand this.

Please find the calculation below:

[1 – (0.58%*0.996689*0.5)] / [1 + (0.58%*0.5)]

0.99710960219 / 1.0029 = 0.994226345787217

This value multiplied by the DF for Nov 14 2011 (0.999984) will give you the Zero rate DF that needs to be used in our curve

So that means 0.994226 * 0.999984 = 0.99421

If this cannot be interpolated, then you'll need to make an assumption about the rate between the last known DF and the settle of that future.

From there on, it's an exercise first calculating the DF between settle & expiry for each future, then multiplying by the DF for the settle date.

Now, you may also want to do a convexity adjustment prior to this but that would be a separate topic. Hull's "Options Futures and other Derivatives" has a good description of how to do a convexity adjustment.

Also, thanks for helping out Vimal above.

LEXLAW Solicitors & Barristers

Price = (coupon*t*df1) + (coupon*t*df2) + df2

Thank you very much for this article. Could you detail your calculation for May-13 DF?

For May 13 the same formula is used but the numerator is extended one more period. It becomes

1 – [ (R(1.5y)*df(6mo)*T1) + (R(1.5y) * df(1y) * T2) ] / [ (R(1.5y) * T3) + 1 ]

In this case all the T’s are 0.5, representing a half year.

R(1.5y) is 0.589918% as interpolated above.

df(1y) is .99422634 as calculated above (Note that this is the df back to Nov 14, 2011, not the df which gets us back to Nov 10)

The result is 0.991204. Multiply this value by the Nov 14 df of .99998433 to get 0.991188 as shown in the table as the 14-May-2013 discount factor taking us back to Nov 10, 2011.

Here is the generic formula for the rest of the df’s. It uses the summation symbol which I will try to write out in plain text. I hope it is clear enough:

df(n) = ( 1 – [ “summation where i=1 to n of” ( R(n) * df(i) * T(i) ) ] ) / ( 1 + R(n) * T(n) )

t

ex. Until 21-nov all Dfs are fine but my 28.nov.11 DF = 0,99986593; and from there on it all goes different, of course. Just as so df(1y) is 0,99424461 and valuate to Nov 10 (PV) I get 0,994240713

My 7Y DF is 0,5339 and not 0,8995

This was a very useful article and I was able to exactly replicate the zero curve which the trading system threw out in excel.

The only part which I am unable to figure out is the pricing of 1$ notional 1 year IRS mentioned in your comments.

Is it possible to explain more on this or give some reference article.

Your help on this is much appreciated.

Thanks & Regards,

Aravind

Thanks for this article. This is the most informative article I found on build a zero curve.

Thanks,

Aravind

Thankyou for a the practical step by step guide.... but still have problem with the last part

This one is ok

1 – [ (R(1.y)*df(6mo)*T1) / [ (R(1.y) * T2) + 1 ] =0,994112

And so is this one

1 – [ (R(1.5y)*df(6mo)*T1) + (R(1.5y) * df(1y) * T2) ] / [ (R(1.5y) * T3) + 1 ] =0,991189

but when I put in the figures for this one i get a diffrent result

1 – [(R(2y)*df(6mo)*T1)+ (R(2y)*df(1mo)*T2) + (R(2y) * df(1,5y) * T3) ] / [ (R(2y) * T4) + 1 ] =0,9999662313

(1-(0,6%*0,996689*0,5)+(0,6%*0,994211*0,5)+(0,6%*0,991188))/((0,6%*0,5)+1)==0,9999662313 but according to your figure it should be 0,988074

Your help on this is much appreciated.

Thanks & Regards,

Egil

a) You were missing the 0.5 for the 1.5 year term

Value as of 14-Nov-11=

(1-((0.6%*0.996689*0.5)+(0.6%*0.994211*0.5)+(0.6%*0.991188*0.5)))/((0.6%*0.5)+1)= 0.988089467597209

b) Now to get the PV as of 10-Nov-11, you have to multiply 0.988089467597209 by 0.999984 and you will get 0.988074

Thanks for taking the time to post this article. Very useful to see your workings and explanation on conventions.

I have one question which it would be great if you could help me with.

When building the swap curve you calculate the swap maturity discount factor and then you say that as the swap settles on the 14th that you need to discount it back to the 10th.

My confusion is that when calculating the swap maturity discount factor you are already using discount factors that have already been adjusted back to the 10th.

e.g. for the 1yr swap you are using the 6m discount factor of 0.99668895 which was the discount factor for 6m to 14th of 0.9967045624, discounted back to 10th.

Should this not therefore provide a discount factor for the swap maturity that is already back to the 10th?

Many thanks in advance for you to take the time to review and reply to my question/confusion.

Joe

p.s. here are my workings in case it helps:

Cash Curve:

Date,DeltaDays,ZCoupon,DF

2011-11-11,1,0.00141000,0.99999608

2011-11-14,4,0.00141000,0.99998433

2011-11-21,11,0.00172820,0.99994720

2011-11-28,18,0.00193892,0.99990306

2011-12-14,34,0.00236298,0.99977688

2012-01-16,67,0.00332826,0.99938096

2012-02-14,96,0.00443840,0.99881783

2012-03-14,125,0.00510784,0.99822958

2012-04-16,158,0.00574743,0.99748386

2012-05-14,186,0.00642978,0.99668895

2012-06-14,217,0.00697559,0.99581287

2012-07-16,249,0.00744164,0.99487922

2012-08-14,278,0.00798415,0.99387224

2012-09-14,309,0.00847745,0.99277609

2012-10-15,340,0.00903932,0.99153513

CASH 6M

Start Date: 2011-11-14

End Date: 2012-05-14

Annualized Rate %: 0.006540

Days in Period: 182

Direct discount factor to 2011-11-14: 0.99670456248158173027

Direct discount factor to 2011-11-10: 0.99668894764220021318

SWAP1Y

Start Date: 2011-11-14

End Date: 2012-11-14

Coupon Frequency: SEMIANNUAL

Market Rate %: 0.0058

Cashflows: [2012-05-14, 2012-11-14]

Sum of Z0 ... Zn-1 Factors: 0.99668894764220021318

Coupon per period %: 0.00290

SWAP1Y

Start Date: 2011-11-14

End Date: 2012-11-14

Annualized Rate: 0.0058

Days to maturity: 370

Calculated discount factor: 0.99422634564945420220 (without additional discounting)

Calculated discount factor: 0.99421076963497551278 (using discount factor 14th as suggested in your article)

Once again, thanks for the great article.

I really have big issue to figure out the right formula for the numerator.

For instance,

why do we have to calculate this:

1 – [(R(2y)*df(6mo)*T1)+ (R(2y)*df(1mo)*T2) + (R(2y) * df(1,5y) * T3) ] / [ (R(2y) * T4) + 1 ]

for the 2Y DF ? I know it's related to the formula for 2year swap but I don't get why we should use df(1mo) and df (1,5y).

Huge thanks in advance

In all forum, article , swap rate are always obvious one but I dont get it.

We use swap rate 2y and more in most of the swap curve. Yes they are quoted (you can use them directly, I get that). But how traders come with these number? How can they replicate (or hedge)? Thanks to explain swap rate.

WW

Hi, I'm getting exactly to the right same numbers until this date,

14-May-2015, where I start to get slight decimal variations, for example for this particular date I get 0.9710242 instead of 0.971046 which makes a significant difference to the overall curve, has anybody get to this right number 0.971046 ?