By Fred Imbert, Yun Li and Eustance Huang, CNBC–

Stocks ended sharply higher after a volatile session Friday as Wall Street rebounded from the deep losses suffered in the previous session, the worst since the Black Monday market crash in 1987.

The Dow Jones Industrial Average closed up 1,985 points, or 9.3%. The S&P 500 and Nasdaq also surged 9.3%. The averages posted their biggest one-day gains since October 2008.

“Volatility, I always remind people, means big moves in both directions,” said Randy Frederick, a vice president of trading and derivatives at Charles Schwab. “After as big of a rout as we’ve seen in the last 30 years, it’s not at all surprising to see at least a little bit of a bounce.”

Equities rallied to their session highs after President Donald Trump also said 50,000 new coronavirus tests will be available next week. Trump also said he asked the Energy Department to purchase oil for the U.S. strategic petroleum reserve, boosting oil prices.

Stocks surged on the possibility of fiscal stimulus from the U.S. government and others around the world. Treasury Secretary Steven Mnuchin told CNBC’s “Squawk on the Street” the White House and Congress were nearing a deal. “The president is absolutely committed that this will be an entire government effort, that we will be working with the House and Senate,” Mnuchin said. The Federal Reserve also released more details on its funding measures on Friday.

Before the open, S&P 500 futures hit their “limit up” levels, jumping more than 5%. These limit levels act as a ceiling for buying until regular trading begins and are meant to insure orderly trading.

House Speaker Nancy Pelosi said U.S. lawmakers and the White House were close to a deal on economic relief amid the coronavirus outbreak. “We’ve resolved most of our differences,” Pelosi told reporters Thursday evening, noting it’s about “testing, testing, testing.”

In Germany, the government pledged to spend all the money needed to support the economy amid the outbreak. “We are using all necessary measures to protect workers and companies,” German Finance Minister Olaf Scholz said in a news conference.

Central bank action from around the world also boosted equities. The Bank of Japan injected 500 billion yen as a response to the global market sell-off. Norway’s central bank cut rates by 50 basis points and the Bank of Korea was reportedly in talks over a possible emergency rate cut.

Friday’s action followed the official end of the longest bull-market run in history. The S&P 500 plummeted 9.5% Thursday in its worst day in more than three decades, joining the Dow in a bear market, or more than 20% from its recent peak. The Dow also suffered its worst point drop ever and the biggest percentage decline since 1987.

“It almost seems as if the market has a gravitational force to that Dec. 24, 2018 low,” said Quincy Krosby, chief market strategist at Prudential Financial. “It feels as though the market wants to go back there.”

“That said. there has been indiscriminate selling, which is good thing,” said Krosby. “That’s the kind of panic you wait for.”

The market’s historic drop on Thursday indicated that investors believe the government’s fiscal plans and the Federal Reserve’s ramped-up funding actions wouldn’t be sufficient to offset the economic impact from the coronavirus.

On Friday, the New York Fed said it will start buying Treasurys across all durations, starting with 30-year bonds. These purchases are intended to address highly unusual disruptions in the market for Treasury securities associated with the coronavirus outbreak,” the New York Fed said in a statement.

Investors were bombarded with a slew of negative headlines about the fast-spreading coronavirus. The NCAA has canceled its March Madness basketball tournaments, a day after the National Basketball Association suspended the remainder of its season indefinitely. New York Mayor Bill de Blasio declared a state of emergency, while new restrictions for large events and businesses were imposed.

“These are no doubt jarring times — investors should take this time to review their portfolio and make sure they’re comfortable with their level of risk,” said Mike Loewengart, managing director of investment strategy at E-Trade.

© Getty