duration and convexity calculator

21
The purpose of this workbook is to demonstrate how to calculate duration, modified duration, and convexity step-by-step using the standard formulas. The workbook can handle bonds (or other loans) with maturities up to 30 years with payment frequencies of annual, semiannual, quarterly, or monthly. I make use of conditional formatting to make the table look nice, and data validation to make sure that users don't enter non-valid data. The "Calculator" worksheet is protected to avoid inadvertant changes. You can unprotect it without needing a password. Please note that the formulas used in this workbook only work on a payment date. They do not work between payment dates. Also note that if you just need to calculate duration or modified duration then Excel provides the Duration() and MDuration() functions. Timothy R. Mayes, Ph.d. Associate Professor of Finance Metropolitan State College of Denver Please see http://www.tvmcalcs.com for more Excel solutions.

Upload: ddelis77

Post on 27-Nov-2014

160 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Duration and Convexity Calculator

The purpose of this workbook is to demonstrate how to calculate duration, modified duration, and convexity step-by-step using the standard formulas.

The workbook can handle bonds (or other loans) with maturities up to 30 years with payment frequencies of annual, semiannual, quarterly, or monthly. I make use of conditional formatting to make the table look nice, and data validation to make sure that users don't enter non-valid data. The "Calculator" worksheet is protected to avoid inadvertant changes. You can unprotect it without needing a password.

Please note that the formulas used in this workbook only work on a payment date. They do not work between payment dates. Also note that if you just need to calculate duration or modified duration then Excel provides the Duration() and MDuration() functions.

Timothy R. Mayes, Ph.d.Associate Professor of FinanceMetropolitan State College of Denver

Please see http://www.tvmcalcs.com for more Excel solutions.

Page 2: Duration and Convexity Calculator

Bond Price $0.23 $0.18 If Yield Changes By 1.00%Face Value 1,000 1000 Bond Price Will Change By -0.05Coupon Rate 0.00% 0%Life in Years 30 30 Modified Duration Predicts -0.06Yield 30.00% 31% Convexity Adjustment 0.01Frequency 2 2 Total Predicted Change -0.05

Macaulay Duration 30.00 Actual New Price $0.18 Modified Duration 26.09 Predicted New Price $0.18 Convexity 691.87 Difference $0.00

Period Cash Flow PV Cash Flow Duration Calc Convexity Calc0 ($0.23)1 - - - - 2 - - - - 3 - - - - 4 - - - - 5 - - - -

6 - - - - 7 - - - - 8 - - - - 9 - - - -

10 - - - - 11 - - - - 12 - - - - 13 - - - - 14 - - - - 15 - - - - 16 - - - - 17 - - - - 18 - - - - 19 - - - - 20 - - - - 21 - - - - 22 - - - - 23 - - - - 24 - - - - 25 - - - - 26 - - - - 27 - - - - 28 - - - - 29 - - - - 30 - - - -

C

i

CF

it t

V

tt

t

N

B

1

1 12

2

1

B

N

tt

t

Mac V

ti

CF

D 1 1

iD

D MacMod

1

D12
Timothy R. Mayes, Ph.D: Each cell in this column is the PV of the cash flow multiplied by the number of periods until the cash flow is received. The sum of these values is the numerator of the duration calculation. Divide by the bond price to get the duration in periods. To get annual duration, divide by the number of periods in a year (generally 2).
E12
Timothy R. Mayes, Ph.D: Each cell in this column is the PV of the cash flow multiplied by (t2+t) and divided by (1+i)2. The sum of these values is the numerator of the convexity calculation. Divide by the bond price to get the convexity measured in periods. This value needs to be divided by m2 (m is the number of periods per year).
Page 3: Duration and Convexity Calculator

31 - - - - 32 - - - - 33 - - - - 34 - - - - 35 - - - - 36 - - - - 37 - - - - 38 - - - - 39 - - - - 40 - - - - 41 - - - - 42 - - - - 43 - - - - 44 - - - - 45 - - - - 46 - - - - 47 - - - - 48 - - - - 49 - - - - 50 - - - - 51 - - - - 52 - - - - 53 - - - - 54 - - - - 55 - - - - 56 - - - - 57 - - - - 58 - - - - 59 - - - - 60 1,000.00 0.23 13.69 631.27

Total 13.69 631.27 Total Total Total Total Total Total Total Total Total Total Total Total

Page 4: Duration and Convexity Calculator

Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total

Page 5: Duration and Convexity Calculator

Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total

Page 6: Duration and Convexity Calculator

Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total

Page 7: Duration and Convexity Calculator

Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total

Page 8: Duration and Convexity Calculator

Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total

Page 9: Duration and Convexity Calculator

Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total

Page 10: Duration and Convexity Calculator

Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total Total

Page 11: Duration and Convexity Calculator

-22.92%

-26.09%3.46%

-22.63%

+0.3771%

i is periodic ratem is payment frequency

DMac is annual

C

i

CF

it t

V

tt

t

N

B

1

1 12

2

1

B

N

tt

t

Mac V

ti

CF

D 1 1

iD

D MacMod

1

Page 12: Duration and Convexity Calculator

This workbook is Copyright 2009 by Timothy R. Mayes, Ph.D.

Please visit: http://www.tvmcalcs.com/

You are free to use and redistribute it as long as this notice is kep intact. However, I retain all rights to the worksheet.