Stocks rose Wednesday after Tuesday's sharp sell-off as oil's continued slide eased concerns about the impact high crude prices while Merck helped lift the Dow after the drugmaker gave a better-then-expected forecast.

The blue-chip Dow Jones industrial average (search) rose 53.65 points, or 0.51 percent, to 10,494.23. The broad Standard & Poor's 500 Index (search) was up 5.74 points, or 0.49 percent, at 1,182.81. The technology-laced Nasdaq Composite Index (search) gained 11.45 points, or 0.54 percent, at 2,126.11.

"The market was reasonably resilient today," said Donna Van Vlack, director of trading at Brandywine Asset Management. "The dollar strengthening was a good thing and investors were clearly impressed with Merck, having expected a worse forecast than what actually came in."

Although a barrel of light crude oil closed at $41.94, up 48 cents, on the New York Mercantile Exchange (search), Wall Street appeared unconcerned. Oil futures had vacillated between $41 and $42 per barrel after the Energy Department said fuel inventories were higher than Wall Street expected.

Investors were encouraged as the dollar gained against the Japanese yen after Japan's government reported slower-than-expected economic growth in its most recent quarter. Analysts had been concerned that the weak dollar could lead to a drop in foreign investment.

"There's just a ton of money coming into the market, and some of the usual year-end shuffling, and it's ignoring the day-to-day ups and downs on oil and everything else," said Matt Kelmon, portfolio manager of the Kelmoore Strategy Funds. "I think the pullback we had over the past few days is good, because it'll help us move higher before the year's out."

Despite a disappointing earnings forecast, Merck & Co. (MRK) made strong gains Wednesday. The drug maker warned that its 2005 profits would be lower than analysts expected due to the withdrawal of its Vioxx arthritis drug from the market earlier this year. However, the forecast could have been worse, analysts said, and Merck rose 80 cents to $28.69 as it reaffirmed its 2004 earnings targets.

Mining and metal stocks weakened as a rebound in the dollar triggered profit-taking across the metals sector, with gold and base metals prices also dropping sharply. Newmont Mining Corp.(NEM) fell 3.2 percent to $43.86 and Freeport-McMoRan Copper & Gold Inc. (FCX) fell 16 cents to $36.08.

Analysts reported more money flowing into mutual funds and other investments thanks to the overall rally that started in November. The extra money should push stock prices up before the end of the year, so long as oil prices stay relatively low and there are no negative surprises in earnings forecasts or economic data.

Texas Instruments Inc. (TXN) fell 95 cents, or 3.8 percent, to $24.05 after the world's largest maker of chips for cell phones said it expects fourth-quarter revenue and earnings per share to be in the middle range of its previous estimates.

Shares of Martha Stewart Living Omnimedia Inc. (MSO) rose $1.55, or 6.8 percent, to $24.43 after the media and merchandising company said its founder would star in a new syndicated television show to air in fall 2005 after completing her jail sentence for lying about a suspicious stock sale.

IBM Corp. (IBM) confirmed the sale of its personal computer business to Chinese PC giant Lenovo for $1.75 billion, part of IBM's shift in focus away from hardware and toward more profitable software, service and consulting businesses. IBM was up 55 cents at $96.65.

U.S. computer makers were mixed on the news, though analysts believed it would take Lenovo time to penetrate the U.S. market. Dell Inc. (DELL) gained 55 cents to $41.86, while Hewlett-Packard Co. (HPQ) fell 6 cents to $21.02.

Shares of Altera Corp. (ALTR), Actel Corp. (ACTL) and Xilinx Inc. (XLNX) fell after Banc of America Securities lowered its investment rating on seven semiconductor stocks to "sell." Actel was down 95 cents, or 5.5 percent, to $16.29. Zilinx lost 1.7 percent to $30.73, Altera 1.9 percent to $22.20.

Shares of Sirius Satellite Radio Inc. (SIRI) dropped $2.11, or 23.4 percent, to $6.90 after Smith Barney lowered its investment rating on the subscription radio company.

AutoZone Inc. (AZO), the nation's largest auto parts chain, surpassed earnings forecasts by 8 cents per share in its latest quarter, but the company's revenues were lower than expected. The company said consumers put off preventive maintenance due to high gasoline prices. AutoZone rose 20 cents to $84.87.

Trading was heavy, with 1.5 billion shares changing hands on the New York Stock Exchange, above the 1.4 billion daily average for last year. About 2.4 billion shares were traded on Nasdaq, well above the 1.69 billion daily average last year.

Advancing stocks led declining stocks on the New York Stock Exchange by about a 3 to 2 ratio, while on the Nasdaq, advancers led decliners by a 9 to 7 margin.

The Russell 2000 index of smaller companies was up 5.65, or 0.9 percent, at 631.15.

Overseas, Japan's Nikkei stock average rose 0.62 percent despite the weak economic data. In Europe, Britain's FTSE 100 closed down 0.52 percent, France's CAC-40 fell 0.33 percent for the session, and Germany's DAX index dropped 0.27 percent.

Reuters and the Associated Press contributed to this report.