Stocks posted big gains after Federal Reserve Chairman Ben Bernanke said the central bank was ready to step in if the U.S. economy showed further signs of weakening.
Traders were also encouraged by a downward revision in second-quarter economic growth Friday that wasn't as bad as economists had expected.
The Dow Jones industrial average and other indexes all gained more than 1 percent.
Bernanke said in a speech at the Fed's annual conference that while the economic recovery remains tentative, the central bank remains ready to take extra steps to stimulate the economy if necessary, such as buying more debt securities in order to keep interest rates low. He said he still expects the economy to grow next year.
"It could have been worse, and because it wasn't, that was good news," said Alan Gayle, senior investment strategist for RidgeWorth Investments, based in Richmond, Va. "Clearly the bar is being lowered for what constitutes good news these days."
The upturn was a respite from a mainly dismal month on the stock market, which has been falling steadily since its recent high reached on Aug. 9 on a series of poor indicators on the economy. A deep slump in home sales last month was the latest sign that the economy was weakening.
The market stumbled briefly in midmorning after Intel Corp. lowered its revenue estimate. There, too, the news wasn't as bad as it could have been. Intel's shares edged higher after resuming trading since the company's new forecast wasn't as bad as the worst estimates circulating among analysts.
In economic news, the Commerce Department reported that gross domestic product grew at a 1.6 percent rate in the April-to-June period. That's still way down from its earlier estimate of 2.4 percent but not as bad as the 1.4 percent expected by economists.
"These are terrible numbers," Kim Caughey, equity research analyst at Fort Pitt Capital Group in Pittsburgh, said. "But they weren't frighteningly horrible."
Yields on Treasurys, which help set interest rates on loans like mortgages, rose sharply as their prices fell. That could put upward pressure on mortgage rates, which are still at historic lows.
The Dow Jones industrial average rose 164.84, or 1.7 percent, to close at 10,150.65. The Standard & Poor's 500 Index rose 17.37, or 1.7 percent, to 1,064.59 and the Nasdaq composite index rose 34.94, or 1.6 percent, to 2,153.63.
Rising stocks outnumbered falling ones six to one on the New York Stock Exchange, where volume came to 1.1 million shares.
The yield on the 10-year Treasury note rose to 2.64 percent, well above the 2.50 percent it was trading at late Thursday.
A heated-up bidding war between Dell Inc. and Hewlett-Packard Co. also helped to lift shares. The big computer makers are battling to control the data-storage company 3Par Inc. HP fired the latest salvo early Friday, raising its bid for 3Par to $1.88 billion, topping Dell's latest offer by 11 percent.
3Par shares gained $6.43 to $32.46, above HP's latest offer of $30 per share and a sign that investors are hopeful for another counteroffer from Dell. Dell's initial bid for 3Par last week was $18 per share.
Intel was up 19 cents at $18.37.
European shares also moved higher after the better-than-expected figures on U.S. economic growth came out. European shares also got a lift after the Britain raised its estimate of second-quarter economic growth to 1.2 percent from 1.1 percent.
In London, the FTSE-100 index rose 0.9 percent, while the DAX 0.7 percent and the CAC-40 in Paris rose 0.9 percent. In Asia, Japan's Nikkei 225 closed up 1 percent.