Markets despise uncertainty. But as Americans tensely wait for the outcome of the US presidential election, the country’s stocks have rallied. A lot.

[The Dow is up more than 600 points as off 11 a.m. Thursday.]

Early Wednesday, it looked like Wall Street could be facing its nightmare scenario: a contested election that could be drawn out over days or even weeks. As the day went on, however, investors became more confident that orderly vote counting in battleground states would produce a clear victory for former Vice President Joe Biden.

“What you are getting is a sense that you’re not going to have extreme disruption in the wake of the results,” Paul Donovan, chief economist at UBS Global Wealth Management, told me.

The S&P 500 rose 2.2% on top of sizable gains earlier in the week. The Dow increased 368 points, or 1.3%, while the tech-heavy Nasdaq Composite shot up nearly 3.9%. US stocks are rallying again in premarket trading.

Nothing is settled

While CNN has called Wisconsin and Michigan for Biden, it has yet to forecast a winner in the key states of Pennsylvania, Georgia, Nevada and Arizona. (Biden holds a 253-213 lead in the Electoral College. A candidate must reach the 270 mark to win the presidency.)

Nasdaq, Big Tech stocks booming – but here’s why that may not be good for economy

Meanwhile, President Donald Trump has launched a flurry of lawsuits designed to stop the former vice president from getting over the line, and his campaign is laying the groundwork to challenge Pennsylvania’s results at the US Supreme Court.

Yet Wall Street traders are expecting a level of certainty to materialize in short order.

“As far as the markets are concerned … there is a difference between a contested election with no winner being declared by the news networks, and a contested election where the news networks have declared a winner,” Donovan said.

The Congress question: Wall Street had put its money on a “blue wave” in which Biden takes the White House and Democrats regain control of the Senate. That would have paved the way for a generous stimulus package to help the US economy through a difficult leg of the pandemic.

But Republicans have dramatically outperformed expectations, and investors are now betting that Republicans will retain their Senate majority.

The adjustment in expectations isn’t fomenting fear, though. That’s for two main reasons:

At a press conference Wednesday, Senate Majority Leader Mitch McConnell, who won his election, called for a stimulus agreement to be finalized “before the end of the year.” The package may be more modest in scope, but investors are pleased with that timeline.

Wall Street historically likes divided government since it limits policy overhauls that eat into corporate profits. Investors think that with Republicans running the Senate, Democrats have less of a chance of raising corporate taxes, which had been viewed as a key risk.

“The status so far: unclear on the next president but fairly clear that he’ll face Congressional resistance on anything transformational, whether on the budgetary or regulatory front,” John Normand, JPMorgan’s head of cross-asset strategy, said in a note to clients. “That is great news for those who think that government inaction is generally good for asset prices over the medium term.”

What’s next?

The race could still change, and the economic backdrop remains murky. But Donovan said he expects US stocks to keep climbing so long as activity in the country remains fairly normal despite a spike in Covid-19 infections.

“Fear is not rising and people are not dramatically changing behavior, so the economic consequence is relatively slight,” Donovan said.