A weak economic report on durable goods orders also helped to lower bond yields. But continued jitters about the subprime mortgage market and hedge fund woes kept a lid on market gains.
The recent near collapse of two hedge funds owned by Bear Stearns Cos. Inc. with heavy exposure to the subprime market has made investors more adverse to risk taking in recent sessions.
"The market remains in a very nervous state," said Peter Cardillo, chief U.S. market economist at Avalon Partners. "Bailing out hedge funds is not good news for the market."
Still, the Dow Jones Industrial Average recovered from early weakness to gain 43 points at 13,380, as 20 of its 30 stocks advanced, led by the likes of Intel Corp. , 3M Co. , Microsoft Corp. and Exxon Mobil Corp. .
"In the absence of any more subprime time bombs, the change in sentiment should bode well for the stock market for the rest of today," said Frederic Ruffy, analyst at Optionetics.
"Many professionals would like to see the market stage a midweek recovery beginning today because only two and half trading sessions remain in the second quarter," he said.
Leading the gains on the Dow, Merck & Co. Inc. gained 2% after the pharmaceutical giant said that its HIV drug Isentress was granted a priority review status by the Food and Drug Administration.
The S&P 500 index gained 8.3 points to 1,501, while the Nasdaq Composite rose 23.7 points to 2,597.
Oil services shares helped support the broad market as crude oil prices rallied after news that gasoline supplies had dropped in the latest week.
Lifting tech shares on Nasdaq, Oracle Corp. gained 2%. The company quarterly earnings before special items beat expectations, as did its revenue. The profit was 23% above the year-earlier level.
Trading volumes showed 1.2 billion shares exchanging hands on the New York Stock Exchange and 1.5 billion trading on the Nasdaq stock market.
By sector, banks , hardware and oil were weak, while utilities and semiconductors advanced.
Broker/dealers remained higher, with Bear Stearns gaining 2.1%. The firm's Private Equity Fund on Wednesday defended its financial strength, saying it has confronted many storms in its 80-year history.
But some market observers said that hedge funds are selling positions in parts of the markets to cover losses elsewhere.
"Trading activity has been somewhat erratic in recent sessions and that is likely to continue for the time being as investors sort through the many issues facing the market and try to determine the near term direction of equity markets," said Michael Sheldon, chief market strategist at Spencer Clarke.
In a sign of economic weakness, the Commerce Department reported that durable goods orders last month dropped by 2.8%, far exceeding the fall of 1.7% predicated by MarketWatch, amid a 22.7% decline in civilian aircraft orders.
The report's details showed orders for U.S.-made investment goods dropped 3% in May, ending a brief rebound in businesses' capital spending. The figures undercut the theory that business investment would be robust enough to power the U.S. economy out of a slow patch that's lasted more than a year.
The data helped bonds to rally, boosting the case that the Federal Reserve can afford to cut interest rates, a move the bond market would like to see. "The bond-friendly durables plunge sent yields sharply lower to fresh session lows," said Action Economics, in a note.
The benchmark 10-year Treasury note last was up 7/32 at 95-21/32 with a yield of 5.07%.
The Fed, which just started a two-day meeting on interest rates, is widely expected to leave rates unchanged at 5.5%, on Thursday. But investors will parse the accompanying statement for clues about whether a rate increase or cut could be in store in coming months.
Market sees rate cut again
Following the durable goods report, the futures market is again pricing in a cut in interest rates by the end of the year. It's the first time in nearly a month that the futures market is predicting a rate cut.
On Tuesday, Pimco chief investment officer and founder Bill Gross also predicted that the subprime mortgage crisis's impact will spread beyond the housing sector and prompt the Fed to cut rates to stir a flagging economy.
Stocks on the move
Nike Inc. gained 7.2%. The company's fourth-quarter earnings were in line with analysts' expectations, while revenue was a bit above forecast.
Wells Fargo & Co. fell 0.2% The bank has named John Stumpf CEO to replacing Dick Kovacevich, who will retain his chairman's post.
Dow Jones & Co. Inc. , the publisher of this report, remains in the news. News Corp. . Chairman Rupert Murdoch was quoted in a media report saying that he has no plans to raise his $5 billion bid for Dow Jones. He expects Dow Jones controlling shareholders, the Bancroft family, to either approve the deal "in the next two, three weeks' time or not at all," Reuters quoted him as saying.
On Tuesday the company's talks with News Corp. moved ahead as both sides reached a preliminary understanding on a deal to protect the editorial integrity of The Wall Street Journal.
Guitar Center Inc. agreed to be bought by affiliates of Bain Capital Partners LLC, a private investment company, for about $2.1 billion.
Crude oil futures rallied $1.29, or 1.9%, to $69.03 a barrel, after weekly data showed a drop in gasoline inventories.
The durable goods data was negative for the dollar, as it decreases the chances for a Fed rate hike. The dollar last was 0.4% lower against the yen, while the euro fell 0.1% against the dollar.
Gold futures were pressured by the expanding risk-aversion trade, as the August contract gave up 60 cents to $641.90 an ounce.
By Nick Godt