Ground-breaking on new U.S. family homes rose for a fifth month in a row and producer prices tumbled, keeping hopes for economic recovery alive.

The Commerce Department said on Tuesday the number of single-family dwellings under construction, the worst-hit part of the housing market, rose 1.7 percent from June to an annual rate of 490,000 units -- the highest since October.

But a 13.3 percent drop in multifamily home construction projects pushed overall housing starts down 1 percent last month to an annual rate of 581,000 units, retreating after two months of gains.

The economy is recovering, this is the turning corner. We will have positive growth this quarter, but not a lot of strength. It very much looks like a U-shaped recovery rather than V-shaped, said Kurt Karl, head of economic research at Swiss Re in New York.

Stocks on Wall Street ended higher, also boosted by better-than-expected results from retailers Home Depot Inc and Target Corp, which were largely due to cost cutting and a tight control on inventory.

The Dow Jones industrial average gained 0.9 percent to end at 9,217 while the Standard & Poor's 500 index rose 1 percent to 989. Government bond prices fell, losing some of their safe-haven appeal.

Mohamed El-Erian, chief executive of bond fund manager Pacific Investment Management Co, cautioned the rally in U.S. stock markets had topped out as valuations were running ahead of fundamentals.

While data has pointed to the likely end of the recession, which started in December 2007, analysts are wary of a weak recovery as rising unemployment crimps consumer spending.

But there have been some encouraging signs in the labor market, where layoffs are slowing. General Motors said on Tuesday it was increasing production in North America and reinstating 1,350 jobs.

The housing market, the main culprit behind the worst U.S. economic downturn in 70 years, is being closely watched for signs of recovery after a three-year slump.

A survey on Monday showed confidence among home builders rose in August to its highest in over a year.

Home Depot chief financial officer Carol Tome told Reuters in an interview that it was reasonable to believe the U.S. housing contraction was over.

HOUSING RECESSION ENDING

There is mounting evidence that the housing recession is drawing to a close, said Harm Bandholz, an economist at UniCredit Markets and Investment Banking in New York.

While construction activity in the single-family segment has started to pick up, the multifamily segment stays on a clear downward trend. This is the result of ongoing financing problems in the commercial real estate sector and stubbornly high vacancy rates.

Compared to July last year, housing starts dropped 37.7 percent, the U.S. Commerce Department said.

Permits for new building, which give a sense of future home construction, fell 1.8 percent to a 560,000-unit annual pace in July from a month earlier, and were down 39.4 percent from a year ago.

Permits for single-family homes were up 5.8 percent, rising for a fourth straight month in July, a sign the sector would continue to advance.

The inventory of houses under construction fell to a record low 609,000 in July, while the number of permits authorized but not yet started also hit a record low at 102,300.

While the economy appears to be stabilizing, it is far from full health and some economists think a recovery could falter in 2010, reigniting the risk of a deflation -- an economically disabling, broad-based decline in consumer prices.

A report from the Labor Department on Tuesday showed downward pressure on prices remains, even with the economy picking up, allaying fears that massive programs by the government and the Federal Reserve to stimulate the economy might ignite inflation.

The department said prices received by U.S. farms, factories and refineries fell 0.9 percent last month after a 1.8 percent gain in June. Compared with the same period last year, the producer price index was down 6.8 percent.

This report is a timely reminder of the remarkable deflationary forces at work in the economy, said Chris Low an economist at FTN Financial in New York.

Analysts tend to be much too early in looking for inflation after recessions. The PPI is down almost 7 percent from a year ago, suggesting plenty of room for retail prices to fall, too.

Core producer prices, which exclude food and energy costs, edged 0.1 percent lower in July after a 0.5 percent increase in June. The core PPI stood 2.6 percent above its year-ago level.

(Additional reporting by Alister Bull in Washington, and Jennifer Ablan and Daniel Burns in New York; Editing by James Dalgleish)