function f=fn3(sigma)
% function for solving chapter 8, number 7,a 
% run as 
%   FMINBND('fn3',.1,.8,[])
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; 
[call,PUT] = BLSPRICE(S0,K,r,T,sigma,0);
f=sum((call-ca).^2);