U.S. stocks popped Monday on the final trading session before Election Day, bouncing back from a bleak sell-off that plunged the major indexes to weekly losses not seen since the coronavirus broke out in March.

The Dow Jones industrial average traded up more than 400 points, or 1.6 percent, to finish the day. The broader S&P 500 added 40 points, or 1.2 percent, while the Nasdaq gained 46 points, or 0.4 percent. The Dow and S&P closed out last week with losses of 6.5 percent and 5.6 percent. October marked the second consecutive month of declines for all three indexes.

The market rebound arrived as coronavirus infections are rapidly spreading across the United States and abroad. On Friday, U.S. public health officials reported nearly 100,000 new cases, the most in a single day, as infections surged in many battleground states that may decide the outcome of the presidential election.

On Saturday, British Prime Minister Boris Johnson announced all nonessential businesses would close for four weeks in an attempt to blunt rising coronavirus cases, which are poised to overwhelm hospitals by the year’s end. All nonessential shops, pubs, cafes, restaurants and gyms in England will shut down starting Thursday. Grocery stores, child-care facilities, schools, colleges and universities will remain open. Several European governments, including economic powerhouses Germany and France, have enacted curfews and other social and business restrictions to combat a spike in infections.

Global indexes also trended higher Monday: The German DAX jumped 2.0 percent, France’s CAC rose 2.1 percent, and the Pan-European Stoxx index gained 1.5 percent. In Asia, the Shanghai index edged up 0.02 percent, and the Nikkei added 1.4 percent.

Analysts say investors should expect volatility in the coming days as the coronavirus resurgence coincides with flu season and dropping temperatures in much of the United States, raising the specter of a new wave of shutdowns and more pain for already hard-hit sectors, such as hospitality and commercial travel. Traders also are bracing for Tuesday’s election and what the outcome could mean for deadlocked coronavirus relief talks in Washington.

“With one day to go until the presidential election, the stock market will undoubtedly take a wait-and-see attitude, with traders apprehensive about disputed election results,” said Marc Chaikin, founder of Chaikin Analytics, a quantitative investment research firm based in Philadelphia. “The key for the stock market in the short term is a concern over an uncertain and timely election result and the possibility of a disputed outcome.”

Both major parties have been preparing for the possibility of a contested election. National polling averages show former vice president Joe Biden leading President Trump by nine percentage points, 52 percent to 43 percent. In two of the most important battleground states, polling shows Biden holding a slight lead over Trump in Pennsylvania and the two roughly even in Florida, according to two Washington Post-ABC News polls published Sunday.

The uncertainty over the election is complicated further by the various scenarios in which one major party may control the White House while the other controls one or both chambers of Congress. For months investors have closely watched talks between Senate Republicans, the White House and House Democrats over a coronavirus aid package. While Democrats passed a $2.2 trillion version last month, the GOP has insisted on a smaller deal. Analysts say that a Democratic sweep of Congress and the White House would lead to an even larger stimulus, while a Trump reelection or a Republican victory in the Senate would mean a smaller deal.

The timing of the next round of massive government spending also will play a major factor in the volatility in the markets, analysts say. Without a safety net for households and businesses until as late as February, in the case of a divided government or a lame-duck presidency, investors have expressed fears that the U.S. economic recovery may stumble through the winter months.

Beyond questions about a forthcoming stimulus, investors are also eyeing shifts in policy should Biden come to power, and if Democrats take control of the Senate. The tech giants, which command an outsize role in the stock market because of their enormous market valuations and relentless growth, could face a more antagonistic Washington in a post-Trump world. While members of Congress from both parties have criticized the power and size of tech platforms, Biden has pledged to take a tougher line on antitrust enforcement.

Dan Ives, an analyst at Wedbush Securities said in a research note that “a potential ‘blue wave’ tomorrow would change the game on this front and make a formidable force going after antitrust law changes with breakups possibly on the radar.”