NEW YORK — Call it the Bernanke Boost.
The stock market, which has been marching higher for a week, got extra fuel Thursday after Federal Reserve Chairman Ben Bernanke said the central bank will keep supporting the economy.
The Dow Jones industrial average and Standard & Poor’s 500 surged to all-time highs. And the yield on the 10-year Treasury note continued to decline as investors bought bonds. Stocks that benefit most from a continuation of low interest rates, such as homebuilders, notched some of the biggest gains.
The chairman made the comments in a speech late Wednesday after U.S. markets had closed, saying the economy needs the Fed’s easy-money policy “for the foreseeable future.”
The U.S. economy needs help because unemployment is high, Bernanke said. His remarks seemed to ease investors’ fears that the central bank will pull back on its economic stimulus too quickly. The Fed is currently buying $85 billion a month in bonds to keep interest rates low and to encourage spending and hiring.
Stock index futures rose overnight. Stocks surged when the market opened Thursday and stayed high for the rest of the day.
“The Fed has made it unequivocally clear that they are not in any hurry to do anything,” said Alec Young, Global Equity Strategist at S&P Capital IQ. “It’s very bullish for stocks.”
The S&P 500 index jumped 22.40 points, or 1.4 percent, to 1,675.02, surpassing its previous record close of 1,669 from May 21. The index rose for a sixth straight day, its longest streak in four months.
The Dow rose 169.26 points, or 1.1 percent, to 15,460.92, above its own all-time closing high of 15,409 set May 28.
The Nasdaq composite rose 57.55 points, or 1.4 percent, to 3,578.30, its highest level in nearly 13 years.
In government bond trading, the yield on the 10-year Treasury note fell to 2.57 percent from 2.63 percent Wednesday. The yield was as high as 2.74 percent Friday after the government reported strong hiring in June. Many traders took that report as a signal that the Fed would be more likely to slow its bond purchases sooner rather than later.
The Fed has also said it plans to keep short-term rates at record lows, at least until unemployment falls to 6.5 percent. Bernanke emphasized Wednesday that the level of unemployment is a threshold, not a trigger. The central bank might decide to keep its benchmark short-term rate near zero even after unemployment falls that low.
“It’s back to the old accommodative Fed, so the markets are happy again,” said Randy Frederick, managing director of active trading and derivatives at the Schwab Center for Financial Research.
The market pulled back last month after Bernanke laid out a timetable for the Fed to wind down its bond-buying program. He said the central bank would likely ease back on its monthly purchases if the economy strengthened sufficiently.
On Thursday, Advanced Micro Devices Inc. was the biggest gainer in the S&P 500 after news that the company will make chips for two big gaming devices. The stock rose 47 cents, or 11.8 percent, to $4.45.
Homebuilders, which are sensitive to the outlook for interest rates, were also among top gainers.
D.R. Horton Inc. rose $1.93, or 9.2 percent, to $22.98 and Lennar Corp. climbed $2.88, or 8.3 percent, to $37.44.
The housing market has benefited from low interest rates because they help make mortgages cheaper.
“The Bernanke qualifications have taken the interest rate risk off the table and now it’s really about what will earnings say,” said Jonathan Lewis, chief investment officer at Samson Capital Advisors.
Corporations began reporting earnings this week for the second quarter, which ended 11 days ago. S&P Capital IQ forecast that companies in the S&P 500 will report average earnings growth of 3 percent compared with the second quarter last year.
The price of gold gained for a fourth straight day, climbing $32.50, or 2.6 percent, to $1,279.90 an ounce. Gold has rebounded this week after falling close to a three-year low.
Gold is rising because the prospect of continued stimulus from the Fed could weaken the dollar and increase the risk of inflation. That, in turn, increases the appeal of gold as an alternative investment.
The rise in gold helped mining stocks. Newmont Mining Corp. gained $1.51, or 5.7 percent, to $28.12. Freeport-McMoRan Copper & Gold Inc. rose $1.24, or 4.6 percent, to $28.53.
In other commodity trading, oil fell back from a 16-month high, dropping $1.61, or 1.5 percent, to $104.91 a barrel.
Among stocks making big moves:
— Bridgepoint Education Inc. rose $3.31, or 26 percent, to $15.92, after the for-profit education company said its Ashford University had won accreditation. Bridgepoint, which also operates the University of the Rockies, struggled with accreditation problems for much of 2012.
— Rockwell Medical Technologies Inc. jumped 59 cents, or 15.7 percent, to $4.35, after the drug developer said an experimental treatment for kidney patients took a step toward winning approval.
— Celgene Corp. rose $9.84, or 7.9 percent, $134.90 after the New Jersey drugmaker said its cancer drug Revlimid met its goals in a late-stage study.
— Microsoft Corp. rose 98 cents, or 2.8 percent, to $35.69, after the company announced a major reorganization. The world’s largest software maker has been struggling with a steady decline in PC demand as people turn to tablets and other mobile devices.