4703-10-Fall-h5-solu

4703-10-Fall-h5-solu - IEOR 4703 Homework 5 1...

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

View Full Document Right Arrow Icon
IEOR 4703: Homework 5 1. SOLUTION: %Naive Monte Carlo method for K=34, N=300 clear all K=34; S0=35; r=0.05; sigma=0.04; mu=r-sigma^2/2; T=4; N=300; B=randn(1,N); X=mu*T*ones(1,N)+sqrt(T)*sigma*B; S=S0*exp(X); payoff=max(0,S-K*ones(1,N)); X_bar=mean(payoff); stdev=std(payoff); conf=[X_bar-norminv(1-0.05/2,0,1)*stdev/sqrt(N),X_bar+norminv(1-0.05/2,0,1)*stdev/sq r conf = 8.1248 8.8746 %for K=40 conf = 2.6545 3.2719 %Antithetic variate method for K=34, N=300 K=34; S0=35; r=0.05; sigma=0.04; mu=r-sigma^2/2; T=4; N=300; B=randn(1,N); X1=mu*T*ones(1,N)+sqrt(T)*sigma*B; X2=mu*T*ones(1,N)-sqrt(T)*sigma*B; S1=S0*exp(X1); S2=S0*exp(X2); payoff1=max(0,S1-K*ones(1,N)); payoff2=max(0,S2-K*ones(1,N)); 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
payoff=(payoff1+payoff2)/2; X_bar=mean(payoff); stdev=std(payoff); confa=[X_bar-norminv(1-0.05/2,0,1)*stdev/sqrt(N),X_bar+norminv(1-0.05/2,0,1)*stdev/s q confa= 8.7160 8.7528 %for K=40 confa = 3.0900 3.2716 2. SOLUTION: %N=1000 %for K=34 conf = 8.4935 8.9070 confa = 8.7401 8.7718 %for K=40 conf = 3.0082 3.3622
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

4703-10-Fall-h5-solu - IEOR 4703 Homework 5 1...

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

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