See Question.pdf

**Subject Engineering MATLAB for Engineering**

See Question.pdf

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);...

%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

Magnetic Levitation System

$150.00

Magnetic

Levitation

System

Engineering

Matlab

Root

Locus

System

Compensator

Bode

Plots

Control of a Magnetic Suspension System

$350.00

Matlab

Simulink

Control

Magnetic Suspension System

Maglev

Controller

Calculation

Linearization

Engineering

Matlab Code for Sampling Analogue Signal Channels Through Data Acquisition Board

$50.00

Matlab

Sampling Analogue Signal

Channels

Data Acquisition Board

Engineering

Commands

Explanation