08SimHw7sol - IEOR 4404 Simulation Prof. Mariana...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
IEOR 4404 Assignment #7 Solutions Simulation 15th November 2008 Prof. Mariana Olvera-Cravioto Page 1 of 7 Assignment #7 Solutions 1. Here is the code for pricing the American option. The simulation point estimate for the price is approximately equal to 14 . 56. %initialization S = zeros(1,21); S(1) = 90; K = 100; T = 20; r = 0.04; sigma = 0.3; v = r - 1/2*sigma^2; payoff = zeros(1,1000); for j = 1:1000 for i=1:T X = v + randn*sigma; S(i+1) = S(i)*exp(X); if i == T if S(T+1) < K payoff(j) = (K-S(T+1))*exp(-r*T); else payoff(j) = 0; end elseif S(i+1) < K a = v*(T-i)-log(K/S(i+1))/(sigma*sqrt(T-i)); p = K*normcdf(-a,0,1)-S(i+1)*exp(-r*(T-i))*normcdf(-sigma*sqrt(T-i)-a,0,1); if p < K - S(i+1) payoff(j) = (K - S(i+1))*exp(-r*i); break; end end end end mean(payoff)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 IEOR 4404, Assignment #7 Solutions 2. (a) Since S 2 ( n ) 1, we expect to generate more than 10 , 000 normals. For parts (b), (c), and (d), we use the following MATLAB code: X=randn(1,100); indicator = 1; n = 100; a = std(X)/sqrt(n); while (indicator == 1) if (a < 0.01) n; indicator=0; else n = n+1; v = randn; X = [X, v]; a = std(X)/sqrt(n); end end n mean(X) std(X) The simulation output we get is: (b) n = 10027 (c) ¯ X = 9 . 0409 × 10 - 4 (d) S 2 ( n ) = 1 . 0013 (e) These results are not surprising since we know that the sample mean and sample variance are unbiased estimates of the mean and variance of the original distribution (i.e., the standard normal which has mean 0 and variance 1).
Background image of page 2
IEOR 4404, Assignment #7 Solutions 3
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 7

08SimHw7sol - IEOR 4404 Simulation Prof. Mariana...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online