You are on page 1of 57

Giuseppe Nuti

Financial Computing Course (DB section)

Lecture 2 Bonds & Swaps

Curriculum

Bond Pricing
Bond Price Sensitivities
Yield Curves

Lecturer
Giuseppe Nuti (GN)

Deutsche Bank: Global Markets

Swaps Trading

giuseppe.nuti@db.com

Page 1 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

Bond Pricing
Bond Pricing
Lets say you have a 4 year 10% annual coupon bond, with a yield (yield to
maturity or yield to redemption) of 12% and a price of 93.93%.
The price is calculated by pricing each of the bonds cash flows using the yield
to maturity (YTM) as a discount rate:
We could picture it like this:Bond Cash Flows on a Time Scale
110%

10%

10%

10%

Each fixed coupon of 10% is discounted back to today by the yield to maturity
of 12% :
93.93% =

10
+ 10
+
(1.12)1
(1.12)2

10 +
(1.12)3

110
(1.12)4

All we are doing is observing the yield in the market and solving for the price.
Alternatively, we could work out the yield if we have the price from the market.
Bond calculators (eg Hewlett Packard bond calculators) work by iteratively
solving for the yield to maturity.
A bond trading at par would have a coupon the same as its yield. eg a four
year bond with a fixed coupon of 10% and a yield of 10% would be trading at
100%.
Note that bond prices go down as yields go up and bond prices go up as
yields go down.

Deutsche Bank: Global Markets

Page 2 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

This inverse relationship between bond prices and yields is fairly intuitive. For
our par bond above, if four year market yields fall to 9% investors will be
willing to pay more than par to buy the above market coupons of 10%. This
will force its price up until it, too, yields 9%. If yields rise to, say, 11% investors
will only be willing to pay less than par for the bond because its coupon is
below the market.
We can check the maths of bonds in a more complicated example by using
the following German government bond (or Bund) :
German Government Bund (in Euros)
Coupon:
Maturity:
Price (Clean):
Yield:

5.00%
04-Feb-06
102.2651%
4.43%

We are pricing this bond on 27/July 2001. It matures on 4 Feb 2006 and has a
coupon of 5%.
The table below shows that the bond price (the dirty price or invoice price) is
simply the sum of the present value of all of the coupons discounted at the
yield to maturity.
Pricing the German Euro Denominated Bund
Dates
AA Days Periods
04-Feb-01
27-Jul-01
04-Feb-02
192
0.5260
04-Feb-03
557
1.5260
04-Feb-04
922
2.5260
04-Feb-05
1288
3.5260
04-Feb-06
1653
4.5260

Cash Flow
5.00%
5.00%
5.00%
5.00%
105.00%

Cashflow PV
104.6350%
4.8873%
4.6800%
4.4814%
4.2913%
86.2950%

The market convention uses the yield to maturity as the discount rate, and
discounts each cash flow back over the number of periods as calculated using
the accrued interest day-count convention.
In the case of Bunds, the day-count convention is the Act/Act convention.
Appendix 1 contains more details of date conventions - it is recommended
that you read this at the end of the module.
The part of a year between the settlement date (27 July 2001) and the next
coupon (4 February 2002) is:

Deutsche Bank: Global Markets

Page 3 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

Day Count
192/365 (ie Actual days/Actual days) = 0.5260
The price of the first coupon can therefore be calculated in the following way:
PV of First Coupon
1

Coupon PV = 5%

1.0443%

0.5260

= 4.8873%

All of the other cash flow present values are calculated in the same manner.
Adding them up gives us the price of the bond.
Accrued interest is calculated from 04 February 2001 to 27 July 2001 (173
days) :
Accrued Interest
173
= 0.47397
365

Accrued = 5% x 0.47397 = 2.3699%


There is more detail on Accrued interest in Appendix 2. It is recommended
that you read it at the end of this module.
Notice that the quoted price of the bond (the clean price) is 102.2651% not
104.6350% (which is the dirty price or invoice price - ie the price actually paid
for the bond).
The dirty price is the sum of the present values of the cash flows in the bond.
The price quoted in the market, the so-called clean price or market price, is
in fact not the present value of anything. It is only an accountants
convention. The market price is the present value less accrued interest
according to the market convention.
Practitioners find it easier to quote the clean price because it abstracts from
the changing daily accrued interest.
Gilt Pricing Example
One of the confusing things about the bond markets is the conventions.
Bunds have annual coupon, whereas Gilts (UK government bonds) have
semi-annual coupons.

Deutsche Bank: Global Markets

Page 4 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

Gilt Data
Coupon:
Maturity:
Price (Clean):
Yield:

6.25%
07-Nov-10
108.563%
5.08%

The table below shows how the bond is priced. Notice that the coupon is half
of that stated (ie 0.5 x 6.25% = 3.125%), because the bond pays semiannually.

Deutsche Bank: Global Markets

Page 5 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

Gilt Dirty Price and Clean Price


Dates

A/A Days Periods

07-May-01
27-Jul-01
07-Nov-01
07-May-02
07-Nov-02
07-May-03
07-Nov-03
07-May-04
07-Nov-04
07-May-05
07-Nov-05
07-May-06
07-Nov-06
07-May-07
07-Nov-07
07-May-08
07-Nov-08
07-May-09
07-Nov-09
07-May-10
07-Nov-10

103
284
468
649
833
1015
1199
1380
1564
1745
1929
2110
2294
2476
2660
2841
3025
3206
3390

Dirty Price
Accrued
Market Price

0.5598
1.5598
2.5598
3.5598
4.5598
5.5598
6.5598
7.5598
8.5598
9.5598
10.5598
11.5598
12.5598
13.5598
14.5598
15.5598
16.5598
17.5598
18.5598

Coupon Cash Flow


Days
103
3.1250%
181
3.1250%
184
3.1250%
181
3.1250%
184
3.1250%
182
3.1250%
184
3.1250%
181
3.1250%
184
3.1250%
181
3.1250%
184
3.1250%
181
3.1250%
184
3.1250%
182
3.1250%
184
3.1250%
181
3.1250%
184
3.1250%
181
3.1250%
184 103.1250%

CF PV
109.9383%
3.0814%
3.0051%
2.9307%
2.8581%
2.7873%
2.7182%
2.6509%
2.5852%
2.5212%
2.4587%
2.3978%
2.3384%
2.2805%
2.2240%
2.1689%
2.1152%
2.0628%
2.0117%
64.7420%

109.9383%
1.3757%
108.5626%

The market convention for Gilts is Act/Act.


The accrued interest from 7 May 2001 to 27 July 2001 is:
Gilt Accrued Interest
81 6.25%

= 1.3757%
184
2

Deutsche Bank: Global Markets

Page 6 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

Bond Price Sensitivities


Bond Price Sensitivities
To start with, lets look at the sensitivity of bond prices to a change of one
basis point in the yield. The table below shows the prices of 1, 2, 5, 10 and 20
year maturity bonds at yields of 10% and 10.01%. It also shows the price
change for each of these bonds, given the one basis point change in yield.
You should be able to see that the longer the maturity, the greater is the
interest sensitivity (all other things equal). So, the 20 year bond changes price
by 8.5 basis points for every basis point change in yield, whereas the 2 year
bond changes by only 1.7 basis points.
Sensitivity of 10% Coupon Bond, Various Maturities
Maturity

Coupon

10%

10%

10%

10%

10%

10%

10%

10%

10%

Yield

10%

10.00%

10.01%

10.00%

10.01%

10.00%

10.01%

10.00%

10.01%

100%

100%

100%

100%

100%

100%

100%

100%

100%

-99.94% -100.00%

-99.91%

Par
Price

-100.00% -100.00%

Price Change

10

-99.98% -100.00% -99.96% -100.00%


-0.017%

-0.038%

10

20

-0.06%

20

-0.0851%

In the table below, the bonds have coupons of 4% (as opposed to 10%
above). Note that the bonds sensitivity is greater than for the high coupon
bonds in the table above (and the effect is more extreme the longer the
maturity).
Sensitivity of 4% Coupon Bond, Various Maturities
Maturity

Coupon

4%

4%

4%

4%

4%

4%

4%

4%

4%

Yield

4%

4.00%

4.01%

4.00%

4.01%

4.00%

4.01%

4.00%

4.01%

100%

100%

100%

100%

100%

100%

100%

100%

100%

-99.92% -100.00%

-99.86%

Par
Price

-100.00% -100.00%

Price Change

-99.98% -100.00%
-0.02%

10

-99.96% -100.00%
-0.045%

10

20

-0.08%

-0.14%

So, we have some general results :


Longer maturity bonds have greater price sensitivity than short maturity bonds
(for a given change in yield).
Low coupon bonds have greater price sensitivity than high coupon bonds (for
a given change in yield).
The problem we face is this : How can we combine the effects of coupons,
maturity and yield into a single measure of risk?

Deutsche Bank: Global Markets

20

Page 7 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

