By Leah Schnurr
NEW YORK (Reuters) - U.S. stocks edged higher on Wednesday as an early session decline through a key technical level on the S&P prompted buying, despite weak economic data that dimmed hopes for a robust recovery.
Adding to Tuesday's dismal home sales data, new U.S. single-family home sales slumped to a record slow pace in July, while orders for costly durable goods rose far less than anticipated.
"Overall this is still a very careful market," said Quincy Krosby, market strategist at Prudential Financial in Newark, New Jersey.
"Until we see a package of decidedly positive data, this market is going to be vulnerable."
Bank stocks, with their exposure to the housing market, slid for a fifth day in a row on the July home sales data. The KBW bank index <.BKX> briefly hit 42.70, its lowest level in 2010. The index was down almost 1 percent and has lost more than 6 percent in the last week.
Nonetheless, the S&P 500 found support at 1,040, a level closely watched by chartists. The benchmark index hit lows in the 1,040 area in February, May and early June, indicating some investors may see a dip below it as a buying opportunity.
"At a level like 1,040, where a lot of people are watching, you're going to get a little bit of a bounce," said Paul Hickey, co-founder of research firm Bespoke Investment Group in Harrison, New York.
The Dow Jones industrial average <.DJI> added 24.18 points, or 0.24 percent, to 10,064.63. The Standard & Poor's 500 Index <.SPX> rose 3.03 points, or 0.29 percent, to 1,054.90. The Nasdaq Composite Index <.IXIC> gained 12.67 points, or 0.60 percent, to 2,136.43.
Energy shares dragged on the S&P 500 as coal miners dropped on concerns that power plants would switch to natural gas from coal as the price of gas fell.
Massey Energy
Among the laggards in the bank sector, Wells Fargo & Co
Healthcare stocks, among the least sensitive to economy swings, outperformed the overall market.
Coventry Health Care Inc
Both luxury homebuilder Toll Brothers Inc
(Editing by Padraic Cassidy)