function v = myfunc(param,m,pa,n,jstr);
m_alt=m;
clear m;
for j=1:11; m_alt(66+j,:)=m_alt(66+j,:)*param(j); end;
for j=1:n;
    x=tseries(mm(2003,1):mm(2013,1),m_alt(:,j));
    xsa=x12(x,Inf,'specfile=',char(jstr(j)));
    xsa=double(xsa);
    msa(:,j)=xsa;
end;
msa=msa-(pa/1000);
v=sum(msa(67:78,:)')'-sum(msa(66:77,:)')';
v=mean((v-mean(v)).^2);