Subject Engineering MATLAB for Engineering

Question

See Question.pdf

Solution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

clear; clc; close all;
%Solution to 1(a)
u=1.3; d=0.9; p=0.6;
S0=50; n=[100 1000 10000];
T=20; K=60;
E=expayoff(n,T,K,p,u,d,S0);
fprintf('\n\n(a) Expected payoff of Asian Call Option is as follows for different number of tials.\n');
[n' E']
%Solution to 1(b)
r=0.05;
pstar=(1+r-d)/(u-d);
C0=(1/power(1+r,T))*expayoff(n(3),T,K,pstar,u,d,S0);
fprintf('\n\n(b) Price of the option considerng risk neutral probability is %8.4f(n=10000)\n',C0);
%Solution to 1(c)(i)
P=prob0_barrier(n(3),p,u,d,S0);
fprintf('\n(c)(i) Probability for zero payoff under barrier call option is %8.4f(n=10000)',P);
%Solution to 1(c)(ii)
C0_barrier=(1/power(1+r,12))*expayoff_barrier(n(3),pstar,u,d,S0);
fprintf('\n\n(c)(ii) Price of the option considerng risk neutral probability is %8.4f(n=10000)\n\n',C0_barrier);...

This is only a preview of the solution. Please use the purchase button to see the entire solution

$100.00

or $1 if you
register a new account!

Assisting Tutor

Related Homework Solutions

Get help from a qualified tutor
Live Chats