Updated

Stocks rose Tuesday, with the three major indexes notching their closing highs for the year, as a sharp jump in consumer confidence, a brokerage's upgrade of Amazon.com and oil prices below $42 a barrel fed investors' optimism.

The Dow Jones industrial average (search) ended up 78.41 points, or 0.73 percent, at 10,854.54. The Standard & Poor's 500 Index (search) was up 8.62 points, or 0.72 percent, at 1,213.54. The Nasdaq Composite Index (search) was up 22.97 points, or 1.07 percent, at 2,177.19.

The Dow and the Nasdaq closed at their highest levels in 3-1/2 years, while the S&P closed at its highest since August 2001, as stocks continued a rally that began in the run-up to Christmas, but which had halted on Monday.

"We had a lot of good news — consumer confidence was way ahead of expectations," said Steve Neimeth, portfolio manager at AIG SunAmerica. "Retail sales appear to have picked up in the very last week before Christmas and have met or exceeded the Street's expectations.

"Meanwhile, energy prices are barely rebounding from last week's drop — it appears that our economy is on a sound foundation, energy prices are going lower and the consumer is strong, which should bode well for both consumer spending and corporate profits going into next year."

Investors welcomed the latest reading of the Conference Board (search) consumer confidence index, which rose to 102.3 in December, up sharply from 92.6 in November. Wall Street had expected a reading of 94. In a trading week that traditionally carries little news, the better-than-expected reading was expected to have a greater influence on stocks than usual.

"The numbers were much stronger than expected, and in holiday trading this will certainly help," said Paul Cherney, chief market analyst at Standard & Poor's. "The big concern has been that consumers have not been as aggressive in supporting the economy as they have in the past few years. Investors will now start having confidence in consumers."

While the dollar reached another new low against the euro, falling crude oil futures helped boost investor sentiment and reverse Monday's losses. Oil prices stabilized after falling 7 percent on Monday. A barrel of light crude settled at $41.77, up 45 cents, on the New York Mercantile Exchange (search).

Among retailers posting gains were Wal-Mart Stores Inc. (WMT) the No. 1 U.S. retailer, up nearly 1 percent, or 44 cents at $53.23, and Home Depot Inc. (HD) which said on Tuesday it will begin selling refrigerators and other items online, up 1.4 percent, or 61 cents at $42.84. The S&P index of retailers rose 1.4 percent.

Amazon.com Inc. (AMZN) was upgraded to "outperform" from "peer perform" by Bear Stearns after the company enjoyed a strong holiday shopping season, including setting a single-day sales record. Amazon.com gained $2.38 to $44.63.

Stocks recovered from Monday's dip, when investors worried about the economic impact of the Asian earthquake disaster. Analysts said that while events may cause more pauses in the market's recent rally, the overall upward trend in stocks would likely continue through January.

"The financial impact on the global economy and the U.S. economy is likely to be minimal," said James Wong, senior equity strategist at Payden & Rygel Investment Management, of the quake and resulting tsunamis. "And as for today, the consumer confidence numbers clearly had an impact. It shows the consumer is still very much in the ballgame when it comes to driving the economy."

Blockbuster Inc. (BBI) lost 6 cents to $9.33 after the company said it will make an $11.50-per-share tender offer for rival video rental chain Hollywood Entertainment Corp. if the latter refuses to negotiate a takeover. Hollywood added 7 cents to $13.16 on the news, the latest in a string of merger and acquisition activity that many on Wall Street see as a sign of health in the economy.

Hospital operator Universal Health Services Inc. (UNH) tumbled $1.18 to $44.51 after it cut its 2004 profit forecasts by 10 cents per share, blaming fewer admissions at its acute care hospitals.

Bolstered by a strong holiday season, Swift Transportation Co. Inc. (SWFT) raised its fourth-quarter profit forecasts, citing strong demand for shipping from retailers and higher fuel surcharges. Swift jumped 68 cents to $21.77.

Starwood Hotels & Resorts Worldwide Inc. (HOT) was up 81 cents at $59.46 after the company said its Sheraton hotels in southeast Asia suffered no structural damage from this week's earthquake and tidal waves. The hotelier said its properties there are "operating close to normal."

U.S. chain store retail sales rose 2.7 percent in the latest week due to a surge in spending just before Christmas, a report by the International Council of Shopping Centers and UBS said.

The Russell 2000 index of smaller companies was up 10.23, or 1.59 percent, at 654.57, an all-time record high.

Overseas, Japan's Nikkei stock average rose 0.54 percent, Germany's DAX index was up 0.62 percent and France's CAC-40 gained 0.19 percent for the session. London markets were closed for the Christmas holiday.

Reuters and the Associated Press contributed to this report.