U.S. stocks rallied on Thursday as investors grew hopeful about the economic recovery after a surprising quarterly profit from Alcoa Inc and data pointing to a stabilizing labor market.

The three major U.S. stock indexes rose 1 percent, led by Alcoa Inc, up 3.2 percent at $14.65, a day after the Dow component posted its first profit after three consecutive quarterly losses on cost savings and higher aluminum prices.

The S&P materials index <.GSPM> gained 2.5 percent.

The upbeat tone was helped by monthly sales from major retailers, including Macy's Inc , suggesting the stagnant consumer spending could improve before the crucial holiday season.

All hands on deck for the earnings season. Nobody was expecting this quarter's numbers to be very good, so they had already been discounted. Alcoa's earnings announcement proves just that, said Keith Springer, president of Capital Financial Advisory Services in Sacramento, California.

The Dow Jones industrial average <.DJI> was up 102.63 points, or 1.06 percent, at 9,828.21. The Standard & Poor's 500 Index <.SPX> was up 12.27 points, or 1.16 percent, at 1,069.85. The Nasdaq Composite Index <.IXIC> was up 26.45 points, or 1.25 percent, at 2,136.78.

However, Springer said, if the companies fail to show some top-line growth such as increased sales, rather than just profits from cost cutting, investors will get impatient and that could spell the end of the rally.

The S&P 500 is now up 58 percent from its 12-year closing low in March.

The number of U.S. workers filing new jobless claims slid to a nine-month low last week, the U.S. Labor Department reported before Wall Street's opening bell.

U.S. retailers posted their first monthly sales increase in more than a year, which suggested that recession-battered consumers might be regaining their ability and desire to spend again.

Store chains such as Macy's Inc rose 4.4 percent to $19.40 and Abercrombie & Fitch gained 6.3 percent to $34.71.

Kohl's Corp rose 2.4 percent to $59.93. The Standard & Poor's Retail Index <.RLX> added 2.3 percent.

On the Nasdaq, Microsoft was one of the top performers, up 2.8 percent at $25.79.

Shares of natural resources companies also got a lift from the weak U.S. dollar, which propelled gold to a record of $1,058.20 an ounce.

U.S. crude oil futures prices shot up $1.95, or 2.8 percent, to $71.52 a barrel, pushing shares of Chevron up 1.5 percent to $71.56.

On the downside, PepsiCo
shares slipped 1.7 percent to $60.16 after the world's second-largest soft drink maker reported weaker-than-expected quarterly revenue on Thursday. Its profit, however, topped expectations.

(Editing by Jan Paschal)