Stocks closed higher Wednesday after rising toward the end of a pre-holiday session that had investors weighing mixed economic data, the dollar's weak performance and key oil inventory data.

The Dow Jones industrial average gained 27.71 points, or 0.26 percent, to end at 10,520.31. The technology-laced Nasdaq Composite index ended higher 18.26 points, or 0.88 percent, at 2,102.54, while the Standard & Poor's 500 index was up 4.82 points, or 0.41 percent, to end at 1,181.76.

"The two major things that are on the barometer right now are oil and the dollar," said Evan Olsen, head of equity trading at Stephens Inc.

Wall Street was generally encouraged as the latest Energy Department report on petroleum reserves showed flat demand and slight reserve increases in distillates such as heating oil. However, oil futures rose in afternoon trading, with a barrel of light crude quoted at $49.44, up 50 cents, on the New York Mercantile Exchange.

Also Wednesday, investors were hit with a slew of economic data. The Commerce Department reported orders for durable goods — costly manufactured products expected to last at least three years — decreased by 0.4 percent in October from September.

Still, there were some aspects of Wednesday's report that might temper analysts' disappointment. Orders for durable goods in September jumped by 0.9 percent from the previous month, according to revised figures. That turned out to be considerably stronger than the government previously estimated.

In other economic news, new claims for unemployment benefits last week fell by a seasonally adjusted 12,000 to 323,000, a three-month low, the Labor Department reported. The showing was better than economists were expecting. They were forecasting a small rise in new applications. The report suggested that the labor market recovery is gaining traction.

However, the latest reading of the University of Michigan's consumer sentiment index was disappointing. The revised index for November fell to 92.8, compared to the 95.5 reading in October and the 96 reading expected this month on Wall Street.

The dollar fell to fresh lows against the euro and Japan's yen Wednesday. While a falling dollar helps U.S. exports, it can weigh on the market as a whole as foreign investors are dissuaded from investing in U.S. assets.

General Electric Co. (GE) fell 17 cents to $35.64 after it announced it would purchase water treatment company Ionics Inc. (ION) for $1.1 billion in cash, or about $44 per share, plus the assumption of debt. Ionics surged $13.53, or 45.5 percent, to $43.28.

Biogen Idec Inc. (BIIB) and Elan Corp. (ELN) announced that the Food and Drug Administration approved their new drug for the treatment of multiple sclerosis. Biogen climbed $1.16 to $58.59, while Elan was down 3 cents at $27.27.

In earnings news, Hormel Foods Corp. (HRL) gained 51 cents to $30.81 after it managed to beat Wall Street profit forecasts by a penny per share, with rising sales of packaged foods offsetting an increase in expenses. The company's profit forecasts for its first quarter were higher than expected.

Tax preparer H&R Block Inc. (HRB) fell to a loss in its latest quarter due to sluggishness in its mortgage and investment service divisions. The company missed Wall Street expectations by 16 cents per share. H&R Block fell $1.05 to $47.40.

Technology stocks were helped by Internet company gains. Goldman Sachs gave a boost to Web search company Google Inc.'s (GOOG) shares, giving it a $215 price target. Google rose 4 percent, or $7.24 to $174.76, while Yahoo Inc. (YHOO) rose 3 percent, or $1.21 to $37.61 and online marketplace eBay Inc. (EBAY) was up 2 percent, or $2.18 at $111.71.

Apple Computer Inc. (AAPL), maker of iPod, rose a second day after Piper Jaffray raised its price target on the stock to $100 from $52. It was up 4.5 percent, or $2.78 at $64.05.

"Google has a big impact on trader psychology and that is helping eBay and Yahoo," said Michael Metz, chief investment strategist at Oppenheimer & Co.

Chip stocks rose a day after an Advanced Micro Devices Inc. (AMD) executive said computer chip sales have recovered from a "hiccup" caused by anxiety surrounding the presidential election. Advanced Micro was up 1 percent at $21.62 and Intel Corp. (INTC) rose 0.6 percent to $23.51.

Oil producers' stocks rose, reflecting the moderate gain in crude oil prices. Exxon Mobil Corp. (XOM), the world's biggest publicly traded oil company, gained 22 cents to $51.42, while rival ConocoPhillips (COP) advanced 27 cents to $89.97.

Trading volume was 1.1 billion shares on the New York Stock Exchange, well below the 1.4 billion daily average for last year. About 1.5 billion shares were traded on Nasdaq, below the 1.69 billion daily average last year.

The Russell 2000 index of smaller companies was up 4.97, or 0.8 percent, at 629.50.

Overseas, Japan's Nikkei stock average rose 0.21 percent. In Europe, Britain's FTSE 100 closed down 0.48 percent, France's CAC-40 dropped 0.51 percent for the session, and Germany's DAX index gained 0.25 percent in late trading.

Reuters and The Associated Press contributed to this report.