function f=fn2(sigma,u)
% function for solving chapter 8, number 7,a 
% generate uniform vector u and then run as 
%   FMINBND('fn2',.1,.8,OPTIONS,u)
ca=[173.1000  124.8000   88.5000   53.7000   39.3000   27.3000 17.8500 10.9500  6.2000   3.2500]; % observed prices
K=[950  1005 1050  1100  1125  1150   1175 1200  1225 1250]; % strike prices
T=.3699; S0=1116.84;  r=.01;  % maturity and initial value, interest rates
op=callopt2(u,S0,K,r,sigma,T); 
f=sum((op-ca).^2);
