More Videos:

U.S. Economy Shrinks -- Time to Buy Stocks

Tickers in this article: AMZN

NEW YORK ( TheStreet) -- The U.S. economy shrank in the fourth quarter for the first time since 2009, when the country was reeling from the worst financial crisis since the Great Depression.

That startled some investors, who are holding back on pushing the S&P 500 to new multi-year highs today. But the weaker-than-expected headline figure masks true trends in the economy: consumers are spending more freely, companies are generating fatter profits and housing is back in a big way.

The Commerce Department said Wednesday that fourth-quarter gross domestic product fell at an annualized rate of 0.1% , a sharp drop from third-quarter growth in excess of 3%. Most economists were surprised by the contraction.

Still, there are a few surprises in the report that back the bull market in stocks. (Investors put a record $55 billion of cash into stock funds in January as the S&P 500 and Dow Jones Industrial Average touch post-crisis highs.)

Consumer and business spending accelerated in the fourth quarter, even as Hurricane Sandy and the so-called fiscal cliff tempered things. Consumer spending rose 2.2%, compared with 1.6% in the third quarter, while business investment jumped at an annualized rate of 8.4%, reversing a third-quarter decline of 1.8%. Personal income gained sharply ahead of year-end tax increases.

Residential investment spending -- up a whopping 15.3% -- gave support to forecasts of rising home prices and demand .

So what caused the U.S. economy to stall in the fourth quarter?

Federal government spending fell at an annualized rate 15% after a gain of nearly 10% in the third quarter. Notably, defense spending tumbled 22.2%. The White House attributed defense cuts to a looming budget sequester. Meanwhile, inventories and exports turned negative after third-quarter gains.

Diane Swonk, an economist with Mesirow Financial, attributed the drop in defense spending to a pullback from wars in Iraq and Afghanistan and a sharp drop in research, development and weapons testing.

"Frankly, this is the best-looking contraction in GDP you'll ever see," Paul Ashworth, chief U.S. economist at Capital Economics, wrote in a note to clients. "First-quarter GDP growth is going to be pretty weak because of the expiry of the payroll tax cut. But there is nothing in these figures to change our view that U.S. GDP growth will accelerate as this year goes on."

"On balance, this report makes us more bullish," wrote Eric Green, an economist at TD Securities. The report "does nothing to shake our view that GDP will shift into the 2.5% to 3% range over the second half." He added that the headline numbers will likely reinforce the Federal Reserve's accommodative interest-rate policy.

Some investors are thinking the same way. Yields on the 10-year Treasury are now above 2%, a level not seen since April. Meanwhile, stocks are mixed in early trading Wednesday.