程序代写案例-FNCE5353

欢迎使用51辅导,51作业君孵化低价透明的学长辅导平台,服务保持优质,平均费用压低50%以上! 51fudao.top
University of Connecticut, School of Business
Financial Modeling with C#
FNCE5353
Spring 2021
Instructor: Dr. Sateesh Mane
Contact email: [email protected]

© Sateesh R. Mane 2021

_ Please upload your solution to HuskyCT.
1. Please submit your solution as a docx or pdf file.
2. Other _le types will not be accepted.
3. Write your name and PeopleSoft ID and "FNCE5353" and "HW3" to identify
yourself and
the course.
(first name)_(last name)_(PeopleSoft ID)_FNCE5353_HW3.[docx/pdf]
4. Start the answer to each question at the top of a new page in your file.
5. Type (or print) all your answers to the questions.
6. Screenshots (or scanned images, etc.) of handwritten solutions will NOT be
accepted.
_ You may submit multiple updates until the deadline. Only your last
submission is graded.

3.4 Calculations
_ Use Face=100 in all the calculations below.
_ Calculate the fair value, Macaulay duration and modified duration for
various newly issued bonds.
1. Use different values for c, n and y. Set n >= 4 in all cases.
2. Use f = 2 (semiannual coupons) but also try f = 4 (quarterly coupons), etc.
3. Also use zero-coupon bonds.
_ Example cases are:
1. c = 4, n = 4, f = 2, y = … .
2. c = 3.5, n = 5, f = 4, y = … .
3. zero-coupon bond: c = 0, n = 7, y = … .
























1. Set y = 5%
FV = [2 / (1 + 0.025)] + [2 / (1 + 0.025)2] + [2 / (1 + 0.025)3] + [(100 + 2) / (1 +
0.025)4] ≈ 98.1190129
DMac = (1/98.1190129) * {[2 / (1 + 0.025) * 1] + [2 / (1 + 0.025)2 * 2] + [2 / (1 +
0.025)3 * 3] + [102 / (1 + 0.025)4 * 4]} ≈ 3.882610774
Dmod = DMac / (1 + 0.025) ≈ 3.78791295

2. Set y = 2%
FV = [0.875 / (1 + 0.005)] + [0.875 / (1 + 0.005)2] + [0.875 / (1 + 0.005)3] + [0.875 /
(1 + 0.005)4] + [100.875 / (1 + 0.005)5] ≈ 101.8471999
DMac = (1/101.8471999) * [(0.875/1.005 * 1) + (0.875/1.0052 * 2) + (0.875/1.0053 *
3) + (0.875/1.0054 * 4) + (100.875/1.0055 * 5)] ≈ 4.914938656
Dmod = DMac / 1.005 ≈ 4.890486225

3. Set y = 3%
FV = 100 / (1 + 0.03)7 ≈ 81.30915113
DMac = (1/81.30915113) * [100 / (1 + 0.03)7] * 7 ≈ 7
Dmod = DMac / (1 + 0.03) ≈ 6.796116505

_ Calculate the yield using bisection and Newton-Raphson.
1. Denote the target price by Btarget. Use values 80 <= Btarget <= 100.
2. Use a tolerance value of Btol = 10
-2 (one cent).
3. That is to say, iterate to calculate the yield y such that |B(y) - Btarget| <= Btol.
_ Example cases are:
1. c = 4, n = 4, f = 2, Btarget = … .
2. c = 3.5, n = 5, f = 4, Btarget = … .
3. zero-coupon bond: c = 0, n = 7, Btarget = … .
_ Count the number of iterations. In most cases Newton-Raphson should
converge faster.


















1. Set Btarget = 98.11
bisection:
ylow = 0: FV = 2/1 + 2/1
2 + 2/13 + 102/14 = 108
yhigh = 1%: FV = 2/1.005 + 2/1.005
2 + 2/1.0053 + 102/1.0054 ≈ 105.9257435
yhigh = 2%: FV = 2/1.01 + 2/1.01
2 + 2/1.013 + 102/1.014 ≈ 103.9019656
yhigh = 3%: FV = 2/1.015 + 2/1.015
2 + 2/1.0153 + 102/1.0154 ≈ 101.9271923
yhigh = 4%: FV = 2/1.02 + 2/1.02
2 + 2/1.023 + 102/1.024 = 100
yhigh = 5%: FV = 2/1.025 + 2/1.025
2 + 2/1.0253 + 102/1.0254 ≈ 98.1190129
yhigh = 6%: FV = 2/1.03 + 2/1.03
2 + 2/1.033 + 102/1.034 ≈ 96.2829016
|B(y = 5%) – Btarget| = |98.1190129 – 98.11| = 0.0090129 < 10-2 = Btol
The number of iterations under our condition Btarget = 98.11 could be 6.