It is not easy, in the real world, simply to look at a number of different bonds
and guess at their interest sensitivity according to the size of their coupons
and their maturity.
So, we need to consider the bonds duration.
In simple terms, the longer the duration, the more responsive is a bonds price
to changes in yields.
We will analyse this in more detail by looking at Macauley duration.
Macauley Duration

PVCFt
t)
(
x

t
=
1
Macauley Duration =

(PVCFt )
t =1

Where :
PVCFt
t

= Present Value of Cash flow at time t


= Time at which cash flow occurs

In words, this can be explained as below :


Macauley =
Duration

The sum of the present values of the time-weighted cashflows


Bond Price

To explain the formula we have provided a simple example below.


Consider a four year 10% annual coupon bond, with a yield of 12% and a
price of 93.93%.
We could picture it like this:-

Deutsche Bank: Global Markets

Page 8 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

Cash Flows Over Time


110%

10%

10%

10%

Or, we could look at it in terms of the present value of the cash flows, each
discounted by the yield of 12% (ie 10/(1.12)1= 8.93, and 10/(1.12)2 = 7.97 and
so on :PV of Cash Flows on a Balance

69.91

8.93

7.97

7.12

The average life (the Macauley duration) is 3.5 years - ie where the fulcrum
balances out the cashflows.
In terms of the formula the answer would be :
Macauley Duration of Simple Bond
10
10
10
110

1 +
2 +
3 +
4
1
2
3
4
(1.12)
(1.12)
(1.12)
(1.12)
= 3 .5
93.93

Macauley =
Duration

The sum of the present values of the time-weighted cashflows


Bond Price

Deutsche Bank: Global Markets

Page 9 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

So, you now have a mental model of how Macauley duration works. The
higher is the Macauley duration, the higher is the interest sensitivity of the
bond.
Now, lets look at a slightly more complicated example. Heres a German
Bund.
Bund Macauley Duration
Dates

AA Days

04-Feb-01
27-Jul-01
04-Feb-02
04-Feb-03
04-Feb-04
04-Feb-05
04-Feb-06

192
557
922
1288
1653

Periods

Cash
Flow

Cashflow PV

PV t

104.6350%
4.8873% 0.025708
4.6800% 0.071417
4.4814% 0.113202
4.2913% 0.151313
86.2950% 3.905735

0.52603
5.00%
1.52603
5.00%
2.52603
5.00%
3.52603
5.00%
4.52603 105.00%

Sum(PV x t)

4.267

Macauley Duration = 4.267/104.6350% = 4.08


So, a reminder : duration is a function of several things:
Maturity (or tenor) of Instrument
Coupon Size
Market Yield
Modified Duration
Modified
Duration

Macauley duration
1 + Yield

We can calculate the Modified duration of the Bund we have been looking at
as follows:
Modified Duration of Bund

Modified Duration =

4.08
= 3.91
1.0443

The main point is that we can link modified duration to the PVBP (Present
Value of a Basis Point) of a bond.

Deutsche Bank: Global Markets

Page 10 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

PVBP and Duration


PVBP

Modified
Duration

Bond
Price

0.01%

eg for our four year 10% coupon bond, which had a Macauley duration of 3.5,
a yield of 12% and a price of 93.93% the Modified Duration is:Modified Duration of Simple Bond
Modified
duration

3.5
1.12

3.10

PVBP of Simple Bond


PVBP

3.10

0.03

93.93%

0.01%

So, for a one basis point increase the bond will fall in value by 0.03 to 93.90%

For our Bund the PVBP is :


PVBP of Bund
PVBP = 3.91x 104.6350 x 0.01% = 0.0409%
Or, a new price of :
104.6350% 0.0409% = 104.5941%
Heres a quick way to calculate absolute price changes and also dollar
duration :
Dollar Duration
Yield

Yield Change

Price

4.44%
4.43%
4.42%

0.010%
-0.010%

104.5941
104.6350
104.6759

Actual Price
Change
-0.0409
0.040874

The average of the actual price change above is sometimes called dollar
durationeven when used in currencies other than US dollars.

Deutsche Bank: Global Markets

Page 11 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

Dollar duration describes the absolute price change that results from a 0.01%
change in yield.
[Some systems use only an up move of 0.01%. Some systems use the
average of the absolute values of up and down moves of 0.01%.]
If we compare the dollar duration to the original price, we can calculate
relative price change (ie modified duration) :
Modified Duration
Yield
4.44%
4.43%
4.42%

Yield
Change
0.010%
-0.010%

Price
104.5941
104.6350
104.6759

Actual Price
Change
-0.0409
0.040874

Relative Price
Change
-0.0390%
0.0391%

ie 0.0409/104.635% = 0.0390%
This, of course, is just the modified duration divided by 10000.
So, the simplest way of looking at duration is to divide the change in the bond
price (for a 1 bp change in yield) by the price itself, and then multiply by
10,000 (because the market quotes duration for 1% changes rather than
0.01% changes).

So, now that you know how to calculate duration, we can do something useful
with it. Lets say that you own 100m of Eintek bonds. You want to get out of
the position because you feel that rates are about to rise. Unfortunately, you
cant find a buyer for Eintek. Instead, you decide to short some Martcom
bonds (if yields rise, the Martcom bonds can be bought back at a higher price,
giving a capital gain to offset against the loss on the Eintek bonds).
The problem is, how many Martcom bonds should be shorted ? You already
know from the work above that different bonds have different price
sensitivities.
The answer is (superficially) easy : use modified duration and PVBP to
calculate a hedge ratio (see below).

Deutsche Bank: Global Markets

Page 12 of 57

Giuseppe Nuti

Long

Eintek

100,000,000

Years

Yield

14%

Coupon

12.00%

PVBP
Short

Financial Computing Course (DB section)

0.0279%
Martcom
Years

Yield

8%

Coupon

10.00%

PVBP

0.0421%

The hedge ratio is simply the PVBP of the Eintek bonds divided by the PVBP
of the Martcom bonds 0.0279%/0.0421% = 66.44%. So, you need to short
66.44% x 100,000,000 of the Martcom bonds, or 66,444,812 nominal.
Hedge Ratio
Hedge

66.44%
66,444,812

Martcom

27,942

Eintek

27,942

This seems to work, given that the change in the Martcom bonds of 0.0421%
x 66,444,812 = 27,942 and the change in the Eintek bonds of 0.0279% x
100,000,000 also equals 27,942. In other words, the gain on the Martcom
bonds is equal to the loss on the Eintek bonds. [Note that we are ignoring
credit spreads here, and we assume a parallel shift in the yield curve of one
basis point].
Of course, the problem that you might encounter is convexity. This is covered
in the next section.

Deutsche Bank: Global Markets

Page 13 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

Convexity
If we calculate the price of the Bund at various possible levels of YTM using
duration as a predictor, and comparing it to the actual price of the Bund at the
same levels of YTM gives us the figure below.
Actual Bund Price and Modified Duration Predicted Price
140.0000
%
130.0000
%
120.0000
%
110.0000
%
Bond Price

Actual
Price
MD
Price

100.0000
%
90.0000
%
80.0000
%
Y ield
1.2500
1.7500
2.2500
2.7500
3.2500
3.7500
4.2500
4.7500
5.2500
5.7500
6.2500
6.7500
7.2500
%
% %
%
%
% % %
%
% %
%
%
Yield

For very small changes in the yield, modified duration predicts the new price
fairly well, as might be expected.
For larger changes in the yield, it does not do its job very well. ie the
relationship between bond price changes and yield changes is not linear, it is
convex.
In other words, modified duration changes as the yield changes.
Changing duration leads to financial instruments exhibiting convexity. You can
think of convexity as the amount of curvature in the price-yield curve.
Convexity is a positive quality for owners of bonds. It means that

as yields fall, bonds prices gain value faster and faster. The
more convex the curve, the faster the bonds price rises as
yields falls.
as yields rise, bonds prices fall more and more slowly. The
more convex the curve, the slower the bonds price falls as
yields rise.

Deutsche Bank: Global Markets

Page 14 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

Investors would like to add convexity to their portfolios for these reasons.
Convexity is the change in the first derivative (ie dp/dy) for a given change in
yield.
Technically it is represented as d2p/dy2 which is the second derivative of the
price function.
The simplest way to measure it is :
Convexity
[(Actual price change for 1bp fall - Actual price change for 1bp rise) x 100m]
Price

This can be shown using our Bund from earlier :


Bund Price Changes

Yield
4.91%
4.90%
4.89%

Price
Price Change Convexity
101.0026%
0.0776562%
101.0802%
74.26
101.1578%
0.0776637%

Convexity for Bund


Convexity

= [(0.0776562% - 0.0776637) x 100m] / 101.0802


= 74.26

We can add convexity to the modified duration used above in order to


calculate the percentage change in price for a given change in yield using the
following formula:
Convexity Predicted Percentage Change in Price
C YTM 2
p

( MD YTM ) +

p
2

Where C = Convexity
We can modify the above equation slightly to show the new price of a bond as
predicted by modified duration and adjusted by convexity for a given change
in the YTM:

Deutsche Bank: Global Markets

Page 15 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

Convexity Based Prediction of New Price

C YTM 2

Using the above formula to calculate the price of the Bund at various possible
levels of YTM produces a much better model of the bonds actual price
behaviour:

p + p p 1 (MD YTM ) +

Bond Price and Convexity Predicted Price

150.0%

140.0%

Bond Price

130.0%

120.0%

Actual Price
Convexity Price

110.0%

100.0%
90.0%

Yi
el
d
1.
25
00
%
1.
75
00
%
2.
25
00
%
2.
75
00
%
3.
25
00
%
3.
75
00
%
4.
25
00
%
4.
75
00
%
5.
25
00
%
5.
75
00
%
6.
25
00
%
6.
75
00
%
7.
25
00
%

80.0%

Yield

Dont get too carried away by this. All we have really shown is that our
calculation of convexity is correct and that duration based hedging has some
flaws. In practice investors dont bother with producing diagrams like the
figure above but instead use duration and convexity to fine-tune their
portfolios given their view of yield changes and given the duration and
convexity of their liabilities.

Deutsche Bank: Global Markets

Page 16 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

Convexity vs Coupon and Duration

120

80
60

0%
2%

40

Convexity

100

4%
Co u po n

20

6%
8%
10%
7.6
12% 6%

Deutsche Bank: Global Markets

7.9
4%

8.2
2%

0
8.5
0%

M o d ifie d Du ra tio n a nd Yie ld


to M a tu rity

Page 17 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

Yield Curves
Yield Curves
First we use money market rates to derive present value factors and forward
interest rates (pretty easy stuff!). We then turn to swap rates to derive PV
factors and zero coupon rates. In the second part we cover forward interest
rate derivation from futures prices.
Products traded at Deutsche Bank will typically involve cashflows in the
future. Forward rates are used to calculate these cash flows. These are then
brought back to present value by the use of PV factors. It is therefore very
important that a sound grasp of forward rates and PV factors is established in
this session.
The products traded at Deutsche Bank where the techniques described in this
session are applied include vanilla swaps, forward start swaps, amortising
swaps, constant maturity swaps, libor in arrears swaps, swaptions, caps,
floors, collars, accrual notes and triggers. These products will all be described
in later sessions.
NB this session does not include complications on day counts these you will
find in the Interest Rate Swap Pricing seminar.
PV Factors from Money Market Rates
Lets say we have two Euro money market rates : 2.76% for depositing for six
months (Euribid Euro Inter Bank Bid rate) and 2.72% for borrowing for one
year (Euribor Euro Inter Bank Offer Rate).
Money Market Rates
2 .7 2 % E u r ib o r
2 .7 6 % E u r ib id

6 m o n th s

1 2 m o n th s

Borrowing 1.00 for one year at 2.72% would involve only two cashflows
an inflow today of 1.00 and an outflow in one year of 1.00 x 1.0272 =
1.0272
The present value factor (PVf) for year one is :
PVf 1 =

Deutsche Bank: Global Markets

1
= 0.973520
(1 + 0.0272)

Page 18 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

In other words, if we multiply the cashflow at the end of one year by the PV
factor for one year it brings us back to the first cashflow :
1.0272 x 0.973520 = 1.00

The general PV Factor formula is :


PVf =

PV
FV

Where :
PV = Present Value
FV = Future Value
Similarly, if we were to deposit for six months at 2.76% then there would be a
cash flow of 1.00 today and a cash flow of 1.00 x (1+(0.0276 x 6/12)) =
1.0138 at six months. [in practice we would use the actual number of days
in the period divided by 360, the so-called Actual/360 day basis]
The PV factor for six months would be :
PVf 6m =

1
6

1 + (0.0276 x )
12

= 0.986388

We can easily calculate PV factors like this because money market rates are
zero coupon interest rates. This sounds more complicated than it really is. It
simply means that in the example above where we borrowed 1.00 for one
year all of the interest flow (or coupon) was at the end of the period. There
were no interim interest flows (or coupons) between today and one year.
In other words, the definition of a zero-coupon rate might be an interest rate
where there is only one interest flow, and that interest flow occurs at maturity.
Similarly, our deposit of 1 for six months was also a zero coupon rate
because the single interest flow occurred at the six month maturity.
However, once we get beyond one year (ie beyond the longest maturity of
money market rates), interest rates quoted in the market are NOT zero
coupon rates.
For example, if a bank quotes 2.87% for borrowing Euros for two years it
means that it wants an interest payment at the end of one year of 2.87% and
another interest payment at the end of two years of 2.87% (plus the principal).
This is not a zero coupon rate because there is an interim cash flow after one
year. We need to do some adjustments to the rate before we can calculate PV
factors.

Deutsche Bank: Global Markets

Page 19 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

Beyond one year, the market uses swap rates to calculate PV factors. Given
that we have not yet explained swaps in these modules you may find it easier
to think of bank lending or borrowing rates rather than swap rates. The maths
is exactly the same.
The table below shows the swap rates (or, if you prefer, lending or borrowing
rates) that we will use and the figure shows the simple yield curve derived
from the swap rates. At this stage we are not concerned with where these
swap rates have come from. We will merely assume that they are market
determined.

Swap Rates

Maturity
0
1
2
3
4
5
6
7
8
9
10

Swap Rates
2.72%
2.87%
3.13%
3.39%
3.63%
3.84%
4.01%
4.16%
4.29%
4.39%

Swap Curve

6.00%
5.00%
4.00%
3.00%
2.00%
1

3 4

7 8

9 10

Swap Curve
Deriving Present Value Factors From Swap Rates

Deutsche Bank: Global Markets

Page 20 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

We can show the one year swap rate (or borrowing rate, if you prefer) as :
100%
2.72%
0

100%

The figure above represents a transaction with two cashflows. There is an


outflow at time zero at a price of 100%, and one year later the receipt of a
fixed payment of 2.72%, plus the 100% back again. Note that there is no
interim cash flow between time zero and one year. Therefore 2.72% is a zerocoupon rate, just like the money market examples above.
You could think of this as a one year bond trading at par, a one year lending
rate or a one year swap rate, whichever is easiest for you to conceptualise.
The present value factor for Year 1 is:
PVf =

PV
FV

PVf 1 =

1
= 0.973520
(1 + 0.0272)

Life is easy so far !


But, heres the problem bit. As we mentioned above, swap rates (or borrowing
rates, if you prefer) beyond one year are not zero coupon rates. We need to
do some adjustments to the swap rate if we are to use the simple PV factor
formula above.
The PV factor for year two can be calculated in two steps:
1. Create a two-year zero-coupon cash flow by starting with the two year
swap rate (2.87% from the table above). We strip out the first fixed flow
of 2.87% by present valuing it back to today :
Stripping Out the Coupons For Year Two
100%
2.87%

2.87%
0

100.0000%
-2.794002%

2.87%0.973520

97.205998%

The present value of the first fixed flow is 2.794002%. Subtracting it from the
original price of 100% gives the present value of the cashflows: 97.205998%.
We have now calculated a zero coupon instrument :
Deutsche Bank: Global Markets

Page 21 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

Zero Coupon Instrument


100%
2.87%
0

97.205998%

2. The PV factor for Year 2 can now easily be calculated :


PVf 2 =

PV 0.97205998
=
= 0.944940
FV
1.0287

The same process is followed for each successive year, as shown in the
figure below.
This is known as bootstrapping the yield curve.

Stripping Out The Coupons for Year Three

0
100.0000%
3.047118%
2.957622%
93.995220%

3.13%

3.13%

100%
3.13%
3

3.13% 0.973520
3.13%0.944940

Equating the cashflows, we obtain the 3 year PV factor:


PVf 3 =

PV 0.93995220
=
= 0.911425
FV
1.0313

We can see from the figure above that the factor 0.93995220 on the
numerator is made up of the product of the fixed rate and the sum of the two
previous present value factors PVf1,, and PVf2, subtracted from 1 :
PVf 3 =

1 (0.0313 (0.973520 + 0.944940 ))


= 0.911425
1 + 0.0313

The process can be summarised in a formula :

Deutsche Bank: Global Markets

Page 22 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

n 1

PVf n =

1 (CPN PVf t )
t =1

1 + CPN

where:
PVfn is the n-year present value factor
CPN is equal to the fixed payment on a swap of maturity of n years
Repeating this process for four years gives :

PVf 4 =

1 (0.0339 (0.973520 + 0.944940 + 0.911425))


= 0.874424
1 + 0.0339

A reminder : these PV factors are simply the price today of a zero coupon
cash flow of 1 at each date. Once all of the PV factors have been
bootstrapped we have a discount (or PV) function :
Discount Function

Present
Value
Factor

Time
As PV factors are difficult to visualise it is preferable to show the data in
interest rate format (ie zero coupon format), which is more easily digestible.
Obtaining Zero Coupon Rates From PV Factors
The respective zero-coupon rates can be obtained from :

rzero, n

1
=
PVf n

n
1

eg :
1

1
rzero ,1 =
1 = 2.72%
0.973520

Deutsche Bank: Global Markets

Page 23 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

Remember from earlier that rzero,1, the zero coupon rate for Year 1, was the
same as the par coupon rate, i.e. rzero,1 = 2.72%.
Weve come full circle. We started with a one year rate (zero coupon) of
2.72%, calculated its PV factor and then used it to create the zero rate again
(ie 2.72%).

Heres the zero rates for years two and three :


1

2
rzero , 2 =
1 = 2.8722%
0.944940
1

rzero,3

3
=
1 = 3.1398%
0.911425

The key to understanding zero coupon rates is this : Rational borrowers


shouldnt care whether or not they borrow at 2.87% for two years or they
borrow at the two year zero coupon rate compounded up (1.028722)2-1 =
5.8269% :
Coupon Borrowing Versus Zero Coupon Borrowing
Years
0
1
2

Coupon Borrowing
100
(2.87)x0.973520
(102.87)x0.944940
NPV = 0

Zero Coupon Borrowing


100
(0)
(105.8269)x0.944940
NPV = 0

The table above shows that, in present value terms, borrowing at 2.87% for
two years with a coupon every year is the same as borrowing for two years
and paying 5.8269% all at the end of two years. So, when we calculate zero
coupon rates all we are doing is putting the standard interest rate quotation
into a different format. We have changed the format from a coupon bearing
instrument to a zero coupon bearing instrument.
Data
Dates
0
1
2
3
4
5

Deutsche Bank: Global Markets

Rates
2.72%
2.87%
3.13%
3.39%
3.63%

PVf
1
0.973520
0.944940
0.911425
0.874424
0.835215

Zero
2.7200%
2.8722%
3.1398%
3.4117%
3.6669%

Page 24 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

Forward Rates
In addition to information about rates for periods beginning today, yield curves
provide information about rates for periods beginning in the future.
So-called forward rates are used to take views about where the yield curve
might be at a forward date, to price derivative products, to evaluate
refinancing decisions, and to lock in investment rates or borrowing costs for
future periods.
Lets go back to money market interest rates for a moment. Once we have
shown how to calculate money market forward rates we will do the same for
forward rates from swap rates (which are slightly more difficult !).
Heres the rates we will start with :
Money Market Rates
2 .7 2 % E u r ib o r
2 .7 6 % E u r ib id

6 m o n th s

1 2 m o n th s

The figure below shows a specific forward period - the borrowing rate in six
months time for a six month maturity, abbreviated to 6v12.
6v12 Forward Period

6 v 1 2 F o r w a r d P e r io d

6m

12m

Imagine that you wanted to borrow 1 in six months time for a six month
maturity (6v12) and you wanted to guarantee today what the fixed interest
rate would be.
The simplest way to guarantee the rate would be to borrow for one year and
deposit for six months. We need to calculate how much we would need to
deposit at 2.76% to get 1 in six months time :

Deutsche Bank: Global Markets

Page 25 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

1

6
1 + 0.0276
12

= 0.986388

We will therefore borrow 0.986388 for twelve months at a cost of :


0.986388 x 2.72%= 0.026830
At the end of one year we need to repay :
0.986388 + 0.026830 = 1.013218
As an interest cost this is :
0.013218 12
= 2.6436%
1
6
So, the forward rate in six months time for a six month maturity (6v12) is
2.6436%.

The general money market forward rate formula is :

LongPeriodMonths
)
1 + ( LongPeriodRate
12months
12months

ShortPeriodMonths ForwardPeriodMonths

)
1 + ( ShortPeriodRate
12months

In our case above :

12
1 + ( 0.0272 12

1 + ( 0.0276 12

1 12 = 2.6436%

6
)

[In the real world we would use the actual number of days in the relevant time
periods, divided by 360. So, wherever you see months in the numerator
above we would actually use the real number of days in the period. The
denominator would be 360 days because Euro money market rates are
quoted on an Actual/360 day basis.]
Note that money market forward rates are zero coupon forward rates.
Market players often look at forward rates in two formats:
1. The same time period at a series of forward dates.
2. The entire yield curve at a series of forward dates.

Deutsche Bank: Global Markets

Page 26 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

The Same Time Period at a Series of Forward Dates

Forward Rates
5.00%

4 into 1

4.50%

3 into 1

4.00%
% 3.50%

2 into 1

Swap Rates
Forward Rates

1 into 1

3.00%
2.50%
2.00%
1

Years
The figure above shows :
The forward rate beginning in one year for a one year maturity, called the 1
into 1 year
The forward rate beginning in two years for a one year maturity, called the 2
into 1 year
The forward rate beginning in three years for a one year maturity, the 3 into 1
year
The forward rate beginning in four years for a one year maturity, called the 4
into 1 year
These forward rates are shown on a time line below :
Forward Time Periods

1 in t o 1 y e a r

2 in to 1 y e a r

3 in t o 1 y e a r

4 in t o 1 y e a r

Although we have used annual rates here for simplicity, it is more


common to use 3 month or 6 month libor in practice.
NB you will see forward periods described by a variety of terms. Here we will stick with the
convention that two into one year means in two years time for a one year maturity. We will write it
as 2 into 1. Always be sure of what people mean when they describe forward periods !

Deutsche Bank: Global Markets

Page 27 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

2. The Entire Curve at a Series of Forward Dates

The second way of presenting forward rates is shown below.


5.00%
4.50%
4.00%
3.50%
3.00%
2.50%
2.00%

Today
In One Year
In Two Years
In Three Years
In Four Years
0

The figure above shows the one, two, three and four year forward coupon
paying rates starting in one year. It also shows the one, two and three year
forward coupon paying rates beginning in two years. Finally, it shows the one
and two year forward coupon paying rates beginning in three years.
Market participants often plot entire forward yield curves in this manner, as it
highlights the evolution of the curve more vividly.
In any five year period there are a variety of forward periods, as you can see
in the diagram below :
Possible Forward Periods
1 into 4 year
2 into 3 year
1 into 3 year
3 into 2 year
2 into 2 year
1 into 2 year
1 into 1 year 2 into 1 year 3 into 1 year 4 into 1 yr

Deutsche Bank: Global Markets

Page 28 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

Forward Rates
Interest rate products that guarantee rates for future periods are frequently
used in the markets. For example, a project finance deal with a loan financing
stage starting in one year can lock in a rate on the debt repayments. This
could be done using a forward start swap (which would guarantee a fixed
rate). Alternatively, it could be done by using a swaption, ie. an option on a
swap. The exact definitions of these will be given in the Swap Pricing and
Swaption sessions.
To price such products as forward start swaps and swaptions, market
practitioners use forward coupon paying rates.
The 1 into 1 year rate would be pictured like this :
100%
CPN

100%

100% PVf1 = CPN PVf 2 + 100% PVf 2


Where CPN = Forward Rate
Rearranging to solve for the coupon : PVf1 PVf 2
CPN =
PVf 2
CPN =

0.973520 0.944940
= 3.025%
0.944940

Here is the general formula :

ForwardRate xintoyyears =

PVf x PVf x + y
x+y

PVf

t = x +1

Where :

Deutsche Bank: Global Markets

Page 29 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

100%
CPN

100%
x+y

Where,
x
is the time from now to the start of period y
y
is the forward period
PVfx
is the present value factor for period x
PVfx+y is the present value factor for period x plus y.
Alternatively, the formula could be reduced to (for one year forward periods
only) :

100% PVf1 = (CPN + 100%) PVf 2


CPN =

CPN =

PVf1
1
PVf 2

0.973520
1 = 3.025%
0.944940

The general formula is :


1

ForwardRate(1yearmaturity) xintoyyears

PVf x y
1
=
PVf x + y

Now, you might not be too enthusiastic about the above formulae. So, try this
for size : Borrow for two years at the two year zero coupon rate and deposit
for one year :

Deutsche Bank: Global Markets

Page 30 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

Forward 1 into 1 Year Rate

Z = 2 .8 7 2 2 %

1 in to 1 y e a r f o r w a rd
2 .7 2 %

How much do we need to deposit today to get 1 in one years time ? :


1
= 0.973520
1.0272

The cost of Borrowing 0.973520 for two years at a zero coupon rate is :

0.973520 (1 + 0.028722 )

) 1 = 3.025%

This is the same as the forward rate answer above.


Now, lets look at a longer period :
The 1 into 4 year rate, for example, might be pictured as follows:
CPN

CPN

100%

CPN

CPN
0

100%

CPN in the above picture refers to the forward coupon paying rate (in other
words, the forward swap rate).
The 1 into 4 year par coupon value above can be calculated from the
following discounted cashflows :
5

100% PVf1 = CPN PVf t + 100% PVf 5


t =2

Rearranging to solve for the coupon :

CPN =

PVf 1 PVf 5
5

PVf

t =2

Deutsche Bank: Global Markets

Page 31 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

In the example above this gives :

CPN =

(0.973520 0.835215)

(0.944940 + 0.911425 + 0.874424 + 0.835215)

= 3.878%

So, this is the data we have so far :


Data
Dates

Swap Rates

PVf

Zero

0
1
2
3
4
5

2.72%
2.87%
3.13%
3.39%
3.63%

1
0.973520
0.944940
0.911425
0.874424
0.835215

2.7200%
2.8722%
3.1398%
3.4117%
3.6669%

Forward
1 yr Maturity

Forward
2 yr Maturity

2.7200%
3.025%
3.677%
4.231%
4.694%

3.3450%
3.9486%
4.4576%

Forward
3 yr Maturity

Forward
4 yr Maturity

3.629%
4.186%

3.878%

PV Factors From Futures Prices


At the short end of the yield curve futures prices can be used to calculate PV
factors. The table below shows the derivation of PV factors from futures
prices.
Futures and PV Factors
USD Futures Curve
Start
19-Feb-03
19-Mar-03
18-Jun-03
17-Sep-03
17-Dec-03
17-Mar-04
16-Jun-04
15-Sep-04
15-Dec-04
16-Mar-05

Futures Information
End
Days
19-Mar-03
18-Jun-03
17-Sep-03
17-Dec-03
17-Mar-04
16-Jun-04
15-Sep-04
15-Dec-04
16-Mar-05
17-Jun-05

Deutsche Bank: Global Markets

28
91
91
91
91
91
91
91
91
93

Price

98.65
98.66
98.63
98.45
98.15
97.76
97.32
97.21
97.17

Rate
1.35%
1.35%
1.34%
1.37%
1.55%
1.85%
2.24%
2.68%
2.79%
2.83%

Period
PV

To Date
PV

0.99895
0.99660
0.99662
0.99655
0.99610
0.99535
0.99437
0.99327
0.99300
0.99274

0.99895
0.99555
0.99219
0.98877
0.98491
0.98033
0.97481
0.96825
0.96147
0.95449

Page 32 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

The figure below shows the PV factors.


PV To End Of First Future

1.35%

1.35%

0.99895

19/Feb/03

0.99660

19/Mar/03

Mar Contract

18/June/03

0.99555
0.99895 x 0.99660 = 0.99555

Its then possible to use a bootstrapping process to find the PV factor to the
end of the September future, as in the figure below.
Bootstrapping

1.35%
0.99895

19/Feb/03

19/Mar/03

1.35%

1.34%

0.99660

0.99662

March
Contract

18/June/03

June
Contract

17/Sept/03

0.99555
0.99219
0.99555 x 0.99662 = 0.99219

We then interpolate the PV factors for any the dates that might be required.

Deutsche Bank: Global Markets

Page 33 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

Interest Rate Swap Pricing


One of the key things to understand about swaps is that the plain vanilla
market in the major currencies is massive and extremely liquid. The market is
used as a base on which to price and value other more complicated swaps
and financial products.
In the table below we have the data that we will use to explain swap pricing
and swap risk.
Swap Data
Years

Swap Rates

PVf

Zero Rates

Forward Rates
1 Yr maturity

0
1
2
3
4
5

1
0.9735
0.9449
0.9114
0.8744
0.8352

2.72%
2.87%
3.13%
3.39%
3.63%

2.7200%
2.8722%
3.1398%
3.4117%
3.6669%

2.7200%
3.0245%
3.6773%
4.2314%
4.6944%

The table shows the sort of information you should be familiar with from the
tutorial called Yield Curves. We have taken swap rates for one to five years
(ie the rates from the swap curve in the diagram below), from which we have
calculated PV factors, zero rates and forward rates.
Simple Swap Curve

6.00%

Swap Curve

5.00%
4.00%
3.00%
2.00%
1 2 3

4 5 6 7

8 9 10

We will assume at this stage that all of the swap rates are market determined
- ie they are driven by market forces (swap rates are linked to benchmark
government bonds, or risk free rates - the one year swap trades at a spread

Deutsche Bank: Global Markets

Page 34 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

(the swap spread) to the one year government bond, the two year swap rate
trades at a spread to the two year government bond etc).
In practice, swap rates at the short end of the curve (up to three years or so)
can be determined from the futures market (3 month futures). This is
considered later in this session.
You can see the detail of a simple three year swap in the table below.
Assume that Deutsche Bank receives fixed and pays floating. The fixed flows
are 3.13% every year for three years. The floating cash flows are simply the
forward rates from the table above.
Simple Swap
Fixed 3.13%

Deutsche
Bank

Client

Float

To make life simple we have for the moment ignored day basis and also used
annual rates - these simplifications will be relaxed later in this session.
Three Year Par Swap
Years Fixed Leg
Floating Leg PV Fixed Leg
PV Floating Leg
1
3.13%
2.72%
3.047118%
2.647975%
2
3.13%
3.02%
2.957663%
2.858006%
3
3.13%
3.68%
2.852759%
3.351559%
8.857540%
8.857540%
Net Present Value

0.000%

We have then calculated the present value of the fixed flows (or fixed leg) by
multiplying each fixed flow by the relevant PV factor from the table above. We
have also done the same with the floating flows.
Finally, the value of the swap (or Net Present Value) is simply the difference
between the total present value of the floating leg and the total present value
of the fixed leg.
The swap has a value of zero because (in an obvious sense) the present
value of the fixed cash flows is exactly equal to the present value of the
floating cash flows. This is known as a par swap. It might also be called a
fair swap in that it is a fair exchange of cash flows - we are neither gaining
nor losing.

Deutsche Bank: Global Markets

Page 35 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

In effect, what we have done here is marked-to-market the swap immediately


after agreeing to enter into it with the client. Marking-to-market merely means
valuing the swap with current market rates.
Marking-to-market a swap can be thought of as implicitly carrying out an equal
and opposite swap with another counterparty. Or, if you like, what we would
achieve if we closed out the first swap with another equal and opposite swap.
Given that we have agreed to enter into a swap at 3.13% and the market says
that the current swap rate is also 3.13% it is unsurprising that we have a net
present value of zero. [This of course ignores bid-offer spreads].
Par Swap (NPV = Zero, Ignoring Bid-Offer Spreads)
Fixed 3.13%

Fixed 3.13%

Client

Client

Bank
Float

Float

You would expect to see a zero NPV at the start of the life of the swap.
Unfortunately, this tends to confuse some people, who ask but how do we
make any profit ?
The answer is that we are only (artificially) using the offer side of the quote to
do our calculations. In practice, most accounting systems would value the
swap using a rate half-way between the bid and offer, or the mid rate. Using
the mid rate would give a positive NPV for the swap when we value it.
Par Swap and Valuing the Swap at the Mid Rate

Deutsche Bank: Global Markets

Page 36 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

Offer Side

Bid Side

Receive Fixed,
Pay Floating

Pay Fixed,
Receive Floating

Fixed rate
3.13%

Fixed Rate
3.10%

NPV=0

NPV=0

P&L

P&L

Mid Rate
Practitioners use the notion of a par swap to price up non-vanilla swaps, as
we shall see later in this session.
Clearly, the fixed rate that will cause the present value of the fixed flows to be
equal to the present value of the floating flows (ie 3.13%) is the market swap
rate.
Note that the swap rate is the weighted average of the forward rates (or, in
other words, the weighted average of a series of forward Libor or Euribor
rates) :
Swap Rate Formula
n
PVft ForwardRatet
SwapRate = t =1
n
PVft
t =1

So, we can calculate the swap rate for our example above :
Swap Rate Calculation
SwapRate =

(2 . 72 % x 0 . 97350 ) + (3 . 0245 % 0 .9449 ) + (3 .6773 % 0 .9114 ) = 3 .13 %


( 0 . 97350 + 0 .9449 + 0 . 9114 )

This should also make sense, because we have already noted that the market
swap rate is that rate which is equal to the series of forward rates.
As interest rates change, so will the value of the swap when we mark it to
market.

Deutsche Bank: Global Markets

Page 37 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

The value of the swap is equal to the difference between the present value of
the series of forward rates and the present value of the series of fixed rates.
Lets assume that the three year swap rate changes by one basis point
(0.01%) from 3.13% to 3.14% (see below). This will change the PV factor,
zero rate and forward rate for year three.
New Swap Data for Mark-to-Market
Years

Swap Rates

PVf

2.72%
2.87%
3.14%
3.39%
3.63%

1
0.9735
0.9449
0.9112
0.8744
0.8352

Zero Rates

Forward Rates
1 Yr maturity

0
1
2
3
4
5

2.7200%
2.8722%
3.1502%
3.4114%
3.6667%

2.7200%
3.0245%
3.7085%
4.1990%
4.6943%

If we now mark-to-market our three year swap we can see that it no longer
has a value of zero. We have lost 0.02830%. Assuming that the notional
principal of the swap is 10m then we have lost 0.02830% x 10m =
2,829.61
Swap Mark-to-Market
Years Fixed Leg
1
2
3

3.13%
3.13%
3.13%

Floating Leg PV Fixed Leg


PV Floating Leg
2.72%
3.047118%
2.647975%
3.02%
2.957663%
2.858006%
3.71%
2.851900%
3.378996%
8.856681%
8.884977%
Net Present Value
PVBP

-0.02830%
-2,829.61

In fact this is the Present Value of a Basis Point (PVBP or sometimes called
PV01), because we have changed the swap rate by one basis point and then
calculated the change in the present value of the swap.
In a trite sense, we have lost money because the present value of the fixed
flows we are receiving (8.856681%) are worth less than the present value of
the floating flows we are paying (8.884977%).
For example, today we have entered into a swap to receive fixed at 3.13% on
10m for three years and pay floating. If we want to mark-to-market the
position in an hours time and the fixed rate has increased to 3.14% we would
calculate what it would cost us to hedge out the swap by paying fixed in a
10m three year swap.

Deutsche Bank: Global Markets

Page 38 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

Swap Mark-to-Market
Fixed 3.13%

Client

Fixed 3.14%

Bank
Float

Client
Float

If the swap rate has changed to say, 3.14%, then we have obviously made a
loss (ie a negative mark-to-market) because we are receiving only 3.13% and
paying out 3.14% (assuming for simplicity at this stage that the floating rates
cancel each other out, and that we are ignoring bid-offer spreads).
How much have we lost on a present value basis ? The table above tells us
its 2,829.61. We can verify this in another way - its easy to work out - weve
lost roughly one basis point every three years on 10m. ie 0.01% x 3 x 10m
= 3,000.
We can refine this even further by taking account of the time value of money,
so we multiply 0.01% x 10m x PVf for each year :
Swap Mark-to-Market
0.01% x 10m x 0.9735 = 973.50
0.01% x 10m x 0.9449 = 944.90
0.01% x 10m x 0.9112 = 911.20
2,829.60
[Note small error due to rounding of PV factors]
We can do this quick calculation because we know that the difference
between the present values of two swap rates at 3.13% and 3.14% is the
same as the difference between the present value of fixed flows at 3.13% and
the present value of the new series of forward rates.
This is true because the new swap rate of 3.14% is just the weighted average
of the new forward rates.
New Swap Rate
NewSwapRat e =

( 2 .72 % 0 .9735 ) + (3 .0245 % 0 .9449 ) + (3 .7085 % 0 .9112 )


= 3 .14 %
0 .9735 + 0 .9449 + 0 .9112

Hold on a minute ! I hear you say, What happens if the one and two year
swap rates change ?
Well, heres the answer :

Deutsche Bank: Global Markets

Page 39 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

Change in 1 and 2 Year Swap Rates, No Change in 3 Year Swap Rate


Years

Swap Rates

PVf

Zero Rates

Forward Rates
1 Yr maturity

3.00%

0.9709

3.0000%

3.0000%

3.15%

0.9398

3.1524%

3.3050%

3.13%

0.9117

3.1309%

3.0881%

In the table above we have considerably changed the 1 and 2 year swap
rates, but left the three year swap rate unchanged. Look at the table below to
see what happens to the value of the swap. It still has an NPV of zero.
Swap Mark-to-Market, Year Three Swap Rate Unchanged
Years Fixed Leg
Floating Leg PV Fixed Leg
PV Floating Leg
3.13%
3.00%
3.038835%
2.912621%
1
2

3.13%

3.30%

2.941616%

3.106043%

3.13%

3.09%

2.853497%

2.815284%

8.833948%

8.833948%

Net Present Value

0.000%

The simple reason for this is that, as already stated, the three year swap rate
is the weighted average of the forward rates. Whilst the forward rates have all
changed, the PV factors have also changed. These offset each other such
that the swap rate remains unchanged.
Three Year Swap Rate
3YearSwapRate =

(3.0% 0.9709) + (3.3050% 0.9398) + (3.0881% 0.9117)


= 3.13%
0.9709 + 0.9398 + 0.9117

Heres another intuitive reason for this : when we mark-to-market this three
year swap that we have just entered into, we will of course compare it with
another three year swap (because that is what we would need to close out the
swap). If the three year swap rate has not changed, then, by definition, the
value of our swap cannot have changed.
Note also that if we change the swap rates in years 1 and 2, and also change
the three year swap rate by 0.01%, we get the same mark-to-market as
before.
There is a valuable lesson here - lets say we have entered into a seven year
swap, and three years have already gone by : then we are largely exposed to

Deutsche Bank: Global Markets

Page 40 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

a change in the four year swap rate (because there are four years left to run
and a four year swap would be needed to close it out).
NB. Your undoubted delight at finding out that we are only exposed to one
swap rate should be tempered by the fact that this is a slight simplification.
We are also exposed to the first floating rate reset. This is a much smaller
risk, however, because the floating rate will reprice every 3 or six months in
practice (rather than once a year as in the example here) and will therefore
only have a relatively low duration of 0.25 or 0.5.
Summary :
1. Floating rate cash flows are derived from forward rates.
2. If the PV of the fixed-rate cash flows is equal to the PV of the floating-rate
cash flows it is called a par swap.
3. The fixed swap rate can be calculated by dividing the floating leg PV by
the sum of the relevant PV factors.
It may also interest you to note that we could have valued the swap in slightly
different ways, but still come up with the same answer.
The figure below shows that the swap (paying floating, receiving fixed) is like
two bonds bolted together :
Valuing A Swap As Two Bonds

PAY FLOATING
+ 10m

RECEIVE
FIXED +10m

RECEIVE
FIXED
- 10m

F IXED

FIXED

(FLOAT)

(FLOAT)

FIXED

(FLOAT)
PAY
FLOATING
- 10m

In the figure above, paying floating is like issuing a floating rate note (FRN). In
other words, a principal amount is received as a result of issuing the FRN,
floating rates of interest are paid out and then the principal is finally repaid at
the end.

Deutsche Bank: Global Markets

Page 41 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

Also, receiving fixed in a swap is like buying a fixed rate bond. Principal is
paid out to buy the bond, fixed rates of interest are received and then the
principal is finally received at the end.
We get the same value for the swap whether or not we value it by including all
of the notional principals or value it by excluding them, as is shown by the
tables below.
Swap Valuation Using Only The Interest Flows
Years Fixed Leg
1
2
3

Floating Leg
3.13%
3.13%
3.13%

2.72%
3.02%
3.68%

PV Fixed Leg
PV Floating Leg
3.047118%
2.647975%
2.957663%
2.858006%
2.852759%
3.351559%
8.857540%
8.857540%
Net Present Value

0.0000%

Swap Valuation Using All Notionals And All Principals


Years Fixed Leg
0
1
2
3

Floating Leg
-100.00%
3.13%
3.13%
103.13%

100%
-2.7200%
-3.0245%
-103.6773%

PV Fixed Leg
PV Floating Leg
-100.000000%
100.000000%
3.047118%
-2.647975%
2.957663%
-2.858006%
93.995219%
-94.494019%
0.000000%

0.000000%

Just out of interest, in the diagram below we have also shown that paying
fixed in a swap is like issuing a fixed rate bond and buying an FRN.
Valuing A Swap As Two Bonds
PAY FIXED
RECEIVE
+ 10m

FLOATING +10m
FLOAT

FLOAT
FLOAT

(FIXED)

RECEIVE
FLOATING
- 10m

Deutsche Bank: Global Markets

(FIXED)

(FIXED)

PAY
FIXED
- 10m

Page 42 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

Finally, note that we could take a simplifying step that allows us to value our
swap more quickly.
It is possible to synthetically create the PV of a series of forward rates simply
by using the PV of two notional principles at the beginning and end of the
swap.
PV of Two Principals

PV
Principal

PV of Forwards

PV Float

PV Float

PV Float

PV
Principal

This is shown in the table below. You cant see any floating interest flows
because notional principals have replaced them. The value of the swap is still
zero.
Swap Valuation Using Two Principals to Synthetically Create Floating Flows
Years Fixed and Float Legs
PV Fixed and Float
0
-100.00%
-100.00%
1
3.13%
3.05%
2
3.13%
2.96%
3
103.13%
94.00%
NPV

0.0000%

We can synthetically create the forward rates because of the following :


PVLibor = (Forward1 PVf 1 ) + (Forward 2 PVf 2 ) + ........Forwardn PVfn

As the forward rate is (PVft/PVft+1)-1 we can say that :


1

PVf 1
PVfn 1
PVLibor =
1 PVf 1 +
1 PVf 2 + .........
1 PVfn
PVf 1
PVf 2
PVfn

Deutsche Bank: Global Markets

Page 43 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

This reduces to :
PVLibor= (1 PVf1) + (PVf1 PVf 2) + PVf 2............PVfn 1 PVfn

Which further reduces to :


PVLibor = 1 PVfn

This also means that we can furnish ourselves with another swap rate
formula:
SwapRate =

1 PVf n
n

PVf

t =1

Which is equal to:


n
PVft ForwardRatet
SwapRate = t =1
n
PVft
t =1

Which is also equal to:

SwapRate =

PVofFloatingLeg
n
PVft
t =1

Pricing Non-Vanilla Swaps


This section now uses the techniques explained previously to price forward
start swaps and forward start accreting/amortising swaps. By price we mean
to calculate what the fixed rate on such a swap should be, using the vanilla
swap market as a base.
Pricing Forward Start and Accreting/Amortising Swaps
Lets say we have a client who has a $100 million loan that will be drawn
down after 1 year (ie wont actually be borrowed until one years time) and
repaid after a further 2 years.
The client will be paying annual Libor and wishes to swap into a fixed rate.
This swap is called a 1 into 2 year forward swap, which means it begins after
1 year and runs for the next 2 years.
[NB there are a variety of different ways of describing forward periods we
have chosen the approach above throughout this session].

Deutsche Bank: Global Markets

Page 44 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

What is your price ? (ignoring bid and offer)? ie What is the fixed rate the
client should pay ?
Forward Start Swap 1 into 2 Year

Forward Fixed Rate


Bank

Client

LIBOR

Libor Years 2 and 3

First, we need to calculate the present value of the floating leg using the
forward rates :
PV of Floating Leg
Years Floating Leg
PV Floating Leg
1
2
3.0245%
2.86%
3
3.6773%
3.35%
PV Floating Leg

6.21%

Notice that there are no flows for year 1 because this swap starts at the end of
one year (thats why its called a forward start swap !).
As we know that the PV of the floating leg has to equal the PV of the fixed leg
(to make a fair exchange of cash flows), we can solve for the forward swap
fixed rate. It is simply the PV of the floating leg divided by the sum of the
relevant PV factors (ie PV factors for years 2 and 3 in this case, as these are
the only periods that have cash flows) :
Forward Swap Rate = PV Float/(Sum Relevant PV Factors)
Forward Swap Rate = 6.21%/(0.9449+0.9114) = 3.345%
Alternatively, (using two notionals to give the PV of the floating leg) :
Forward Swap Rate = (PVf1-PVf3)/Sum of Relevant PV Factors

Deutsche Bank: Global Markets

Page 45 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

Forward Swap Rate = (0.9735-0.9114)/(0.9449+0.9114) = 3.345%


You can see in the table below that a forward swap rate of 3.345% does
indeed give a par value swap.
Calculated Rate Gives A Par Swap
Years Fixed Leg
1
2
3

Floating Leg
3.345%
3.345%

PV Fixed Leg

3.0245%
3.6773%

PV Floating Leg

3.1608%
3.0487%

2.8580%
3.3516%

6.2096%

6.2096%

NPV

0.0000%

Now, what if the client wanted the notional principal to rise over time (perhaps
because the underlying borrowing that the client is hedging is increasing over
time), as well as the swap starting at a forward date. The table below shows
that we can easily price up this accreting forward start swap.
Calculating The Swap Rate For An Accreting Forward Start Swap
Years
1
2
3

Floating
3.0245%
3.6773%

Principal PV Floating
10,000,000
15,000,000

285,801
502,734
788,534

Forward Rate

3.411%

The swap rate is the PV of the floating leg divided by the sum of the products
of the PV factors multiplied by the principals.
Forward Accreting Swap =
788,534/(0.9449 x 10m) + (0.9114 x 15m)) = 3.411%
You can see from the table below that the rate of 3.411% does indeed give a
par swap.

Deutsche Bank: Global Markets

Page 46 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

Calculated Forward Accreting Swap Rate Gives a Par Swap


Years Fixed
1
2
3

Floating
3.411%
3.411%

PV Fixed

3.0245%
3.6773%

PV Floating
322,272
466,262

285,801
502,734

788,534

788,534

NPV

0.0000

Swap Pricing Including Day Basis


Unfortunately, there is one further complication in the swap market : day
basis. Just like the bond market, there are different ways of counting the days
in swap periods. The mechanics of swap valuation and pricing are exactly the
same as above but look more complicated because of the day basis.
If we now include day basis we can look at the following equivalents :

Where :
Swap = Fixed Swap Rate
PVft = PV factor at time t
= day basis or accrual factor.

If the swap is to be quoted on an annual money basis (A/360) the day basis
is:

A / 360

Actual Days
360

If the swap is to be quoted on an annual bond basis (30/360), the day basis is:

30 / 360

30 / 360 Days
360

If the swap is to be quoted on a semi-annual bond basis (A/A), the day basis
factor is:

A/ A

Actual days in 6 months


Actual days in full year

We know from our previous work that the following must also be true :
Deutsche Bank: Global Markets

Page 47 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

1 PVf
n
SwapRate = n
n
(PVf )
t
t
t =1

The top part of the expression represents the present value of a series of
forward rates (n floating rate periods).
The bottom part of the expression above represents an annuity factor. This
factor will spread out the lump sum present value of the forward rates into a
series of equal fixed payments (n fixed payment periods). The day basis is
represented by .
In other words, the swap fixed-rate payment is equal to the PV of the floatingrate cash flows divided by the sum of the relevant PV factors adjusted by the
appropriate day-basis.
We have already seen that we can calculate discount factors from par swap
rates. The method here is the same as before except that we need to take
account of the day basis.
PV Factors From Swap Rates
Value Date Day
Par
Discount
20-Jan-03 Basis
Swaps
Factors (PVf)
30/360
Dates
30/360
20-Jan-03
20-Jan-04
1.0000
2.72%
0.973520
20-Jan-05
1.0000
2.87%
0.944940
20-Jan-06
1.0000
3.13%
0.911425
22-Jan-07
1.0056
3.39%
0.874265
21-Jan-08
0.9972
3.63%
0.835132
20-Jan-09
0.9972
3.84%
0.795145
20-Jan-10
1.0000
4.01%
0.755770
20-Jan-11
1.0000
4.16%
0.716815
20-Jan-12
1.0000
4.29%
0.678843
21-Jan-13
1.0028
4.39%
0.643048

The discount factor (or PV factor) for a relevant period is just :

n 1
1 ( Sw apR ate n P V f t t )
t =1
P V F actor n =
1 + ( Sw apR ate n n )

The discount factor (or PV factor) for year 2 is therefore :

Deutsche Bank: Global Markets

Page 48 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

1 (0.0287 (0.973520 1.0)


= 0.944940
1 + (0.0287 1.000)
And the PV factor for year three is :
PVf 2 =

PVf 3 =

1 (0.0313 [(0.973520 1.0) + (0.944940 1.00)]


= 0.911425
1 + (0.0313 1.0)

We can also work backwards from the PV factors to calculate swap rates.
This might be useful, for example, if we need to calculate swap rates on a
different day basis.
Swap Rates From PV Factors (A/360 and A/365)
20-Jan-03
Dates
20-Jan-03
20-Jan-04
20-Jan-05
20-Jan-06
22-Jan-07
21-Jan-08
20-Jan-09
20-Jan-10
20-Jan-11
20-Jan-12
21-Jan-13

Day Count
A/360

A/365

1.014
1.017
1.014
1.019
1.011
1.014
1.014
1.014
1.014
1.019

PV
Factors

1.000
1.003
1.000
1.005
0.997
1.000
1.000
1.000
1.000
1.005

0.973520
0.944940
0.911425
0.874265
0.835132
0.795145
0.755770
0.716815
0.678843
0.643048

Par Swaps
A/360
A/365
2.683%
2.827%
3.084%
3.341%
3.578%
3.784%
3.952%
4.100%
4.229%
4.326%

2.720%
2.866%
3.127%
3.388%
3.628%
3.837%
4.007%
4.157%
4.287%
4.386%

Note that PV factors are independent of day counts.


The swap rates are calculated as follows :

1 PVf n
SwapRate n = n
(PVf t t )
t =1

1YearSwapRate(A/360)=

2YearSwapRate(A/360) =

Deutsche Bank: Global Markets

1 0.973520
= 2.683%
0.9735201.014

1 0.944940
= 2.827%
(0.973520 1.014) + (0.944940 1.017)

Page 49 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

2YearSwapRate(A/365)=

1 0.944940
= 2.866%
(0.9735201.0) + (0.9449401.003)

Forward Start and Forward Start Accreting/Amortising Swaps


Now that youve got the basic idea well price up a forward start swap (with
day basis)
Forward Start Swap Rates
Value Date
20-Jan-03
Dates

Day Basis
A/360

Discount
Factor (PVf)

20-Jan-03

Forward Swaps
Term
Rate
1x4

3.822%

20-Jan-04

1.014

0.973520

2x3

4.129%

20-Jan-05

1.017

0.944940

3x4

4.705%

20-Jan-06

1.014

0.911425

22-Jan-07

1.019

0.874265

21-Jan-08

1.011

0.835132

20-Jan-09

1.014

0.795145

20-Jan-10

1.014

0.755770

20-Jan-11

1.014

0.716815

20-Jan-12

1.014

0.678843

21-Jan-13

1.019

0.643048

The swap rate in one years time for a four year maturity (1x4) is :
Forward Start (1x4) Swap Rate

Forward1 4 =

0.973520 - 0.835132
= 3 .822 %
(0.944940 1.017) + (0.911425 1.014) + (0.874265 1.019) + (0.835132 1.011)

We can also price up a forward start accreting/amortising swap :

Deutsche Bank: Global Markets

Page 50 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

Forward Start Accreting/Amortising Swap Price


Value Date
20-Jan-03
Dates
20-Jan-03
20-Jan-04
20-Jan-05
20-Jan-06
22-Jan-07
21-Jan-08
20-Jan-09
20-Jan-10
20-Jan-11
20-Jan-12
21-Jan-13

Day Basis
/360

Discount
Factor (PVf)
0.973520
0.944940
0.911425
0.874265
0.835132
0.795145
0.755770
0.716815
0.678843
0.643048

1.014
1.017
1.014
1.019
1.011
1.014
1.014
1.014
1.014
1.019

Forward
Rate
2.683%
2.975%
3.627%
4.169%
4.634%
4.960%
5.139%
5.360%
5.517%
5.460%

Nominal

100.00%
90.00%
75.00%
45.00%
35.00%
45.00%

Day Basis*
PV Forward PV*Notional
14.561%
3.31755
PV Forward x
Day Basis *
Nominal x A/360
Proof :
PV*Notional
3.352%
0.92408
4.056%
3.344%
0.80214
3.521%
2.935%
0.63331
2.780%
1.799%
0.36279
1.592%
1.378%
0.26819
1.177%
1.753%
0.32705
1.435%
14.561%

Lets say we want to price up a swap which starts in two years time with the
notional principal amortising (and then accreting) in the following steps :
100%, 90%, 75%, 45%, 35%, 45%.
We need to calculate the relevant forward rates and PV factors. Then we
need to multiply the forward rates by their respective notional principals and
add them all up.
Swap Rate = 14.561%/3.31755 = 4.389%
Swap Pricing Using Futures

At the short end of the yield curve futures prices can be used to price up
swaps. We then interpolate the PV factors for the dates required and solve for
the one, two and three year swap rates.
The swap pricing formula is the same as before :
1 PVf n
Swap n = n
(PVf t t )
t =1

Deutsche Bank: Global Markets

Page 51 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

Appendix 1 : Date Conventions


There are several methods for computing the interest payable in a period and
the accrued interest for a period.
A particular method applied to a transaction can affect the yield of that
transaction and also the payment for a transaction.
Counting the Number of Days
The conventions used to determine the interest payments depend on two
factors: 1) The number of days in a period and 2) The number of days in a
year. The conventions are:

Actual/360
Actual/365 : sometimes referred as Actual/365F (seldom used now)
Actual/Actual
30/360 European: sometimes referred to as ISMA method (30E/360)
30/360 US (30U/360)

The first three methods (Actual/360, Actual/365 and Actual/Actual) calculate


the number of days in a period by counting the actual number of days.
For each method the number of days in a year is different. Actual/365 and
Actual/Actual are similar except:
1. Periods which include February 29th (leap year) count the number of days
in a year as 365 under Act/365 and 366 under Act/Act;
2. Semi-annual periods are assumed to have 182.5 days under Act/365 and
however many actual days under Act/Act.
Eurobond markets use the 30E/360 basis. This calculation assumes every
month has 30 days. This means that the 31st of a month is always counted as
if it were the 30th of the month.
For 30E/360 basis, February is also assumed to have 30 days.
If the beginning or end of a period falls on a weekend the coupon is not
adjusted to a good business day. This means that there are always exactly
360 days in a year for all coupons.
For example a coupon from 08-November-1997 to 08-November-1998 of 5%
is a coupon of 5%, even though 08-November-1998 is a Sunday. There is no
adjustment to the actual coupon payment.
The various European government bond markets are described below:

Deutsche Bank: Global Markets

Page 52 of 57

Giuseppe Nuti

Country
Austria
Belgium
Denmark
Finland
France
Germany
Ireland

Financial Computing Course (DB section)

Italy
Luxembourg
Netherlands
Norway

Accrual
Act/Act
Act/Act
Act/Act
Act/Act
Act/Act
Act/Act
Act/Act
Act/Act (Earlier Issues)
Act/Act
Act/Act
Act/Act
Act/Act

Portugal
Spain
Sweden
Switzerland
United Kingdom

Act/Act
Act/Act
Act/Act
Act/Act
Act/Act

Deutsche Bank: Global Markets

Coupon Frequency
Annual
Annual
Annual
Annual
Annual
Annual
Annual
Semi-Annual
Semi-Annual
Annual
Annual
Annual or SemiAnnual
Annual
Annual
Annual
Annual
Semi-Annual

Page 53 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

Appendix 2 : Calculating Accrued Interest


Even though Eurobond coupons are not adjusted for weekends and holidays,
the accrual of a coupon for any part of the year has to use the correct number
of days.
The difference between European and US 30/360 method is how the end of
the month is treated. For US basis the 31st of a month is treated as the 1st of
the next month, unless the period is from 30th or 31st of the previous month.
In this case the period is counted as number of months:
30/360
European
M1/D1/ Y1
M2/D2/Y 2
D1 = 30
D2 = 30

Beginning Date
Ending Date
If D1 = 31
If D2 = 31

30/360 US
M1/D1/Y1
M2/D2/Y 2
D1 = 30
If D1 = 31 or 30
Then: D2 = 30
Else: D2 = 31

The difference occurs when the accrual period starts and ends at the end or
beginning of a calendar month:
European and US 30/360 Examples
Start

End

US

European

Actual

31-Jul-01

31-Oct-01

90

90

92

30-Jul-01

30-Oct-01

90

90

92

30-Jul-01 01-Nov-01

91

91

94

29-Jul-01

31-Oct-01

91

92

94

01-Aug-01

31-Oct-01

89

90

91

Euro money markets:

Day count basis: actual/360


Settlement basis: spot (two day) standard
Fixing period for derivatives contracts: two day rate fixing convention

Euro FX markets

Settlement timing: spot convention, with interest accrual beginning on


the second day after the deal has been struck
Quotation: Certain for uncertain (ie 1 Euro = x foreign currency units)

Deutsche Bank: Global Markets

Page 54 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

Appendix 3 : Duration and Convexity Technicals


Whilst our key concern is practical application rather than proving
relationships, some of you may be able to spot that modified duration (MD) is
related to the first derivative of price (p) with respect to yield (y), and in fact
you could show that the relation is:
Modified Duration

where dp/dy is the first derivative, or the change in price divided by the
change in yield.
We are interested in changes in the price, p, of a bond caused by changes in
the underlying yield, y. We have expressed the price of a bond as a function
of yield to maturity. The first two terms of a Taylor series expansion of p in
terms of y are:
First Order Expansion of p about y

p(y') = p(y) + dp/dy (y'-y)


Where y ' = new yield
This is called a first order approximation. (Higher order terms include ,

(y'-y)n and (dp/dy)n where n = 2,3, etc.).


For a change in yield, e.g. 0.01%, we can predict the new bond price, p(y') ,
from the old one, p(y) , by using the fact that dp/dy is the gradient of the
straight line at the point with coordinates (y, p), on the price-yield curve.
If we subtract p(y) from both sides and divide by p(y) :
Percentage Change in Price

(p(y') - p(y))/p(y) = (1/p) (dp/dy)/(y'-y)


Denoting as (y'-y) as y then we obtain:

% change in price = -MD y


i.e. the new price of a bond can be predicted by modified duration for a given
change in the yield to maturity (YTM), or, expressing it in a different way:

p + p p [1 - (MD YTM)]

Deutsche Bank: Global Markets

Page 55 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

This formula says that the new price of a bond ( p + p )after a given change
in its YTM is more or less equal to the old price times 1 minus the product of
its modified duration times the change in YTM.

Deutsche Bank: Global Markets

Page 56 of 57

Giuseppe Nuti

Financial Computing Course (DB section)

U.S. Conventions
Product
USD LIBOR
USD Swap Fixed Rate in U.S.
USD Swap Fixed Rate in London
T-Bills
Government Bonds
Agency and Corporate Bonds

Deutsche Bank: Global Markets

Day Count
Convention
Act/360
Act/Act s.a.
Act/360 p.a.
Act/360 discount rate
Act/Act s.a.
30/360 s.a.

Page 57 of 57

You might also like