Stocks rocketed on Wednesday in Wall Street’s best day in 10 years, snapping a stomach-churning, four-day losing streak and giving some post-Christmas hope to a market that has been battered this December.

The Dow Jones Industrial Average shot up more than 1,000 points — its biggest single-day point gain ever — rising nearly 5 percent as investors returned from a one-day Christmas break.

The broader S&P 500 index also gained 5 percent, and the technology-heavy Nasdaq rose 5.8 percent.

But even with the rally, the market remains on track for its worst December since 1931, during the depths of the Depression, and could finish 2018 with its steepest losses in a decade.

What might have pushed stocks over the top was a signal from Washington that the president would not try to oust the chairman of the Federal Reserve.

“The real question is: Do we have follow-through for the rest of this week?” said Sam Stovall, chief investment strategist for CFRA.

Technology companies, health care stocks and banks drove much of the broad rally. Retailers also were big gainers, after a holiday shopping season marked by robust spending. Amazon had its biggest gain in more than a year.

Energy stocks also rebounded as the price of U.S. crude oil posted its biggest one-day gain in more than two years.

But what really might have pushed stocks over the top was a signal from Washington that President Donald Trump would not try to oust the chairman of the Federal Reserve.

In recent days, Trump’s tweet attacks on the Fed and chairman Jerome Powell for raising interest rates stoked fears about the central bank’s independence, unnerving the market.

The partial government shutdown that began over the weekend also weighed on the market, as did personnel turmoil inside the Trump administration, trade tensions with China, the slowing global economy and worries that corporate profits are going to slip sooner or later.

The Dow lost 1,883 points over the prior four trading sessions and is still down 2,660 for December.

Wednesday’s gains pulled the S&P 500 back from the brink of what Wall Street calls a bear market — a 20 percent tumble from an index’s peak. Another day of heavy losses would have marked the end of longest bull market for stocks in modern history — a run of nearly 10 years.

The S&P is now down 15.8 percent since its all-time high on Sept. 20.

All told, the S&P 500 rose 116.60 points Wednesday, or 5 percent, to 2,467.70. The Dow soared 1,086.25 points, or 5 percent, to 22,878.45. The Nasdaq gained 361.44 points, or 5.8 percent, to 6,554.36. The Russell 2000 index of smaller-company stocks picked up 62.89 points, or 5 percent, at 1,329.81.

Trading volume was lighter than usual following the Christmas holiday. Markets in Europe, Australia and Hong Kong were closed.

Among tech stocks, Adobe rose 8.7 percent. Credit card company Visa climbed 7 percent, and Mastercard was up 6.7 percent. Among big retailers, Amazon rose 9.4 percent, Kohl’s 10.3 percent and Nordstrom 5.8 percent.

Most economists expect growth to slow in 2019, though not by enough to slide into a full-blown recession. Unemployment is at 3.7 percent, the lowest since 1969. Inflation is tame. Pay growth has picked up. Consumers boosted their spending this holiday season.

The market apparently got a lift Wednesday when Kevin Hassett, chairman of the White House Council of Economic Advisers, said in an interview with The Wall Street Journal that the Fed chairman is in no danger of being fired.

The president could help restore some stability to the market if he “gives his thumbs a vacation,” Stovall said.

“Tweet things that are more constructive in terms of working out an agreement with Democrats and with China. And then just remain silent as it relates to the Fed.”

AP Economics Writer Josh Boak contributed to this story from Washington.