Question: please assist for question (b) Question 2 Use Python for this entire question. You noted the following bond information from the US markets. The face

 please assist for question (b) Question 2 Use Python for this

entire question. You noted the following bond information from the US markets.

please assist for question (b)

Question 2 Use Python for this entire question. You noted the following bond information from the US markets. The face value of the bonds is $1,000 Name Maturity Coupon YTM ine Months 12 24 Rate (% 1-0% 1.5% 2.3% 3.8% Bond 1 Bond 2 Bond 3 Bond 4 1 . 6090 2.10% 4.50% 6.50% (a) The information given in the question are saved in a Python list, as shown in Figure 1 Suggest a Python function that can be used to compute bond price and use it to calculate the price of Bond 1 Print the results clearly in your script coupon_rate-[0.01, 0.015, 0.023, .038] ytm[0.016, 0.921, 0.045, 0.065] Figure 1. Bond information stored in Python lists (10 marks) The user-defined function bootstrapping_ rate from_bond evaluates the interest rate at (i +1) in the yield curve, given the following two inputs (i) (ii) The details of a bond with maturity at (i + 1) The yield curve up till time i def bootstrapping rate_from_ bond(coupon_amt, fv, price, T, yc): # Bootstrap the yield curve at (i + 1), given # (i) a bond with maturity at (i + 1) # (ii) the yield curve up till time i. # The bond is described by # coupon-amt paid at each coupon payment date, # fv is the face value of the bond, # price is the bond price # T is the duration of each period cf- [coupon-amt]"(len(yC) cf.append(coupon_amt fv) count for one-cf in cf[1-1]: price-price one_cf/(1 yc[count]T)(count1) countcount +1 r((cff-1]/price)(1/len(cf)) 1)/T # r is the rate at the yield curve at the (i+1) time point return r Figure 2: Function definition of bootstrapping rate from bond (b) Write a for loop to calculate the USD zero coupon yield curve (ZCYC) using the given bootstrapping function and the bond details given in part (a) (10 marks) You observed the following zero coupon yield curve (ZCYC) of the SGD market. 0.5 2.0 Tenor Rate (90) |0.85% | 1.55% | 2.75% | 3.05% Question 2 Use Python for this entire question. You noted the following bond information from the US markets. The face value of the bonds is $1,000 Name Maturity Coupon YTM ine Months 12 24 Rate (% 1-0% 1.5% 2.3% 3.8% Bond 1 Bond 2 Bond 3 Bond 4 1 . 6090 2.10% 4.50% 6.50% (a) The information given in the question are saved in a Python list, as shown in Figure 1 Suggest a Python function that can be used to compute bond price and use it to calculate the price of Bond 1 Print the results clearly in your script coupon_rate-[0.01, 0.015, 0.023, .038] ytm[0.016, 0.921, 0.045, 0.065] Figure 1. Bond information stored in Python lists (10 marks) The user-defined function bootstrapping_ rate from_bond evaluates the interest rate at (i +1) in the yield curve, given the following two inputs (i) (ii) The details of a bond with maturity at (i + 1) The yield curve up till time i def bootstrapping rate_from_ bond(coupon_amt, fv, price, T, yc): # Bootstrap the yield curve at (i + 1), given # (i) a bond with maturity at (i + 1) # (ii) the yield curve up till time i. # The bond is described by # coupon-amt paid at each coupon payment date, # fv is the face value of the bond, # price is the bond price # T is the duration of each period cf- [coupon-amt]"(len(yC) cf.append(coupon_amt fv) count for one-cf in cf[1-1]: price-price one_cf/(1 yc[count]T)(count1) countcount +1 r((cff-1]/price)(1/len(cf)) 1)/T # r is the rate at the yield curve at the (i+1) time point return r Figure 2: Function definition of bootstrapping rate from bond (b) Write a for loop to calculate the USD zero coupon yield curve (ZCYC) using the given bootstrapping function and the bond details given in part (a) (10 marks) You observed the following zero coupon yield curve (ZCYC) of the SGD market. 0.5 2.0 Tenor Rate (90) |0.85% | 1.55% | 2.75% | 3.05%

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!