U.S. stocks edged higher on Thursday, with the S&P 500 getting a lift from the oil sector, but data showing a slowdown in new home sales hurt the shares of retailers and industrial companies.

Crude oil prices rose above $72 a barrel and prompted investors to buy energy stocks such as Exxon Mobil Corp and Chevron Corp.

Meanwhile, the retail sector's weakness was broad. Shares of Home Depot Inc., the biggest U.S. home improvement chain and a Dow component, fell 0.6 percent after the government said new home sales dropped more than expected last month. On Wednesday, a report showed a sharp decline in existing home sales in July.

The government also reported a larger-than-expected decline in orders of durable goods, which are manufactured items meant to last several years.

The reports on home sales and durable goods orders set a negative tone, limiting any attempt for a real rally, said Evan Olsen, head of equity trading at Stephens Inc. in Little Rock. Oil helped some of the major energy names and they helped the indexes a bit.

The Dow Jones industrial average rose 6.56 points, or 0.06 percent, to end at 11,304.46. The Standard & Poor's 500 Index gained 3.07 points, or 0.24 percent, to finish at 1,296.06. The Nasdaq Composite Index advanced 2.45 points, or 0.11 percent, to close at 2,137.11.

A positive note was struck by another Dow component, Johnson & Johnson, which rose 1.8 percent, or $1.17, to $65.08 on the New York Stock Exchange after analysts at UBS raised their price target on the stock to $80 from $73. J&J gave the Dow its biggest boost.

Exxon Mobil was up 1.6 percent, or $1.09, at $70.72 and ranked No. 1 among the stocks lifting the S&P 500. Exxon Mobil also helped push the Dow higher. Chevron was up 1.6 percent, or $1.05, at $66.73 and helped lift the S&P 500.

U.S. crude oil for October delivery rose 60 cents to settle at $72.36 a barrel.

PUTTING THE BRAKES ON HOUSING

Wall Street's mood, though, was marked by worry about slower economic growth and the three major U.S. stock indexes spent most of the day in negative territory.

Home Depot shares fell 0.6 percent, or 21 cents, to $33.41 on the NYSE, while shares of rival Lowe's Cos. Inc. lost 2.7 percent, or 74 cents, to $26.37. The S&P retailing index slid 1.4 percent.

A slowdown in the housing sector has wide implications for the economy, affecting purchases of appliances and other household goods as well as contributing to consumers' sense of wealth.

Sales of new U.S. homes tumbled to a seasonally adjusted annual rate of 1.072 million units, the Commerce Department said, which was below economists' expectations of 1.100 million units.[ID:nN24425659]

CATERPILLAR SLIDES

In another report, durable goods orders fell more than expected in July. But excluding the transportation sector, durable goods orders actually rose last month.

Shares of Caterpillar Inc., the largest U.S. maker of heavy machinery, lost 2.5 percent, or $1.71, to $65.50 on the NYSE. Caterpillar was the biggest drag on the Dow.

Caterpillar also said on Thursday it had settled all pending litigation with heavy-duty truck maker Navistar International Corp. Shares of Navistar closed down 1.3 percent, or 29 cents, at $22.62.

The second-heaviest weight on the Dow was Boeing Co., which fell 1.5 percent, or $1.12, to $75.24.

Names like Caterpillar are suffering from these tempered growth expectations, said Tim Biggam, an options strategist at Man Securities, an options brokerage firm in Chicago.

RELIEF FOR FANNIE MAE

Among the S&P 500's major advancers was Fannie Mae, which rose 4.8 percent, or $2.36, to $51.53 on news that the Justice Department had ended an accounting probe without filing charges against the largest U.S. home funding provider.

On Nasdaq, shares of Apple Computer Inc. rose 0.7 percent, or 50 cents, to $67.81 after the company said it sees no material financial impact from the recall of 1.8 million batteries for its notebook computers. For details, see [ID:nN24242533].

Volume on the NYSE was light, with 1.25 billion shares changing hands, well below last year's daily average of 1.61 billion shares. On Nasdaq, about 1.45 billion shares traded, also below last year's daily average of 1.80 billion.

Advancers outnumbered decliners by a ratio of about 6 to 5 on the NYSE, while on Nasdaq, advancers just barely outpaced decliners. (Additional reporting by Doris Frankel)