联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp

您当前位置:首页 >> Java编程Java编程

日期:2023-09-22 07:02


ISyE 6767 Sys-Computation Finance S. Deng

Homework 2

1. Design Bond class: a bond is a security that makes fixed payments on specific dates, based on the expiration date, frequency of payments, and coupon rate. Header File should include:

? Private elements for expiration date, frequency of payments and coupon rate.

? Add the #ifndef/#define/#endif statements to avoid multiple inclusion.

? Default constructor initializing all private elements to zero, Destructor, Copy Constructor, and another constructor that initializes a bond using

expiration date, frequency of payments, and coupon rate.

? A ToString() function that returns a string description of the bond. Use the std::string class as return type. For example: “Bond (01/01/2020,0.5,0.07)” could be the return of a bond with expiration date on 01/01/2020, a payment each 6 months, and 7% of coupon.

Bond

   Expiration date Frequency Coupon rate

(string) (double) (double)

  Default Constructor

Destructor

Copy Constructor

Constructor (Time, Freq, Coup) ToString()

Implement the class in the main file, creating a default bond and printing its information in the command line. Then create a new semi-annually compounded bond with 7% coupon rate and expiring on November 19th, 2035 and print its characteristics using the ToString() function.

2. Design a Bond Pricing Function for your Bond Class.

When a bond is issued the price is 100, but after that, the price fluctuates according to the interest rate.

The price of a bond is defined as the present value of the cashflows:

????

?????????? = ∑ ????(??????) = ∑ ?????? ? ?????? ??=1 ??=1

?????? = { ????????????, ?????? ???????????????????? ???????? 100 + ????????????, ???????????????????? ????????

Where

The file Bond.xlsx contains an example of how to price a Bond (Exp Date, 0.5, 8%) for 4.2 years to maturity and 7% interest rate, using continuous discount factors. You are asked to implement a pricing function for the Bond class using the above methodology.

3. On Aug 3, 2015, you purchased a security for $98, that will pay you the arithmetic average of an underlying security’s prices observed on Jan. 1 of each year from 2016 to 2020 with the payment made on December 31, 2020. Specifically, the underlying security is a 10-year bond issued on Jan. 1, 2010, which pays semi-annual coupons (Frequency=0.5) of 5% with face value of $100. The time series of the interest rate data is given in the file Bond_Ex3.csv. Was the purchasing of this security a good investment?

?????? (???????????????? ???????????? ???? ??) = ??????????

???????????? = 100(???????????? ????????) ? (???????? ???? ???????? ??????????????)


版权所有:留学生编程辅导网 2020 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp