Stocks climbed on Tuesday after data showing a sharp rise in consumer confidence suggested the economic downturn was easing and a brokerage upgrade of Apple Inc lifted technology stocks

An index of U.S. consumer confidence in May registered its biggest monthly jump since April 2003, the Conference Board, an industry group, said. However, Americans' mood remained depressed by historical standards.

The stock market, which resumed trading after the long Memorial Day holiday weekend, rebounded from four straight days of losses last week on worries about a possible revision in the United States' credit rating.

People came in ready to buy stocks after the move down last week, said Michael James, senior trader at Wedbush Morgan in Los Angeles. As soon as the consumer confidence numbers came out, everything just took off. Clearly the consumer confidence numbers have had a major impact on the market's overall direction.

The Dow Jones industrial average <.DJI> gained 176.26 points, or 2.13 percent, to 8,453.58. The Standard & Poor's 500 Index <.SPX> rose 19.21 points, or 2.17 percent, to 906.21. The Nasdaq Composite Index <.IXIC> added 51.66 points, or 3.05 percent, to 1,743.67.

Consumer confidence is a widely followed indicator because consumer spending accounts for roughly two-thirds of the U.S. economy.

Apple shares surged almost 6 percent to $129.63 and were the top boost to the Nasdaq after Morgan Stanley said the company will see iPhone-driven growth over the next two years and raised its price target on its stock.

Financial shares also rose, with American Express Co up 3.3 percent to $24.17 after broker Friedman, Billings Ramsey said it expects the company to post a profit for 2009.

The S&P financial sector index <.GSPF> rose 2.4 percent.

Homebuilder DR Horton's shares jumped 5.3 percent to $9.49, making it the top gainer in the Dow Jones home construction index <.DJUSHB>. Data showed prices of single-family homes fell in March from a year earlier, but the pace of decline slowed for a second consecutive month.

The market bounced back from a lower open on geopolitical concerns over North Korea's latest nuclear and missile tests.

The Dow has gained nearly 30 percent and the S&P 500 has risen more than 33 percent since reaching a bear-market low on March 9.

(Reporting by Rodrigo Campos; Editing by Kenneth Barry)