The U.S. dollar firmed across the board on Wednesday and stocks eked out slight gains, adding to this year's big rally, after much better-than-expected business activity in the U.S. Midwest bolstered hopes of recovery.

All three major U.S. indexes turned positive just as the session ended, pushing the Dow and Nasdaq to fresh closing highs for 2009 after U.S. stocks were lower for much of the day.

European shares snapped a six-day winning streak in thin trade and Japan's Nikkei slipped 0.9 percent in its final 2009 session.

The late rally put the benchmark S&P 500 index, along with European shares, on track to post annual gains of about 25 percent after the Nikkei banked a 19 percent gain for 2009.

Oil rose for a sixth day as a mix of cold weather and declining U.S. crude and fuel inventories lifted prices to near $80, all but ensuring this year's gain will be the best in a decade for crude.

The dollar, which climbed to its highest since early September against the Japanese yen, rallied as investors looked for signs that economy is improving. Some traders moved to safer assets like the dollar to lock in profits after a strong 2009.

Volumes were thin before the new year, adding to price swings. Japanese markets will be closed on Thursday and Friday, while European and U.S. markets will close on Friday.

The trading ranges have been quite large today. It's end-of-the-year positioning and fund managers are closing their portfolios, said Amelia Bourdeau, senior currency strategist at UBS in Stamford, Connecticut.

There's also the view that the U.S. is recovering and this month, we've seen strong U.S. data support the dollar, she said.

The Dow Jones industrial average rose 3.10 points, or 0.03 percent, to end at 10,548.51. The Standard & Poor's 500 Index added just 0.22 of a point, or 0.02 percent, to finish at 1,126.42. The Nasdaq Composite Index gained 2.88 points, or 0.13 percent, to close at 2,291.28.

SOME WARMTH FROM ISM-CHICAGO

A report from the Institute for Supply Management-Chicago bolstered the view of recovery, analysts said. The ISM-Chicago business barometer surged to a four-year high, exceeding economists' forecasts, on a recovery in employment and an acceleration of new orders.

But data in Europe showed that euro-zone money supply posted a surprising drop in November and loans to households and companies fell for the third month running. The data was a warning to the European Central Bank that it must tread carefully with its exit strategy.

The FTSEurofirst 300 fell 0.4 percent to end at 1,043.24 points, pulling back from a 15-month closing high on Tuesday. The index is on track for its best year since 1999.

Concerns about Japan's fiscal health weighed on the yen after rating agency Standard & Poor's said Japan's credit rating could be in danger if policy initiatives fail to stabilize and gradually reduce the country's debt burden.

The dollar is gaining some traction and extending gains from yesterday, said Kathy Lien, director of currency research at GFT Forex in New York.

The dollar was up against a basket of major currencies, with the U.S. Dollar Index up 0.10 percent at 77.910.

The euro was down 0.13 percent at $1.4334.

Against the yen, the dollar was up 0.47 percent at 92.43. Earlier, the dollar reached 92.77 yen, its highest since September 8.

U.S. Treasury prices were little changed following a $32 billion auction of seven-year notes as low trading volume countered a positive take on the auction's outcome.

The benchmark 10-year U.S. Treasury note was up 2/32 in price to yield 3.79 percent.

OIL GAINS, GOLD RETREATS

U.S. crude for February delivery rose 41 cents, or 0.52 percent, to settle at $79.28 a barrel, briefly touching a five-week high of $79.80. But crude failed to top the psychologically important $80 level. Prices have risen for nine of the last 11 sessions, gaining 14 percent in just over two weeks.

London Brent crude rose 39 cents to settle at $78.03.

The lack of volume is exaggerating some of the moves. The bulls may want to try and test $80 and see if there is any traction, said Gene McGillian, analyst at Tradition Energy.

Gold fell as the dollar rose on signs the U.S. economy is on a path to recovery, denting gold's appeal as a hedge against a further weakening of the greenback.

U.S. February gold futures fell $5.60 to settle at $1,092.50 an ounce in New York.

Asian stock markets fell as year-end trade dwindled, with profit-taking pulling down shares.

The MSCI index of Asia Pacific stocks outside Japan edged up 0.05 percent to 411.63, below its 2009 high set in November, but still up nearly 66 percent this year.