NEW YORK - U.S. stocks advanced Thursday, snapping a five-day decline for the Standard & Poor's 500 index, as Spain pledged to cut its deficit, and speculation grew that China's government will do more to support economic growth.
The S&P 500 rose 1 percent to 1,447.15, after slumping 1.9 percent in five days.
The Dow Jones industrial average added 72.46 points, or 0.5 percent, to finish at 13,485.97. Volume for exchange-listed stocks in the U.S. was 5.7 billion shares, or 4.4 percent below the three-month average.
Stocks joined a global rally as Spanish Prime Minister Mariano Rajoy's nine-month-old government announced its fifth austerity package in what may be a move to head off tougher conditions demanded as part of a potential European bailout.
Nine of 10 groups in the S&P 500 rose as technology, energy and raw material shares had the biggest gains. The Morgan Stanley Cyclical Index of companies most-tied to the economy advanced 1 percent.
Commodity producers joined a 1.3 percent rally in the S&P GSCI gauge of raw materials amid speculation that stimulus measures will spur demand from China.
Alpha Natural Resources rose 2.4 percent to close at $6.75. Monsanto advanced 2.1 percent to $91.36.
"The possibility of more Chinese stimulus is real," said Peter Jankovskis, who helps manage more than $3 billion at Oakbrook Investments in Lisle, Ill. "That does provide some hope to the market."
General Electric added 2.9 percent to close at $22.73. Operating earnings at the company's industrial businesses will rise about 10 percent this year, topping the previous forecast for a gain of 5 percent to 10 percent, according to a presentation from the Fairfield, Conn.-based company.
Goodyear increased 3.9 percent to $12.46. Goldman Sachs raised its recommendation to buy from neutral, citing improving replacement tire volume in North America and Europe and lower raw material costs.
Discover Financial Services rose 7.3 percent to $39.71. The credit-card lender that struck a partnership with EBay's PayPal unit posted a fiscal third-quarter profit that beat Wall Street estimates as fewer loans soured.
The KBW Bank Index of 24 stocks added 1.1 percent. Bank of America climbed 1.8 percent to $8.97. JPMorgan Chase & Co. increased 1.1 percent to $40.68.
MetroPCS Communications jumped 6.2 percent to $11.95. The prepaid wireless carrier rose as DealReporter said the company has held talks with suitors such as Sprint Nextel and Dish Network.
Sealy rose 2.3 percent to $2.19 as Tempur-Pedic International agreed to buy it for about $229 million, combining the two biggest publicly traded mattress companies.
The offer is 2.8 percent more than Sealy's closing price Wednesday. Tempur-Pedic will also assume or repay all of Sealy's outstanding and convertible debt, according to a statement.
Knight Capital Group posted its best two-day gain in almost two months after its new ownership structure forced a rebalancing in equity indexes. The stock climbed 2.3 percent to $2.67 after rallying 8.8 percent on Wednesday. A $440 million loss spurred by a trading error Aug. 1 sent the shares plunging 73 percent last month.
Dollar General retreated 1.6 percent to $52. The largest U.S. dollar-store chain reported a 30 million-share secondary stock offering.