I tried to find the P/E ratio of a stock index. Should I calculate the weighted harmonic mean of all constituents OR select the weighted median P/E ratio as the index's P/E?

many thanks!


1 Answer 1


The preferred method for calculating the P/E of a stock index depends on how that index is calculated and what you are planning to do with it.

Let’s assume the stock index you are looking into is calculated based on the free-float market capitalizations (mcaps) of stocks in it, i.e. the index tracks changes in total free-float mcaps of the stocks in the index.

If you are planning to buy an index fund or report the P/E of an index fund to its investors or form a portfolio with the same index (free-float mcap) weights, then I recommend using the weighted harmonic mean with weights being the index weights. Note that the weighted harmonic mean of the P/E's of the index stocks would be the same as the sum of their free-float mcaps divided by the sum of their free-float ratio-weighted earnings. (This equality can be mathematically proven without much ado.)

To understand why the weighted harmonic mean should be the preferred method if one is buying an index fund, consider the fact that an index fund is quite like a holding company that has the same percentage ownerships in index stocks as the respective free-float ratios of the index stocks. Such a holding company’s mcap would ideally be the sum of mcaps of the stocks weighted by the holding company’s respective percentage ownerships. The holding company’s income statement would show earnings same as the sum of the respective earnings of the stocks, again weighted by the holding company’s respective percentage ownerships. As the P/E of a holding company, like any other company, is normally calculated by dividing its mcap with its earnings, so should the P/E of an index fund, i.e. using the weighted harmonic mean, if you wish to simply buy the index fund’s shares.

If are not buying an index fund but choosing among the stocks in an index like an active fund manager and planning to pay little attention to index weights of the stocks, which would mean that the amount of money you plan to allocate to the purchasing of stocks in the index is much less than total free-float mcaps of the index stocks (say 1% or less), I recommend using the (simple) median P/E of the index stocks.

I don’t think the weighted median is a useful method for measuring the P/E of a stock index. Using the P/E’s as weights is unlikely to give useful results in too many cases including, for example, when a few stocks with significantly high or negative P/Es exist among the stocks in an index. Because the mcaps of stocks are more correlated with their earnings than their P/E's, a median weighted by mcaps is unlikely to give a result representative of most of the stocks in an index frequently.

If you decide to go with the (simple) median, I advise paying attention to how stocks with negative earnings are treated. The median algorithm ranks negative P/E's at the bottom as if they are the cheapest by P/E! As a practical solution, and assuming less than half of all stocks in the index you are considering have negative earnings, I suggest assigning stocks with negative earnings a very high P/E such as 999x by default and calculating the median accordingly.

In general, I don’t recommend simply excluding only all stocks with negative earnings from the P/E calculations because the ratio of stocks with negative earnings may change significantly over time or between indices. Always excluding the same percentage of a number of stocks from the calculations might be more reasonable and provide better results than simply excluding only all stocks with negative earnings when calculating the P/E's of an index at different points in time or of different indices for comparison.

It might be possible to further improve the above methods for the mentioned use cases or come up with new methods for other use cases for a free-float mcap-based index. If the index being dealt with is based on factors other than the free-float mcap, these methods, also with the help of reasonings I have outlined, might still be applied after being modified as necessary.

  • $\begingroup$ Nice, never thought of using median and moving neg. EPS stocks to the top end of the ranking! $\endgroup$
    – oronimbus
    Commented Jan 10, 2023 at 20:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.