Question: Detailed Instructions: Given the inputs c r , F V , T , r , you are going to evaluate a bond with annual coupon

Detailed Instructions:
Given the inputs cr,FV,T, r, you are going to evaluate a bond with annual coupon payment
Calculate the bond price.
Note that the interest rate given (r=np.array ([.051,.0511,.05112,.0513,.0514])) is NOT a flat yield
curve, so you cannot discount back everything using one same rate
Calculate the bond price
Find out the implicit yield to maturity (YTM)
Calculate the Duration of this bond
Suppose the YTM changed, new_ytm =[0.048,0.0421,0.03912,0.0353,0.0274], what are the
percentage changes / sensitivities in the bond price, %P?
specifically you need to produce an array of %P using your established duration level
Use matplotlib to plot the rates curve given as .051,.0511,.05112,.0513,.0514
Hint:
[IMPORTANT!] Make sure you use PRINT function to check necessary intermediery outputs
To calculate the bond price, you can do it by compute the pv of fv and coupon separtately
think about how to take the summation for array elements?
To calculate the duration, be careful about the weights!!!
To compute the YTM, use numpy_financial (You can use other approches as
well, go find them.)
To gauge the sensitivities of price to YTM, you need to figure out the ????YTM array in the first place
Price_change=delta_ytm*(-Duration)
Part1- Calculate the bond price
Part2- Calclulate the duration
Part3- Find the implicit yield to maturity (YTM) of the
given term structure
Part4- Calculate the price percentage changes %P given
a vector of new YTMs (a new yield curve)
Part5- Plot the Rates using Matplotlib
All done in Python pls
 Detailed Instructions: Given the inputs cr,FV,T, r, you are going to

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!