Updated from 4:17 p.m. EST

Mixed economic data and noncommittal comments from

Federal Reserve

Chairman Ben Bernanke kept investors in a holding pattern for much of Tuesday's session, but ultimately buyers won out and stocks finished higher.

The

Dow Jones Industrial Average

gained 14.74 points, or 0.12%, to 12,136.45 after having fluctuated on both sides of the unchanged mark throughout the day. The

S&P 500

added 4.82 points, or 0.35%, at 1386.72, and the

Nasdaq Composite

rose 6.69 points, or 0.28%, to 2412.61.

"Investors and traders began to view today as a positive because the smart money knows that's there are a lot of underinvested portfolio managers who need to get their positions up," said Robert Pavlik, chief investment officer with Oaktree Asset Management. "Yesterday's selloff provided the opportunity to buy the stocks they've been eyeing."

About 2.69 billion shares changed hands on the

New York Stock Exchange

. Advancers beat decliners by a 5-to-3 margin. Volume on the Nasdaq was roughly 2.02 billion shares, with losers matching advancers.

By sector, stocks related to energy were the best performers. The Philadelphia Oil Service Sector Index rose 1.7% and the Amex Oil Index was up 1.5%. Transportation stocks were among the hardest hit. The Dow Jones Transportation Average lost 0.7%, and the Nasdaq Transportation Index fell 0.5%.

At midday, traders were paying close attention to Bernanke, who delivered a speech in New York but didn't particularly influence the market to move one way or the other.

Of note, he said that while indicators suggest fourth-quarter gross domestic product growth will likely "be in the same general range that it was in the second and third quarters," the Fed is aware that core inflation "remains uncomfortably high."

Whether any new rate increases are needed "depends on the incoming data and in particular on how these data affect the

Federal Open Market Committee's medium-term forecasts of both inflation and output growth," Bernanke said. Inflation risks, he continued, "seem primarily to the upside."

After his observations, the 10-year Treasury was up 6/32 in price to yield 4.50%. The dollar fell against the euro for the sixth consecutive day.

Wall Street was hit early in the session by a Commerce Department report showing that durable-goods orders fell a greater-than-expected 8.3% in October, the largest drop since July 2000. Economists expected orders to fall 5% after a revised 8.7% surge in September.

To view the latest market video, click here

Dragging down the headline number was a 21.7% decline in transportation. Excluding transportation, orders fell 1.7%.

Ian Shepherdson, chief economist with High Frequency Economics, said that "one bad month does not make a trend, and these numbers have been rising strongly," before cautioning that the number "certainly sets the radar twitching."

Though the durables report led to early selling, the market's mood was tempered somewhat after the National Association of Realtors said existing-home sales unexpectedly rose 0.5% in October to 6.24 million annualized units. Economists expected that sales would fall to 6.14 million homes from 6.18 million in the previous month.

Additionally, the Conference Board said its consumer confidence index fell to 102.9 this month from 105.1 in October. Wall Street had expected the reading to rise to 106.4.

Among the corporate headlines was a massive power deal overseas, where another European utility merger was announced. This time, Spain's Iberdrola has reached a pact to acquire

Scottish Power

(SPI) - Get Report

for more than $22 billion.

In a much smaller link-up in the health care space,

AngioDynamics

(ANGO) - Get Report

agreed to buy

Rita Medical

( RITA) for $220 million. Elsewhere,

ServiceMaster's

(SVM) - Get Report

board has decided to explore strategic options.

One of the big movers was

Palm

( PALM), whose stock sank after it slashed its forecast for the second quarter. Citing the failure to complete certification for its Treo 750 smartphone, Palm said it now expects revenue of $390 million to $395 million for the quarter, down from its earlier guidance of $430 million to $450 million.

The company expects to earn 10 cents to 11 cents a share for the quarter, compared with a previous forecast of 15 cents to 18 cents a share. Palm lost $1.18, or 7.7%, to $14.19.

Energy prices continued their advance, with January crude futures rising another 67 cents to close at $60.99. Metals were mixed as gold gave back $3.30 to $637.30 an ounce, while silver gained 13 cents to close at $13.62 an ounce.

Overnight in Asia, Japan's Nikkei fell 0.2% to 15,855, and Hong Kong's Hang Seng dropped 2.9% to 18,639. In Europe, London's FTSE 100 was down 0.4% to 6025, while Germany's Xetra DAX dipped 0.3% to 6281.