Financial Mathematics 1 - Homework 5
Instructor: Dr. Le Nhat Tan
1 Hand Calculations
1.1 Problem 5.10.1
A $100 bond has four years to maturity. The bond pays 6% p.a. with coupon payments made semi-annually. The interest rate is 6% p.a. with interest compounded semi-annually. Calculate the value of the bond.
Solution. The present value of the face value payment is \[\textrm{PV}_{face}=\frac{100}{(1+6\%/2)^8}\approx78.941\] while the present value of the coupon payments is \[\textrm{PV}_{coupon}=\sum_{i=1}^8\frac{100\cdot6\%/2}{(1+6\%/2)^i}\approx21.059\] yielding the present bond price as \[\textrm{PV}=\textrm{PV}_{face}+\textrm{PV}_{coupon}=100.\] Note that for this bond the coupon rate coincides with the discount rate, so its price must be equal to the par value.
1.2 Problem 5.15.4
We now calculate the approximate duration of a bond with $100 par value, 7% coupon rate, 10 years to maturity, 5% yield to maturity. The coupon is paid annually. Assume yields are expected to increase by 1%, what is the estimated percentage change in price and dollar change in price due to duration?
Solution. The current bond price is \[P(5\%)=\frac{100}{(1+5\%)^{10}}+\sum_{i=1}^{10}\frac{100\cdot7\%}{(1+5\%)^i}\approx115.443\] and the prices with adjusted yields are \[P(6\%)=\frac{100}{(1+6\%)^{10}}+\sum_{i=1}^{10}\frac{100\cdot7\%}{(1+6\%)^i}\approx107.36\] and \[P(4\%)=\frac{100}{(1+4\%)^{10}}+\sum_{i=1}^{10}\frac{100\cdot7\%}{(1+4\%)^i}\approx124.333,\] yielding the approximated duration as \[D=\frac{P(4\%)-P(6\%)}{2\cdot1\%\cdot P(5\%)}\approx7.351.\] Therefore, a 1% increment in yield will imply a price percentage change of \[\frac{P(6\%)-P(5\%)}{P(5\%)}=-D\cdot1\%=-7.351\%\] corresponding to a price change of \[115.443\cdot(-7.351\%)\approx-8.487.\]
1.3 Problem 5.18
In this comprehensive exercise, you will value a bond with a $100 par value, 3% coupon rate, and 8 years to maturity. This bond was rated AAA by S&P’s and it was issued on July 30, 2020. You have determined that this bond’s yield is comparable to the yield of bonds with a AAA rating.
- Find the bond yield of AAA-rate bonds on July 30, 2020.
- Find the bond price with the above bond yield.
- Compute the bond duration and convexity.
- If the bond yield increases 2%, what is the estimated percentage change in price and dollar change in price?
Solution.
- We will find the bond yield by using R.
aaa = Quandl("ML/AAAEY")
aaa_yield = subset(aaa, aaa$DATE == '2020-07-30')
as.numeric(aaa_yield[2] / 100)## [1] 0.0141
The bond price is \[P(1.41\%)=\frac{100}{(1+1.41\%)^8}+\sum_{i=1}^8\frac{100\cdot3\%}{(1+1.41\%)^i}\approx111.949.\]
The prices with adjusted yields are \[P(0.41\%)=\frac{100}{(1+0.41\%)^8}+\sum_{i=1}^8\frac{100\cdot3\%}{(1+0.41\%)^i}\approx120.343\] and \[P(2.41\%)=\frac{100}{(1+2.41\%)^8}+\sum_{i=1}^8\frac{100\cdot3\%}{(1+2.41\%)^i}\approx104.247,\] yielding the approximated duration \[D=\frac{P(0.41\%)-P(2.41\%)}{2\cdot1\%\cdot P(1.41\%)}\approx7.189\] and the approximated convexity \[C=\frac{P(0.41\%)+P(2.41\%)-2\cdot P(1.41\%)}{P(1.41\%)\cdot(1\%)^2}\approx61.814.\]
A 2% increment in bond yield will imply a price percentage change of \[\frac{P(3.41\%)-P(1.41\%)}{P(1.41\%)}\approx-D\cdot2\%+0.5\cdot C\cdot(2\%)^2\approx-13.142\%\] corresponding to a price change of \[111.949\cdot(-13.142\%)\approx-14.712.\]
2 Automation
2.1 Problem 5.10.1
setClass('bond', slots = list(face = 'numeric', coupon_rate = 'numeric',
period = 'numeric', yield = 'numeric'))bond_price = function(object) {
coupon = 0
for (i in 1:object@period) {
coupon = coupon +
object@face * object@coupon_rate / ((1 + object@yield) ^ i)
}
return(coupon + object@face / ((1 + object@yield) ^ object@period))
}bond1 = new('bond', face = 100, coupon_rate = 0.06 / 2,
period = 4 * 2, yield = 0.06 / 2)
bond_price(bond1)## [1] 100
2.2 Problem 5.10.2
bond1@yield = 0.07 / 2
bond_price(bond1)## [1] 96.56302
2.3 Problem 5.15.4
\[D=\frac{P(y-\Delta y)-P(y+\Delta y)}{2\cdot\Delta y\cdot P(y)}\]
bond_duration = function(object) {
current = bond_price(object)
object@yield = object@yield - 0.01
low_yield = bond_price(object)
object@yield = object@yield + 0.02
high_yield = bond_price(object)
object@yield = object@yield - 0.01
return((low_yield - high_yield) / (2 * 0.01 * current))
}
price_change_duration = function(object, percent, increase = TRUE) {
current = bond_price(object)
duration = bond_duration(object)
if (increase == TRUE) {
print(paste('Percentage Change:', - duration * percent))
print(paste('Dollar Change:', - duration * percent * current))
} else {
print(paste('Percentage Change:', duration * percent))
print(paste('Dollar Change:', duration * percent * current))
}
}bond2 = new('bond', face = 100, coupon_rate = 0.07, period = 10, yield = 0.05)
price_change_duration(bond2, 0.01)## [1] "Percentage Change: -0.0735104389510859"
## [1] "Dollar Change: -8.4863001433252"
2.4 Problem 5.18
aaa = Quandl("ML/AAAEY")
aaa_yield = subset(aaa, aaa$DATE == '2020-07-30')
yield1 = as.numeric(aaa_yield[2] / 100)
yield1## [1] 0.0141
bond3 = new('bond', face = 100, coupon_rate = 0.03, period = 8, yield = yield1)
bond_price(bond3)## [1] 111.9494
bond_duration(bond3)## [1] 7.189059
\[C=\frac{P(y+\Delta y)+P(y-\Delta y)-2\cdot P(y)}{P(y)\cdot(\Delta y)^2}\]
bond_convexity = function(object) {
current = bond_price(object)
object@yield = object@yield - 0.01
low_yield = bond_price(object)
object@yield = object@yield + 0.02
high_yield = bond_price(object)
object@yield = object@yield - 0.01
return((low_yield + high_yield - 2 * current) / ((0.01 ^ 2) * current))
}bond_convexity(bond3)## [1] 61.69672
price_change_convexity = function(object, percent, increase = TRUE) {
current = bond_price(object)
duration = bond_duration(object)
convexity = bond_convexity(object)
if (increase == TRUE) {
change_percent = - duration * percent + 0.5 * convexity * (percent ^ 2)
} else {
change_percent = duration * percent + 0.5 * convexity * (percent ^ 2)
}
print(paste('Percentage Change:', change_percent))
print(paste('Dollar Change:', change_percent * current))
}price_change_convexity(bond3, 0.02)## [1] "Percentage Change: -0.131441834001406"
## [1] "Dollar Change: -14.7148379204618"
For precision comparison:
price_change_duration(bond3, 0.02)## [1] "Percentage Change: -0.143781178009503"
## [1] "Dollar Change: -16.0962204042305"
bond4 = bond3
bond4@yield = bond4@yield + 0.02
bond_price(bond4) - bond_price(bond3)## [1] -14.77836
3 Appendix: Problem 5.10.3
3.1 Prompt
A $1000 coupon bond with 18 months to maturity pays 8.5% p.a. in semi-annual installments. The interest rate p.a., continuously compounded, over successive six-monthly intervals is given in the table.
| Maturity | Interest Rate |
|---|---|
| 0.5 | 7.2 |
| 1.0 | 7.3 |
| 1.5 | 7.35 |
Find the value of the bond today.
3.2 Solution 1
The present value of the bond is \[\frac{1000\cdot8.5\%/2}{e^{7.2\%\cdot0.5}}+\frac{1000\cdot8.5\%/2}{e^{7.3\%\cdot1}}+\frac{1000+1000\cdot8.5\%/2}{e^{7.35\%\cdot1.5}}\approx1014.179.\] Here, we discount each cashflow generated by the bond according to the interest rate corresponding with the time delay of that cashflow from today.
3.3 Solution 2
The present value of the bond is \[\frac{1000\cdot8.5\%/2}{e^{7.2\%/2}}+\frac{1000\cdot8.5\%/2}{e^{7.2\%/2}\cdot e^{7.3\%/2}}+\frac{1000+1000\cdot8.5\%/2}{e^{7.2\%/2}\cdot e^{7.3\%/2}\cdot e^{7.35\%/2}}\approx1015.13.\] Here, we assume that the interest rate changes over time.
3.4 Textbook References
- Financial Products, An Introduction using Mathematics and Excel - Bill Dalton, pp. 144-145:
- Corporate Finance (4th Ed) - Jonathan Berk, Peter DeMarzo, pp. 217-218: