f="#4">4. Conditional Volatility Metrics</a></li><li><a href="#5">5. Rollover Metrics</a></li><li><a href="#6">6. Other Portfolio Summary Metrics</a></li><li><a href="#7">7. Save this financing strategy in main array</a></li></ul></div><h2>1. Debt Stock Metrics<a name="1"></a></h2><pre class="codeinput"><span class="keyword">for</span> j=1:s.nperiod/4
    m.stock.os(:,j,p) = mean(totalStock(:,4*(j-1)+1:4*j),2);    <span class="comment">%average debt stock by year</span>
<span class="keyword">end</span>
</pr