U.S. stock markets closed higher across the board Thursday, prevailing over political uncertainty that left the markets fluttering throughout the day.

A day after Wall Street’s biggest point gain in history, the Dow Jones industrial average closed up 255 points, or 1.1 percent. The Standard & Poor’s 500-stock index was up 0.83 percent at close. The tech-heavy Nasdaq composite index was up 0.38 percent.

Low trading volumes exacerbated the effects of political volatility. The dizzying movements, with the Dow falling more than 580 points in the afternoon before staging a comeback, might be a source of concern to some. But major shifts at breakneck speed like the ones Thursday have more to do with computer trading programs than the real factors influencing the markets said Steven Wagner, co-founder of Omnia Family Wealth.

“The speed of these moves is stunning to watch, but we all understand that there’s a lot of momentum-based computer trading programs that push these things up or down,” Wagner said. “With that said, we’re late in an economic cycle, nine years plus to an expansion. We don’t know when, but we’re going to have a slowdown at some point.”

December has been brutal for Wall Street. A trade conflict with China, interest-rate hikes, President Trump’s attacks on the Federal Reserve and a partial government shutdown have rattled investors in the worst month for the markets since the financial crisis. Since Dec. 1, the S&P 500 is down more than 10 percent.

On Wednesday, after a four-day losing streak and a notably bleak Christmas Eve, markets were buoyed by reports of record-breaking holiday retail performances and assurances that Federal Reserve Chairman Jerome H. Powell’s job was safe. The Dow snagged its biggest point gain in history, surging 1,086 points.

But some analysts were not confident the buying would continue.

“We could see some additional selling in the last few days of the year amid ongoing concerns over the government shutdown and existing concerns over the near-term economic outlook,” Ivan Feinseth, chief investment officer at Tigress Financial Partners, wrote in a note to investors Thursday.

Wednesday’s success in U.S. markets was also met with skepticism in Asia and Europe, where markets reopened after a Christmas break. Japan’s Nikkei 225 index jumped 3.88 percent after suffering big losses earlier in the week. But other Asian markets were relatively neutral. The Shanghai Composite index slipped 0.6 percent to 2,483.09; the Hang Seng Index was down 0.7 percent at 25,478.88. European markets were negative in their first day back from Christmas break. Germany’s DAX closed down 2.37 percent; France’s CAC 40 closed down .6 percent. Britain’s FTSE 100 was down 1.5 percent at close. The European benchmark, Stoxx Europe 600, was down nearly 1.7 percent at close.

The Nasdaq struggled Thursday after Reuters reported that President Trump is considering issuing an executive order in January that would ban the use of telecommunications equipment from Chinese tech giants Huawei and ZTE. The news comes on the heels of progress in trade negotiations between the U.S. and China at the Group of 20 Summit in Buenos Aires. The two countries are on a 90-day break to formulate terms of a possible trade agreement, which has already been rocked by the arrest of Huawei chief financial officer Meng Wanzhou in Canada in early December. Negotiations are scheduled to resume in early January.

The end of 2018 has brought a chain of political surprises, including the sudden resignation of Defense Secretary Jim Mattis and Trump’s withdrawal of U.S. troops from Syria against the advice of his national security team. While some predicted Trump might soften his stance in the budget dispute over the border wall after seeing the uncertainty rile the markets, his tweets Thursday morning suggested that the government shutdown might extend into the new year.

“Have the Democrats finally realized that we desperately need border security and a wall on the southern border,” the President tweeted. “Do the Dems realize that most of the people not getting paid are Democrats? "

December also saw the sharpest drop in consumer confidence in 2018, despite a strong labor market. The Conference Board, a business research group, said its consumer confidence index fell more than expected this month, with concerns about economic slowdown pushing consumer’s expectations for the future to their lowest point since November 2016. If these fears spill over into consumer behavior, it would spell trouble for the U.S. economy, according to Chris Rupkey, chief financial economist of MUFG Union Bank.

“Consumers have been the driving force behind the solid economic growth recently with business investment cooling, and if the consumer gets cold feet, then one of the economy’s major engines may fail,” Rupkey wrote in a note to investors.