function Sp = sigmamin(w,Data)
% Minimize the portfolio risk
%
S = cov(Data);
if size(w,2)~=1 && size(w,1)==1,
    w=w';
elseif size(w,2)~=1 && size(w,1)~=1,
    error('w must be a column  vector')
    return
end

Sp = w'*S*w;