08SimHw7sol

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

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

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)

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

View Full Document
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).
IEOR 4404, Assignment #7 Solutions 3

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 12/20/2010 for the course IEOR E4404 taught by Professor Marianaolvera-cravioto during the Spring '08 term at Columbia.

### 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
Ask a homework question - tutors are online