Question: please write matlab program for both 2 and 3 given above.Thanks. 2. The Black-Scholes formulas consist of C = Se-N(di) - Ke-N(d), P = Ke=N(-da)

please write matlab program for both 2 and 3 given above.Thanks.
2. The Black-Scholes formulas consist of C = Se-N(di) - Ke-N(d), P = Ke="N(-da) Se-QN(-d1), where In(S/K) +t(r - 9+ o2/2) di dz=dzovt. ovt In the above, o is the implied volatility and N(x) is the edf of a standard normal random variable. Write a MATLAB function to compute the Black-Scholes formulas. function V = BS_Formula(id, K, t, S, sigma, q, r) To calculate N(x) in the formula, use the intrinsic MATLAB function cdf. If id==1, the function is for a call option. Otherwise it is for a put option. We use the following parameters to test: K = 100, S = 100, r=0.03, t= 0.25, O = 0.2 q=0.02, which shall yield following approximations C4.0884, P3.8399 3. In Problem 2, we can compute an option price, V. given an implied volatility, o. In this problem, we compute o given V. Write a MATLAB function to compute the implied volatility of an option under the Black-Scholes model using the secant method. function sigma - volatility_european_formula(id, V, K, t, s, q, r, ... 80, 81, tol, maxn) . V is the option price, and so and si are two initial values. Please place secant.m, BS_Formula.m, and volatility_european_formula.m into a folder named firstname_lastname. Then, compress your folder into a zip file. Finally, upload your project in a single zip file to the dropbox link: Can someone help me write a matlab project for the above problems. Thanks
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
