To the bulls, I say: I suppose one must take one's gains where they are to be found. However, you should be aware that the recent rally is built on shaky foundations; indeed, it is the poorer-quality companies that have experienced the largest gains. This has serious implications for all prudent investors.

Outing the "junk rally"
To show that this is a "junk rally," I split the companies in the S&P 500 into five ranked groups based on their Z score. Developed by Edward Altman, a bankruptcy expert at New York University, the Z score predicts bankruptcy risk using market and accounting data. The lower the Z score, the greater the risk of bankruptcy.

For each group, I calculated the average stock return from the end of June and from when the market hit a low on March 9. The following table summarizes some of the results:

Altman Z Score Quintile

Average % Return From June 30

Average % Return From March 9 Market Low

Top Quintile (lowest bankruptcy risk)

9%

50%

Bottom Quintile (highest bankruptcy risk)

15%

104%

S&P 500

8%

47%

Source: Author's calculations based on data from Capital IQ, a division of Standard & Poor's. Note that the interpretation of these results is subject to some caution, because Z scores were only available for approximately two-thirds of the companies in the S&P 500.

As you can see, the companies with the highest bankruptcy risk have produced a much higher average return than those with the lowest risk -- on the order of 2 to 1. Here are some examples of that phenomenon:

Recent Market "Winners"

% Return Since June 30

Z-Score Quintile
(1: Lowest Risk; 5: Highest Risk)

Caterpillar (NYSE:CAT)

40%

5

Ford Motor (NYSE:F)

29%

5

Freeport-McMoRan (NYSE:FCX)

23%

5

Recent Market "Losers"

 

 

Amazon.com (NASDAQ:AMZN)

0%

1

Oracle (NASDAQ:ORCL)

(1%)

2

ExxonMobil (NYSE:XOM)

(3%)

1

Microsoft (NASDAQ:MSFT)

(3%)

2

Source: Author's calculations based on data from Capital IQ.

It's true that the excess returns for lower-quality companies can be partly explained by the fact that this group was also hardest hit in the market decline. However, to quote value guru Jeremy Grantham of asset manager GMO, their resurgence "was excessive and based apparently on unrealistic hopes for a strong, sustained economic recovery."

Investors: Look out below!
A rally built on the weakest companies' stocks contains significant risk, because those stocks are the most sensitive to shifts in sentiment concerning the pace and magnitude of the recovery. Once the market abandons its "unrealistic hopes" for a more rational assessment of economic prospects -- as appears inevitable -- you can expect these stocks to suffer substantial declines, taking broad market indexes with them (at least partially). Investors should consider adjusting their exposure to U.S. stocks accordingly.

Jeremy Grantham's firm, GMO, is forecasting that 'high-quality' U.S. stocks will beat large-cap stocks by more than six percentage points annually over the next seven years. 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. Amazon.com is a Stock Advisor selection and Microsoft is an Inside Value recommendation. Try any of our Foolish newsletters today, free for 30 days. The Motley Fool has a disclosure policy.