NEW YORK — Call it the Bernanke Boost.

The stock market, which has been marching higher for a week, got extra fuel Thursday after the 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 past all-time highs. Gold rose. And the yield on the 10-year Treasury note continued to decline as investors bought bonds. Stocks that benefit most from a continuation of ultra-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 still needs “a highly accommodative monetary policy for the foreseeable future.”

He said the U.S. economy needs help because unemployment is high. The remarks seemed to ease investors’ fears that the central bank will pull back on its economic stimulus too quickly.

Stock index futures rose overnight and the market surged at the open Thursday.

“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 S&P 500 index jumped as high as 1,675, above its record close of 1,669 from May 21. The index was up 20 points, or 1.2 percent, at 1,673 as of 3:11 p.m. Eastern Daylight Time.

The index is on track for its sixth straight day of gains, its longest streak in four months.

The Dow rose 154 points, or 1 percent, to 15,445, above its own all-time closing high of 15,409 set May 28.

The Nasdaq composite rose 52 points, or 1.2 percent, to 3,572. The Nasdaq is at its highest since October 2000. It remains well below the all-time high of 5,048 it reached March 10, 2000.

In government bond trading, the yield on the 10-year note fell to 2.58 percent from 2.63 percent Wednesday. The yield has dropped this week. It surged 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 is currently buying $85 billion a month in bonds to keep interest rates low and to encourage spending and hiring.

Among individual companies in the S&P 500, Advanced Micro Devices rose the most after news that it the company is making chips for two big gaming devices. Homebuilders, which are very sensitive to the outlook for interest rates, followed.

D.R. Horton rose $1.84, or 8.7 percent, to $22.89 and Lennar Group climbed $2.93, or 8.5 percent, to $37.49.

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 forecasts that companies in the S&P 500 will report average earnings growth of 3 percent from a year earlier.

The price of gold rose 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. That helped mining stocks. Freeport-McMoRan Copper & Gold rose $1.29, or 4.7 percent, to $28.04. Newport Mining gained $1.42, or 5.3 percent, to $28.02.

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 rose $2.53, or 20 percent, to $15.81, 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.

—Microsoft rose 96 cents, or 2.7 percent, to $35.66, 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.

— Rockwell Medical Technologies Inc. jumped 70 cents, or 18 percent, to $4.46, after the drug developer said an experimental treatment for kidney patients took a step toward winning approval.

— Celgene rose $8.82, or 7.1 percent, $133.90 after the Swiss drugmaker said its cancer drug Revlimid met its goals in a late-stage study.