"Markets can stay irrational longer than you or I can remain solvent."

This is perhaps one of the most famous thoughts of John Maynard Keynes, and it fits the recent market action well.

The economy continues to stabilize, as the credit shock from the fourth quarter of 2008 finally wears off. Even though most economic numbers are still quite weak, market participants have decided to keep their rose-colored glasses on and focus on the positive news -- the now-infamous green shoots -- while largely ignoring the negatives. The S&P 500 was up more than 7% in July, and the more cyclical sectors, including materials, consumer discretionary stocks, industrials, and tech stocks rose the most.

Sector Returns

July 2009

2nd Quarter

1st Quarter

2009 YTD

2008

S&P

7.4%

15.2%

(11.7%)

1.8%

(38.5%)

Energy

4.3%

10.1%

(12.1%)

0.9%

(35.9%)

Materials

13.3%

15.5%

(2.8%)

27.2%

(47.1%)

Industrials

9.2%

18.0%

(21.8%)

0.9%

(41.5%)

Consumer Discretionary

9.4%

17.7%

(8.6%)

17.6%

(34.7%)

Consumer Staples

6.2%

8.9%

(11.3%)

2.5%

(17.7%)

Health Care

5.8%

8.3%

(8.5%)

4.8%

(24.5%)

Financials

8.8%

35.1%

(29.5%)

3.6%

(57.0%)

Information Technology

9.1%

19.4%

4.0%

35.4%

(43.7%)

Telecom

3.6%

1.9%

(8.5%)

(3.4%)

(33.6%)

Utilities

3.7%

8.8%

(11.9%)

(0.5%)

(31.6%)

Source: Standard & Poor's.

Mysterious optimism
As I see it, the stock market is currently pricing in a V-shaped economic recovery. But given U.S. consumers' current behavior -- paying down record levels of debt, suffering high unemployment, and changing their consumption patterns -- that hopeful scenario seems unlikely.

Investors seem to be mistaking what I see as an inventory rebuilding cycle, unlikely to be met by final demand, for lasting economic growth. July's ISM manufacturing index, which came in at 48.9 from 44.8 in June, gave some reasons for optimism, although it remains below 50, the level that indicates real growth. Although the factory sector has contracted for 18 consecutive months, the rate of decline was shrinking, and many see that as an indication that growth is right around the corner. This theory is further supported by the ISM's new orders index, which increased to 55.3 from 49.2; that shows growth in factory orders.

I don't understand how investors view the current earnings picture as "better than expected," given the data. According to Bloomberg, earnings reported for the most recent quarter have declined 33% from their year-ago levels, while sales are down 17% year over year. Those numbers are substantially worse than what we saw in the previous quarter.

But the market is forward-looking, and earnings estimates now call for earnings to rise by 81% year over year in the first quarter of 2010, with revenues increasing by 4.5%. Even though 2010 will make for easy comparisons over weak 2009 results, I believe the stock market is setting itself up for an unpleasant surprise.

The leaders
In particular, this mysterious optimism shows itself in the materials, consumer discretionary, and technology sectors. Materials are a play on the global economic recovery, and especially on China's stimulus program. Consumer discretionary stocks would benefit from an expected recovery in U.S. consumer spending. Technology has shown a strange combination of defensive and cyclical qualities that have worked well in the present environment.

While the Chinese stimulus package has been successful in the literal sense of the word -- it has accelerated economic growth -- the money has gone toward questionable uses in my view. Think about that before you buy shares of BHP Billiton (NYSE:BHP), Rio Tinto (NYSE:RTP), or Freeport McMoran (NYSE:FCX) at current prices, although I generally like all three companies long-term. If the Chinese restocking of commodities is indeed over, as BHP opined recently, we should see a sizable pullback in the sector.

As for consumer stocks, I'm concerned about how consumers are clearly changing their spending habits. U.S. consumers' wages and salaries decreased 0.4% in June, the ninth drop in 10 months. This is also causing them to save a little less, causing the savings rate to drop to 4.6% from 6.2% in May. If there is less income to save from, you save less. The inflation index tied to spending patterns dropped 0.4% year over year, the biggest decrease since records began in 1960.

If that's not deflationary, I don't know what is. This means investors should stay away from weak retailers such as Abercrombie and Fitch (NYSE:ANF) and even Best Buy (NYSE:BBY), which will thrive only if consumers increase their spending again.

Finally, while I liked tech at much lower levels, the sector has now run up a staggering 35% for the year. It's true that Apple (NASDAQ:AAPL) has executed very well lately. Moreover, many large tech multinationals, including Cisco (NASDAQ:CSCO), would benefit from a recovery in emerging markets as well as a lower dollar. Yet both stocks are up even more than the tech sector as a whole, with Apple having nearly doubled. I don't really want to chase tech, here. 

It's certainly possible that the market will rally further from here. But unless the economy starts recovering as strongly as the market thinks it will, stocks won't stay high for very long.

More on market issues:

Start investing today -- just $7 per trade with Scottrade. Or find the broker that's right for you.