</pre></div>
<p>If set to one of “count”, “total”, “value”, or “duration”, gains and losses are computed for the corresponding method.</p>
<div class="sourceCode" id="cb16"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="fu"><a href="../reference/portfolio_compute.html">portfolio_compute</a></span><span class="op">(</span>portfolio_transactions <span class="op">=</span> <span class="va">trx_QZ621</span>, market_prices <span class="op">=</span> <span class="va">mkt_