Question: Task 5 [30]. Write a computer code for a program that would compute the replicating portfolio values 8.(0), 81(1) at time 0 in a Cox-Ross-Rubinstein
![Task 5 [30]. Write a computer code for a program that](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/10/6703dc17b7670_1996703dc17362b6.jpg)
Task 5 [30]. Write a computer code for a program that would compute the replicating portfolio values 8.(0), 81(1) at time 0 in a Cox-Ross-Rubinstein model in which T 1+r= et at, u = eovat d = e-ovat and A n The payoff to be replicated is the call option, g(s) (s K)+. The input of the program should consist of , o, K, S(0),T, and n. The output should give 8(0),81(0) Run the program for different values of n. You can check the correctness of your program by setting K = 0, which should produce 8(0) = 0,8(1) = 1. (Why?) Note that the program has to compute the values backward from time T to T At, T - 24t, and so on, until time 0. Send your codes in R or Python with results for T = 2, n = 4, S(0) = 100,0 = 0.20. Task 5 [30]. Write a computer code for a program that would compute the replicating portfolio values 8.(0), 81(1) at time 0 in a Cox-Ross-Rubinstein model in which T 1+r= et at, u = eovat d = e-ovat and A n The payoff to be replicated is the call option, g(s) (s K)+. The input of the program should consist of , o, K, S(0),T, and n. The output should give 8(0),81(0) Run the program for different values of n. You can check the correctness of your program by setting K = 0, which should produce 8(0) = 0,8(1) = 1. (Why?) Note that the program has to compute the values backward from time T to T At, T - 24t, and so on, until time 0. Send your codes in R or Python with results for T = 2, n = 4, S(0) = 100,0 = 0.20
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
