Python Homework

Question

A.     Implement a function that receives a sequence of spot rates for different maturities (i.e., receives the term structure of interest rates) and returns the associated 1-year forward rates for each maturity. Test your function with the following term structure np.array([0.05, 0.055, 0.07, 0.10]) for years 1, 2,3, and 4.

B.     Implement a function that receives a two-dimensional array (i.e., a 2 x 2 matrix), where in each row of this matrix you have the information about an option-free coupon bond (i.e., a regular coupon bond), and the function returns the forward rate in the bottom part of the interest rates lattice (i.e., the function returns, r1L, r2LL, r3LLL, r4LLLL, and so forth). Test your function with the three option-free coupon bonds we have in the "Callable Bonds" section of the lecture notes.

C.     Since we already implemented the most complicated part, which is pricing a callable bond yesterday in class and you have access to the code now, there is no need for you to reproduce that

Details
No Answers Yet

Have a similar question?