function V= runasian(r,s,T,K,k)
[v1,v2,sc]=asian(r,s,T,K,k);
V=[V;v1 v2 sc];
for i=1:99
[v1,v2,sc]=asian(r,s,T,K,k);
V=[V;v1 v2 sc];
end
C=cov(V);
b=C(1,2)/C(2,2);
v3=V(:,1)-b*(V(:,2)-mean(V(:,2)));
V=[V v3];
n=length(v3);
plot(1:n, V(:,1))
hold on
plot(1:n, V(:,4),'r')
title('Crude monte Carlo and variance reduced estimates of value of Asian option')
xlabel('simulation number')
ylabel('estimator of value of option')
hold off
figure
plot((1:100),V(:,1).*V(:,3))
title('crude estimator of rho, the derivative of value with respect to r ')
xlabel('simulation number')
ylabel('dV/dr')
hold on
plot((1:100),(V(:,1)-V(:,2)).*V(:,3),'r')
hold off


