NEW YORK – 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 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 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.

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.

The Dow’s gains Friday wiped out much of its losses for the week, but all major indexes still ended the week with losses. The Dow was down 0.6 percent for the week, the S&P 500 was down 0.7 percent, and the Nasdaq lost 1.2 percent.