Last week, I wrote about the fact that the recent stock market rally was built on the shares of the poorest quality companies, creating a significant risk of a correction. There is, however, a silver lining to that story: Left behind in the euphoria have been the stocks of the highest quality companies, many of which are attractively priced. For investors, high-quality businesses at bargain prices present an exceptional opportunity.

Proving quality is going cheap
To show that this is indeed the case, I use return on capital (ROC) as a measure of quality and the forward price-to-earnings (P/E) ratio as a measure of cheapness. Each company in the S&P 500 is assigned to a quintile based on how it ranks by ROC compared to the other companies in its primary sector (this enables us to pick out the highest quality companies in each sector -- different sectors have different levels of intrinsic profitability).

I then calculated how the different ROC quintiles stacked up in terms of their P/E ratio. The following table summarizes some of the results:

Return on Capital Quintile

Average Forward P/E

Top Quintile

17.0

Second Quintile

21.1

Third Quintile

24.5

Fourth Quintile

29.8

Bottom Quintile

14.2

Source: Author's calculations based on data from Capital IQ, a division of Standard & Poor's.

The table shows that the average stock in the top ROC quintile has a lower valuation than the average stock in all but the bottom ROC quintile. (Furthermore, a ranking of the valuations by sector confirms this is not due to the fact that stocks from sectors that normally sport lower valuations are concentrated in the top ROC quintile.)

Here are some examples of stocks in the top ROC quintile which are ranked in the bottom 40% of their sectors in terms of their price-to-earnings ratio:

Stock

LTM Return on Capital (%)

Forward P/E

Pfizer (NYSE:PFE)

11.4%

7.6

Microsoft (NASDAQ:MSFT)

32.1%

14.3

Intel (NASDAQ:INTC)

8.7%

19.2

Oracle (NASDAQ:ORCL)

15.2%

13.6

eBay (NASDAQ:EBAY)

10.0%

13.9

Hewlett-Packard (NYSE:HPQ)

12.7%

11.2

Bristol-Myers Squibb (NYSE:BMY)

16.9%

10.6

Source: Capital IQ, a division of Standard & Poor's.

Of course, a single ROC figure is a highly imperfect indicator of "quality," but these results support Jeremy Grantham's assertion in his latest investor letter that "The easy winner of the cheapest equity sub-category contest is still high quality U.S. blue chips."

The investing recommendation: Long quality
When the broad market looks overvalued (which it does) and the highest quality segment of U.S. companies looks cheap, investors should consider shifting their exposure from the former to the latter. It will be interesting to see how our top quintile ROC stocks perform over the next one, three, and five years. My hunch is that, as a group, they will outperform the S&P 500, perhaps quite significantly.

Do you want more stock ideas in the same vein? Morgan Housel has identified three high-quality companies that are still cheap.

Quality matters. The team at Motley Fool Inside Value can show you how to build -- and manage -- a portfolio of high-quality company stocks trading at reasonable prices. To find out their top five recommendations for new money now, take advantage of a 30-day free trial today.

Alex Dumortier, CFA, has no beneficial interest in any of the companies mentioned in this article. eBay is a Motley Fool Stock Advisor recommendation. Intel, Microsoft, and Pfizer are Motley Fool Inside Value picks. The Fool owns shares of Intel. Try any of our Foolish newsletters today, free for 30 days. Motley Fool has a disclosure policy.