Lennar (LEN) swung to a fourth-quarter loss but sounded a hopeful note for 2007.

The Miami-based homebuilder lost $196 million, or $1.24 a share, for the quarter ended Dec. 31, reversing the year-ago profit of $581 million, or $3.54 a share. Revenue slipped 15% from a year ago to $4.27 billion.

Analysts surveyed by Thomson Financial were looking for an loss of 81 cents a share on sales of $4.15 billion.

The latest quarter includes write-offs of option deposits and pre-acquisition costs of $111.1 million and valuation adjustments of $382.8 million. Lennar said it posted a latest-quarter homebuilding operating loss of $319.4 million, as new orders dropped 6% from a year ago.

"Uncertain market conditions make it difficult to provide a 2007 earnings goal," CEO Stuart Miller said. "While we know that the margin in our backlog will result in lower profitability in the first half of 2007, we believe that if the current environment of strong employment, low interest rates and a healthy economy continues, and the market for new homes demonstrates traditional, seasonal improvement, we will meet or exceed our 2006 earnings of $3.69 per share."

Analysts were looking for $2.61.

More from Stocks

REPLAY: Jim Cramer on How to Navigate the Stock Market Amid Tariff Worries

REPLAY: Jim Cramer on How to Navigate the Stock Market Amid Tariff Worries

Jim Cramer: 4 Stocks Could Get Throttled By a 'Knock Down Drag Out' With China

Jim Cramer: 4 Stocks Could Get Throttled By a 'Knock Down Drag Out' With China

3 Warren Buffett Stock Picks That Could Be Perfect for Your Retirement Portfolio

3 Warren Buffett Stock Picks That Could Be Perfect for Your Retirement Portfolio

50 Stocks That Could Be Shredded If a U.S. Trade War With China Ignites

50 Stocks That Could Be Shredded If a U.S. Trade War With China Ignites

Why Starbucks Latest Data Reveal Should Worry Investors

Why Starbucks Latest Data Reveal Should Worry Investors