Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Financial Engineering Project Course Summer 2002 Project 1 Due: Friday, May 31 In this project you will write a Java class that incorporates some of the important characteristics of a fixedrate bond. Your Java class will provide two instance methods: /* Construct a fixed-rate bond object */ public FixedRateBond(double principal, double lifeInYearsRemaining double couponInterestRatePerYear, double numCouponsPerYear) /* return the theoretical price of this bond */ public double priceOf() Your Java class will provide a main routine that will create a Bond object with the following values: Principal = 100 Million Life in years = 2 Coupon = 6% per annum Coupons paid semiannually Your priceOf() method will compute the theoretical price of the bond. According to Hull, “the theoretical price of a bond can be calculated as the present value of the cash flows received by the owner of the bond using the appropriate zero-coupon interest rates as discount rates”. The price of the bond can be computed as the sum n Bfix =( Σ k * e-riti ) + (L * e-rntn) i=1 where k is the fixed coupon payment, ti is the time until the ith payment is received ( 1 <= i<= n), ri is the LIBOR zero rate for a maturity at ti, L is the principal. In order to compute this sum, you will need a table of LIBOR zero rates to compute the values for r i. Write an additional Java class called CurrentLIBORRateTable that can be used to represent a table of current LIBOR rates. The LIBOR rate table will associate a particular month with a particular LIBOR rate (with continuous compounding). For example, if the LIBOR rate table associates month 3 with a LIBOR rate of 4.2% then the call CurrentLIBORRateTable.getRate(3) would return 4.2. The private data within this class will be organized as follows: private static double values[] = { 0.05, 0.058, 0.064, 0.068 }; private static int months[] = { 6, 12, 18, 24 }; So, in our example, the theoretical price of the bond will be 3e-0.05 * 0.5 + 3e-0.058 * 1.0 + 3e-0.064 * 1..5 + 103e -0.068*2.0 = 98.39 Turn in a printout of your documented solution. Comments must include your name, assignment number and a description of each member of your class. Also attach printouts of your DOS screen when the main routine is run.