FINA 5840: Financial Modeling Assignment 5 (Python代写,香港科技大学代写,FINA5840代写,金融Finance代写)

A down-and-out call option has the following closed-form solution.

联系我们
微信: biyeprodaixie 欢迎联系咨询

本次CS代写的主要涉及如下领域: Python代写,香港科技大学代写,FINA5840代写,金融Finance代写

FINA 5840: Financial Modeling Assignment 5

Halis Sak

Due date: May 18, 2020

Question.A down-and-out call option has the following closed-form solu- tion.

Cdown-out=S 0 ((d 1 )b(1(d 4 )))KerT((d 2 )a(1(d 3 ))),

where d 1 =log(S^0 /K)+(r+

(^12) (^2) )T

p T ,d^2 = log(S 0 /K)+(r^12 ^2 )T

p T , d 3 =log(S^0 K/H (^2) )(r (^12) (^2) )T

p T ,d^4 = log(S 0 K/H^2 )(r+^12 ^2 )T

p T , a=(SH 0 )1+ r ^2 ,and b=(SH 0 )1+ r ^2. ForS0 = 100,r=0. 05 ,=0. 1 ,T=0. 25 ,K= 100,andH= 85,we compute the call option price as 6.3076 using the formula above. a. Please implement the closed-form solution given above in Python to verify that option price for down-and-out call option forS0 = 100,r=0. 05 ,= 0. 1 ,T=0. 25 ,K= 100,andH= 85is 6.3076. Hint. We can modify “BS_EC” function (Page 15 of Lecture 4) to implement above formula (we have new terms a,b,d 3 andd 4 ). b. Please price the same option using the binomial model (see Page 19: Tutorial 1 of Lecture 3). Hint. We already implemented the binomial model for a down-and-out call option. Just change the parameters of the option. And you can setnto 4000. c. Please also use Monte Carlo simulation to price the same option (use d=20000 so that delta_t is equal to 10 ^5 ). Hint. We can modify the Python code for Asian option pricing (Page 20 of Lecture 4). In the outerforloop, we can create a variable named “hit_Barrier” and assign it toFalse. Then, in the innerforloop, we need to check whetherStis smaller thanH(checking whether we hit the barrier,H). If it is the case then we need to assign “hit_Barrier” toTrueand break out of the innerforloop. And finally we can calculate the payoffof the option for forkth Monte Carlo simulation trial just like European Call option (Y[k] = np.exp(-rT)np.maximum(S_t-K,0)) if “hit_Barrier” is equal toFalse.

1