(i,:,p)',ttm,'spline');  %interpolated quarterly zero rates
      F(i,:,p)=forward(Zb(i,:,p),ttm);  %compute the forward rates (1-year) 
      X=[];
      
      %Estimate historical rates fitted to VAR model, for term premium computation
      for j=1:12
	if j==1;
	  X=para.B(:,1) + para.B(:,2:end)*data.X(i,:,p)';
	else
	  X=para.B(:,1) + para.B(:,2:end)*X;    
	end
      end
      Zhat(i,:,p)=(H*X)';   %forecasted rates (1-year forward)
      T(i,:,p)=F(i,:,p)-Zhat(i,:,p);    % term premia estimate (model