Matlab → Simulations → Monte Carlo → Antithetic Variable Technique

In antithetic variable technique for variance reduction, the stock price path is constructed in the usual manner with positive and payoff is calculated. Then another path with negative , that is , is constructed, and payoff is calculated again. Finally, average of these two payoffs is calculated, that is

The following Matlab code calculates European-style standard call option price using antithetic variable technique for variance reduction in the Monte Carlo simulation method.

__Monte Carlo using antithetic variable technique in Matlab__

`function call=AntitheticTechnique(s0,k,r,v,t,n)`

st1=s0*exp((r-1/2*v^2)*t+v*randn(n,1)*sqrt(t));

st2=s0*exp((r-1/2*v^2)*t+v*(-randn(n,1))*sqrt(t));

payoff1=max(st1-k,0);

payoff2=max(st2-k,0);

payoff=0.5*(payoff1+payoff2);

call=exp(-r*t)*mean(payoff)

stderr=std(payoff)/sqrt(n)

CI=[call-1.96*stderr,call+1.96*stderr]