		 + para.B(:,K+2:2*K+1)*data.X(i,:,p)';	
	else
	  X(:,j)=para.B(:,1) + para.B(:,2:K+1)*X(:,j-1) ...
		 + para.B(:,K+2:2*K+1)*X(:,j-2);		
	end
      end
      Zhat(i,:,p)=(H*X(:,end))';
      T(i,:,p)=F(i,:,p)-Zhat(i,:,p);    % term premia estimate (model)
      T1(i,:,p)=F(i,:,p)-Zb(i,:,p);     % term-premia estimate (random walk)
    end  
  end
end


%% 4. Save term premia for relevant points on zero curve
for k=1:M
  TT(:,:,k) = interp1(ttm,T1(:,:,k)',simTenor)';
end


%% 5. Create Plots
makeGraph=0;
if