Question: (a) Create a function called BondPV that returns the present value of a bond and takes as arguments the number of years to maturity, the

 (a) Create a function called BondPV that returns the present value

(a) Create a function called BondPV that returns the present value of a bond and takes as arguments the number of years to maturity, the yield-to-maturity, the (annual) coupon rate, and the bond's face value (principal). Test your function. For example, one test would be to verify that BondPV returns the face value of the bond any time that the coupon rate and yield-to-maturity are equal. (b) Consider two bonds, Bond A and Bond B. Each bond has a coupon rate of 5% and a face value of $1,000. Bond A has a maturity of 10 years from today, and Bond B has a maturity of 30 years. On one set of axes, use BondPV to graph the relationship between yield-to-maturity and bond price (present value). Put yield-tomaturity on the x-axis and price on the y-axis, and consider values of yield-to-maturity from 1% to 9%. Your graph should contain two lines/curves: one for Bond A, and one for Bond B. Comment on the nature of the relationship: If yields go up 1%, what happens to prices? Which bond's prices go up/down more? Is the relationship linear? If not, is it convex or concave? (c) Suppose you have invested in a bond and want to know how sensitive your investment is to a change in yields, that is, you want to understand how sensitive the returns of the bond are to changes in yields. Use BondPV to estimate the quantity 7 yryPyPy+yPy, where y is the yield, Py denotes the price of the bond at that yield, for both Bond A and Bond B, for yields between 1% and 9%. Graph your results on a new set of axes, that is, graph the yield-tomaturity y on the x-axis and yr on the y-axis. Which bond is more sensitive to a change in yields, Bond A or Bond B? Given that the only difference between them is their maturity, what do you suspect is true about the returns sensitivities of longer maturity bonds versus shorter maturity bonds? (a) Create a function called BondPV that returns the present value of a bond and takes as arguments the number of years to maturity, the yield-to-maturity, the (annual) coupon rate, and the bond's face value (principal). Test your function. For example, one test would be to verify that BondPV returns the face value of the bond any time that the coupon rate and yield-to-maturity are equal. (b) Consider two bonds, Bond A and Bond B. Each bond has a coupon rate of 5% and a face value of $1,000. Bond A has a maturity of 10 years from today, and Bond B has a maturity of 30 years. On one set of axes, use BondPV to graph the relationship between yield-to-maturity and bond price (present value). Put yield-tomaturity on the x-axis and price on the y-axis, and consider values of yield-to-maturity from 1% to 9%. Your graph should contain two lines/curves: one for Bond A, and one for Bond B. Comment on the nature of the relationship: If yields go up 1%, what happens to prices? Which bond's prices go up/down more? Is the relationship linear? If not, is it convex or concave? (c) Suppose you have invested in a bond and want to know how sensitive your investment is to a change in yields, that is, you want to understand how sensitive the returns of the bond are to changes in yields. Use BondPV to estimate the quantity 7 yryPyPy+yPy, where y is the yield, Py denotes the price of the bond at that yield, for both Bond A and Bond B, for yields between 1% and 9%. Graph your results on a new set of axes, that is, graph the yield-tomaturity y on the x-axis and yr on the y-axis. Which bond is more sensitive to a change in yields, Bond A or Bond B? Given that the only difference between them is their maturity, what do you suspect is true about the returns sensitivities of longer maturity bonds versus shorter maturity bonds

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!