NEW YORK -- Stocks ended an erratic session with a slender gain Wednesday as rising commodities prices offset disappointment over an unexpected drop in home sales.
Gains in commodities drove the shares of energy and materials-producing companies higher, lending support to the overall stock market. Gold, oil and other commodities rose as the dollar dropped.
The Commerce Department said sales of new homes plunged 11.3 percent in November to their lowest level since March. Economists had forecast an increase, and the news came a day after stocks climbed higher on a separate report showing a better-than-expected gain in sales of existing homes last month.
Stock trading has been choppy over the past few weeks as investors' optimism about the recovery surged and then ebbed. On Monday, the market rallied as corporate mergers raised investors' confidence. Wednesday's trading showed how uncertain investors really are.
Volume was light as investors closed up shop ahead of the Christmas holiday. The market will be open a half day today and will be closed Friday.
Those still trading aren't making any major moves as the year winds to a close. The Standard & Poor's 500 index is now up 24.1 percent for the year.
"People are not doing any new trading," said Benny Lorenzo, CEO of New York-based Kaufman Brothers. "They are just holding on to their gains for the year."
The Dow Jones industrial average rose 1.51, or 0.01 percent, to 10,466.44. The Standard & Poor's 500 index rose 2.57, or 0.2 percent, to 1,120.59, while the Nasdaq composite index gained 16.97, or 0.8 percent, to 2,269.64.
The ICE Futures U.S. dollar index, which measures the dollar against other currencies, tumbled 0.5 percent. The decline in the dollar makes commodities cheaper for foreign buyers. Oil surged more than 3 percent, rising $2.27 to $76.67 a barrel on the New York Mercantile Exchange. Gold prices also rose.
Stocks started out modestly higher on Wednesday after the Commerce Department reported that personal income rose at the fastest rate in four months. That enabled Americans to increase their spending for the second straight month. Personal incomes rose 0.4 percent, helped by higher wages, while spending rose 0.5 percent. Both figures fell slightly short of the market's expectations.
Tim Courtney, chief investment officer at Burns Advisory Group, said Wall Street's mild reaction to Wednesday's economic data may be a reflection of the fact that there are few appealing alternatives for investors right now.
The cost of buying a 10-year Treasury note to lock in yearly gains just above 3.5 percent does not provide as much value as stocks whose gains could be sharply higher, he said. Gains on Treasurys could be further eroded if inflation starts to pick up as the economy recovers.
Reflecting investors' indecisiveness, bond prices were little changed Wednesday following three days of declines. The yield on the benchmark 10-year Treasury note held steady at 3.76 percent.
Three stocks rose for every one that fell on the New York Stock Exchange, where volume came to an extremely slow 785.9 million shares, down from 955.5 million on Tuesday.
Trading volume on the New York Stock Exchange has been especially light throughout the month, which can exaggerate price swings.
The Russell 2000 index of smaller companies rose 7.38, or 1.2 percent, to 630.98.
Overseas, Britain's FTSE 100 gained 0.8 percent, Germany's DAX index gained 0.2 percent, and France's CAC-40 rose 0.3 percent. The DAX and CAC-40 both hit highs for the year earlier in the day. Markets in Japan were closed for a holiday.