%FINANCIAL MODELS %Homework 8, due Thursday Nov. 1st %Use of Excel spreadsheet or MATHLAB is recommended. %Average (Asian) option: clear n = 1000; Call = zeros(n,1); Asian = zeros(n,1); Sbar = zeros(n,1); for j=1:n S0 = 50; S = zeros(n,1); vol = .3; rCont = .05; K = 51; T = 1; dt = 1/250; %?S/S = ( 0.05 – 0.5 ?2 ) ?t + (? ??t ) dW(t) in other words at each %increment of timeS(t+ ?t) – S(t)]/S(t) has a normal distribution with %mean = ( 0.05 – 0.5 ?2 ) ?t and Variance = ?2 ?t mean = (0.05-0.5*vol^2)*dt; var = vol^2*dt; pcntChng = normrnd(mean,var^.5); S(1) = S0*(1+pcntChng); for i=2:T*250 pcntChng = normrnd(mean,var^.5); S(i) = S(i-1)*(1+pcntChng); end Call(j) = max(S(i)-51,0)*exp(-rCont*T); Asian(j) = max(sum(S)/(T*250)-51,0); Sbar(j) = sum(S)/(T*250); end Call_Price = sum(Call)/n Asian_Price = sum(Asian)/n Estimated_Mean_Average_Stock_Price = sum(Sbar)/n Estimated_Stdev_Average_Stock_Price = std(Sbar) hist(Sbar) title('Histogram: Average Stock Price') %SAMPLE OUTPUT: %pricingHW8KittisakPattamasaevi %Call_Price = % 5.1628 %Asian_Price = % 2.9272 %Estimated_Mean_Average_Stock_Price = % 49.9560 %Estimated_Stdev_Average_Stock_Price = % 8.6839