Skip to content
All library documents

Calculating the Log Return of a Weighted Stock Portfolio

Article Quant Q&A · Author: Vicky

Summary

The document explains how to calculate a portfolio’s logarithmic return from its value at two consecutive times. With fixed holdings represented by weights, first calculate the weighted sum of component prices at each time, then take the logarithm of the ratio of those portfolio values. This respects the fact that the logarithm of a sum does not generally equal the sum of logarithms.

It contrasts this with arithmetic returns, which aggregate linearly under compatible fixed weights. A weighted sum of individual log returns is therefore not, in general, the portfolio’s log return. The distinction matters when measuring performance or constructing return series: portfolio composition and the definition of weights must be handled consistently across periods. The answer provides the algebraic relationship but does not discuss rebalancing, transaction costs, dividends, or changing share quantities, so those details need separate treatment in a practical implementation.

Key ideas

  • Compute portfolio log return as the logarithm of the ratio of portfolio values across the period.
  • For fixed weights, portfolio value is the weighted sum of component prices at each time.
  • A weighted sum of individual log returns is generally not equal to the portfolio log return.
  • Arithmetic returns aggregate linearly under compatible fixed weights.
  • Rebalancing and other implementation details require additional assumptions beyond the calculation shown.

Tags

Full text
# Calculating portfolio log returns


# Calculating portfolio log returns












I deeply apologize if the question I'm about to ask sounds a bit witless. What is the accurate way to calculate logarithmic return of a portfolio consisting of several stocks? Should it be a sum of logarithmic returns or a logarithmic return of the sum of prices? I must admit that I've never really been into statistics and it's quite confusing. Thank you all in advance!

## Answer by Soumirai (score 3, accepted)

https://quant.stackexchange.com/a/60024

$$ \log{\left(\frac{\sum_i{w_iP_{i,t+1}}}{\sum_i{w_iP_{i,t}}}\right)} = \log{\left({\sum_i{w_iP_{i,t+1}}}\right)} - \log{\left({\sum_i{w_iP_{i,t}}}\right)} \\ \neq \sum_i w_i \log(P_{i,t+1}) - \sum_i w_i \log(P_{i,t}) = \sum_i w_i \log\left(\frac{P_{i,t+1}}{P_{i,t}}\right) $$

Log-returns are not linear. So the log-return of the portfolio would have to be the log of the ratio of the portfolio values (i.e. log of the weighted sum of prices). Standard (arithmetic) returns are linear, so both operations are equivalent (return of the sum, or the sum of the returns. You should be able to prove it easily).

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.