U.S. markets remained testy Thursday, as the Dow Jones industrial average extended its streak of 1,000-point swings to nine sessions. The blue chips clawed into the plus column as investors digested various government formulas aimed at limiting the economic damage from the coronavirus.

Markets twitched all day following overnight announcements of a 750 billion euro bond-buying program by the European Central Bank to offset the economic pain in the euro zone and a special Federal Reserve backstop for money market mutual funds, typically a risk-free place for investors to store cash. This marked the Fed’s seventh major emergency action this week.

The interventions failed to quell the uncertainty, as stocks rocked back and forth. Investors are struggling to puzzle their way through the daily medical, financial and government briefs around the coronavirus.

“My biggest concern is nobody, not even the medical experts, have any clue to how long this gets worse before it gets any better, and what the magnitude of the economic decline is going to be,” said Liz Ann Sonders, chief investment strategist at Charles Schwab. “There is no question we are in a recession.”

The Dow held on to a nearly 190-point gain, just shy of 1 percent, to close at 20,087. A rollicking session on Wednesday had shaved more than 1,300 points off the blue-chip index, erasing nearly all Trump-era gains and pushing the benchmark below 20,000 points for the first time in three years.

The Standard & Poor’s 500 index inched up 0.5 percent, to close around 2,409. Technology stocks — which had powered the market until the recent retreat — breathed some gains into the Nasdaq composite. It surged more than 2.3 percent. All three major U.S. indexes are in a bear market.

Most of the S&P sectors were positive, with consumer discretionary, energy and technology among the winners. Energy got a boost from a record jump in oil prices. The Dow’s blue chips were led by McDonald’s, Walt Disney and Goldman Sachs. Walgreens Boots Alliance and Coca-Cola fell 8 percent and 7 percent. Microsoft and Google-parent Alphabet helped fuel the Nasdaq as technology shares have been one of the few corners of good news lately.

Oil roared, spiking more than 25 percent Thursday, with West Texas intermediate crude selling for $25 a barrel. The surge arrived one day after oil prices slid to an 18-year low amid continued uncertainty over the duration of the coronavirus shutdown. The respite comes after weeks of declines on reports that U.S. companies are cutting costs and curtailing the number of rigs. The upshot will reduce the amount of oil flowing to an already-oversupplied market.

Oil prices, however, remain on track for one of their biggest monthly declines. The pain is being reflected in the stock market, where shares of the supermajors — ExxonMobil, Chevron, BP — are a fraction of their price two months ago. Chevron and ExxonMobil gained 4 percent on the price news.

“Part of today’s bounce is from the aggressive spending cuts by U.S. oil companies,” said John Kilduff of Again Capital. “Continental Resources, Chesapeake, ExxonMobil, Chevron and BP are all cutting back on spending. Investors like it.”

Kilduff said the spending will also curtail the number of oil production rigs in the United States. “You are going to see an immediate decline in output,” Kilduff said. He added that the Saudis have announced a “transportation fee” that may help elevate world oil prices.

American workers are getting laid off at an unprecedented pace as the coronavirus outbreak shuts down much of the economy, with more than a million expected to lose their jobs by the end of March, economists say. Ball State University economist Michael Hicks predicts this month could be the worst for layoffs in U.S. history, a drastic reversal in a period of otherwise historically low unemployment.

Workers in hardest-hit industries — travel, hospitality, retail, restaurants — are often lower-paid and less likely to be insured, Hicks said.

“Though we don’t have data available on benefits, it is near certain these workers are in occupations well known to have lower incidence of sick days, stable work hours and other forms of workplace benefits,” Hicks said in comment emailed to The Post. “This makes staying home from work and accessing medical treatment (or even diagnosis) difficult for infected workers. And, given the types of tasks performed by these workers, it is difficult for co-workers to maintain appropriate social distances, increasing the transmission of the virus.”

Next week, the New York Stock Exchange will close its trading floor and move to all-electronic trading. Intercontinental Exchange, which owns the NYSE, made the decision after two people who had been on the floor tested positive for covid-19, the disease caused by the coronavirus.

The closure begins Monday and will have no effect on trading, according to a NYSE statement. “Our markets are fully capable of operating in an all-electronic fashion to serve all participants, and we will proceed in that manner until we can reopen our trading floors to our members,” said NYSE president Stacey Cunningham.

The iconic floor and its traders, which still number in the hundreds but are greatly reduced from its heyday decades ago, are daily fixtures in news stories and backdrops for television interviews.

“I’ve been a broker on the New York Stock Exchange for 31 years, and I’ve seen the crash of ‘87, I’ve lived through 9/11, and traded during the financial crisis,” Peter Tuchman said in an email to The Post. “I’ve bobbed and weaved through the Trump administration‘s headline tweets over the last three years. We closed for five days during 9/11 and for two days during hurricane Sandy."

Tuchman said he will miss the floor, but that “it’s important to know people will have access to their money and trading and as soon as we contain this fire we will be back to work on the floor.”