Stocks gained despite further evidence of weakening in the nation's manufacturing sector and continuing concerns over the euro zone debt crisis.
The Dow Jones Industrial Average gained more than 30 points after slipping at the open, and after ending slightly lower on Tuesday amid further signs of economic weakness.
Among Dow components, DuPont gained, while Verizon fell.
TheS&P 500 and the Nasdaq gained slightly. The CBOE Volatility Index, widely considered the best gauge of fear in the market, fell below 18.
Among key S&P 500 stocks, materials and energy gained, while consumerstaples and telecom fell.
A 3.6 percent drop in durable goods ordersin April, released on Wednesday, was the largest drop in six months and the latest in a string of weaker-than-expected economic news, due largely to a fall in aircraft and motor vehicle orders. March durable goods orders were revised up to a 4.4 percent gain from a rise of 4.1 percent.
"Two things take the sting out of the report," said Jeff Kleintop, chief market strategist for LPL Financial. "The number did come in weaker than April, but we had a much stronger March than thought," Kleintop said. And, durable goods orders tend to be weak in the first month of a new quarter, he added.
Still, "this does confirm that there is a little bit of a soft spot related to the ripple effects from the Japanese tsunami and earthquake," Kleintop said.
The market is likely to continue to swing higher and lower from now through summer, he said. By fall the debt ceiling question will be resolved and the economy will have had 9 or 10 months of solid job growth, which should begin to turn the tide on housing, Kleintop said. For the year, he expects the market will post single-digit gains.