PDA

View Full Version : Chapter 2, Problem 12


dstefan
06-06-2008, 12:39 AM
Chapter 2, Problem 12

Compute the price, duration and convexity of a two year semiannual coupon bond with face value 100 and coupon rate 8%, if the zero rate curve is given by
r(0,t) = 0.05 + 0.01 \ln{\left(1+\frac{t}{2}\right)}


Solution:

Input: n = 4; t_cash_flow = [ 0.5 1 1.5 2 ]; v_cash_flow= [ 4 4 4 104 ].

Discount factors: disc = [ 0.97422235 0.94738033 0.91998838 0.89238025 ]

Output: Bond price B = 104.173911.

To compute the duration and convexity of the bond, the yield would have to be known. The yield can be computed, e.g., by using Newton's method, which is discussed in Chapter 8.