Ryland Group Inc.'s (RYL) second-quarter loss narrowed as the home builder and mortgage-finance company reported smaller write-offs and valuation adjustments.

Shares were down 2.3% to $20 in after-hours trading as revenue fell short of analysts' expectations. The stock has been rebounding recently, but is still down by about three-quarters from its high in 2005.

Optimism for home builders has grown amid signs the economy and housing markets are stabilizing. That sentiment was fed nearly two weeks ago, and markets rallied on a Commerce Department report that showed housing starts rose to a seven-month high in June.

Still, concerns remain about mounting job losses and tighter credit. Other challenges include a rising tide of foreclosures that is adding to an already high supply of unsold homes.

Ryland, which last reported a profitable quarter in 2006, posted a loss of $73.7 million, or $1.70 a share, compared with a year-earlier loss of $241.6 million, or $5.70 a share. The latest results included $47.3 million of valuation adjustments and write-offs, while the year-ago quarter included $180.4 million of those charges and a tax charge of $124 million.

Revenue slumped 44% to $272.2 million.

Analysts polled by Thomson Reuters expected a loss of $1.04 a share on revenue of $305 million.

Gross margin fell to 7.8%, excluding items, from 12.5%. New orders slid 16% to 1,716 units, and closings fell 40% to 1,091. The inventory of unsold homes dropped 34% to 448 units.

In the financial-services segment, the company posted a 39% decrease in the number of mortgages originated.

 
   -By John Kell and Jay Miller, Dow Jones Newswires; 212-416-2480; john.kell@dowjones.com