ize(ttm,2),M);
Zhat=zeros(N,size(ttm,2),M);
T=zeros(N,size(ttm,2),M);
T1=zeros(N,size(ttm,2),M);
</pre><h2>2. Compute term premia for VAR(1) model<a name="4"></a></h2><pre class="codeinput"><span class="keyword">if</span> get(ns,<span class="string">'lags'</span>)==1;
</pre><pre class="codeinput">  <span class="keyword">for</span> p=1:M
    <span class="keyword">for</span> i=1:N
      Zb(i,:,p)=interp1(simTenor,data.Z(i,:,p)',ttm,<span class="string">'spline'</span>);  <span class="comment">%interpolated qu