Newton-Raphson:
y0 = 0: FV = 2/1 + 2/1
2 + 2/13 + 102/14 = 108
DMac = (1/108) * [(2/1 * 1) + (2/1
2 * 2) + (2/13 * 3) + (102/14 * 4)] ≈ 3.888888889
Dmod = DMac / 1 ≈ 3.888888889
f’(y0 = 0) = -3.888888889 * 108 ≈ -420
ΔFV / f’(y0 = 0) = Δy = (98.11 - 108) / (-420) ≈ 2.354761905%
The y needs to increase at least 2.354761905%.

2. Set Btarget = 97.01
bisection:
ylow = 0: FV = 0.875/1 + 0.875/1
2 + 0.875/13 + 0.875/14 + 100.875/15 = 104.375
yhigh = 1%: FV = 0.875/1.0025 + 0.875/1.0025
2 + 0.875/1.00253 + 0.875/1.00254 +
100.875/1.00255 ≈ 103.1016985
yhigh = 2%: FV = 0.875/1.005 + 0.875/1.005
2 + 0.875/1.0053 + 0.875/1.0054 +
100.875/1.0055 ≈ 101.8471999
yhigh = 3%: FV = 0.875/1.0075 + 0.875/1.0075
2 + 0.875/1.00753 + 0.875/1.00754 +
100.875/1.00755 ≈ 100.61118
yhigh = 4%: FV = 0.875/1.01 + 0.875/1.01
2 + 0.875/1.012 + 0.875/1.014 +
100.875/1.015 ≈ 99.3933211
yhigh = 5%: FV = 0.875/1.0125 + 0.875/1.0125
2 + 0.875/1.01253 + 0.875/1.01254 +
100.875/1.01255 ≈ 98.19331186
yhigh = 6%: FV = 0.875/1.015 + 0.875/1.015
2 + 0.875/1.0153 + 0.875/1.0154 +
100.875/1.0155 ≈ 97.01084689
yhigh = 7%: FV = 0.875/1.0175 + 0.875/1.0175
2 + 0.875/1.01753 + 0.875/1.01754 +
100.875/1.01755 ≈ 95.84562681
|B(y = 6%) – Btarget| = |97.01084689 – 97.01| = 0.00084689 < 10-2 = Btol
The number of iterations under our condition Btarget = 97.01 could be 7.

Newton-Raphson:
y0 = 0: FV = 0.875/1 + 0.875/1
2 + 0.875/13 + 0.875/14 + 100.875/15 = 104.375
DMac = (1/104.375) * [(0.875/1 * 1) + (0.875/1
2 * 2) + (0.875/13 * 3) + (0.875/14 * 4)
+ (104.375/15 * 5)] ≈ 5.083832335
Dmod = DMac / 1 ≈ 5.083832335
f’(y0 = 0) = -5.083832335 * 104.375 ≈ -530.625
ΔFV / f’(y0 = 0) = Δy = (97.01 – 104.375) / (-530.625) ≈ 1.387985866%
The y needs to increase at least 1.387985866%.

3. Set Btarget = 93.27
ylow = 0: FV = 100/1
7 = 100
yhigh = 1%: FV = 100 / [1 + (0.01/7)]
7 ≈ 99.00568988
yhigh = 2%: FV = 100 / [1 + (0.02/7)]
7 ≈ 98.02266262
yhigh = 3%: FV = 100 / [1 + (0.03/7)]
7 ≈ 97.05077437
yhigh = 4%: FV = 100 / [1 + (0.04/7)]
7 ≈ 96.08988334
yhigh = 5%: FV = 100 / [1 + (0.05/7)]
7 ≈ 95.13984974
yhigh = 6%: FV = 100 / [1 + (0.06/7)]
7 ≈ 94.20053574
yhigh = 7%: FV = 100 / (1 + 0.01)
7 ≈ 93.27180547
yhigh = 8%: FV = 100 / [1 + (0.08/7)]
7 ≈ 92.35352496
|B(y = 7%) – Btarget| = |93.27180547 – 93.27| = 0.00180547 < 10-2 = Btol
The number of iterations under our condition Btarget = 93.27 could be 8.

Newton-Raphson:
y0 = 0: FV = 100/1
7 = 100
DMac = (1/100) * [100/1
7] * 7 = 7
Dmod = DMac / 1 = 7
f’(y0 = 0) = -7 * 100 = -700
ΔFV / f’(y0 = 0) = Δy = (93.27 – 100) / (-700) ≈ 0.9614285714%
The y needs to increase at least 0.9614285714%.

欢迎咨询51作业君
51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: abby12468