When in doubt, buy Amazon.

That’s the message from Wall Street as tech stocks skyrocket despite the fact no winner has been declared in the US presidential election.

The Nasdaq spiked by a staggering 4% Wednesday, leaving the index that’s home to Amazon, Alphabet, Facebook and Microsoft on track for its best day since early April.

The Nasdaq is up almost twice as much as the Dow, which features more economically sensitive companies like Caterpillar and Home Depot. The Russell 2000, which is most exposed to the strength of the US economy, is barely positive at all.

In some ways, it’s a replay of how tech stocks boomed during the initial phase of the recovery from the pandemic in May, June and July. The rush to buy tech stocks reflects investor sentiment that these companies will thrive even if no major stimulus package comes from a divided Congress and the economic recovery remains fragile.

“People are going back to the playbook that works if the economy is more sluggish,” said Keith Lerner, chief market strategist at Truist/SunTrust Advisory. “When people get defensive about the economy, they buy tech.”

Sticking with the pandemic winners as gridlock looms

Nasdaq futures rose so much overnight as election results trickled in that trading reportedly had to be halted.

Amazon, Google owner Alphabet and Facebook — all winners during the pandemic — are all up 5% or more in midday trading. By contrast, companies that need a strong economy to do well, such as Ford, Wells Fargo and Boeing are trading flat or losing ground.

“Just like animals, investors herd in the face of danger or uncertainty by following the strongest in the pack,” Scott Yonker, associate finance professor at Cornell University, wrote in a report Wednesday. “For investors, this means pouring money into recent ‘winners.'”

The key takeaway is that while the race for the White House remains in play, investors have lost confidence in a blue wave.

The chances of Democratic-control of the US Senate has plunged on prediction platform PredictIt. It now costs about 89 cents to win $1 if Republicans win the Senate, compared with just 46 cents the day before the election.

That’s a crucial shift, because markets had previously expected Democrats would sweep, paving the way for powerful fiscal stimulus that would help non-tech companies.

“The only firm conclusion is that the ‘Blue Wave’ has receded before reaching shore, and that the prospects for a stimulus package remain undiminished,” Christopher Smart, chief global strategist at the Barings Investment Institute, wrote in a report Wednesday.

What happens to fiscal stimulus now?

If Democrats controlled both the White House and the Senate, economists expected faster economic growth and a bold fiscal stimulus package worth at least $2 trillion.

That scenario led investors to buy economically sensitive stocks in the weeks ahead of the election.

“People rotated into cheap, beaten-up areas in anticipation of stimulus,” said Truist’s Lerner. “Now, the market is concerned about the size of the fiscal package.”

Fiscal stimulus is still expected if government is divided, but it may not be as large as it would be under a blue wave.

Tech stocks also may benefit from gridlock because it lowers the chances of a sweeping crackdown from Congress. Although antitrust investigations may continue, Republicans and Democrats are unlikely to agree on major new legislation.

“The increasing likelihood of a divided Congress,” wrote Mike Loewengart, managing director of investment strategy at E*Trade, “puts a damper on hopes for increased regulation against this sector.”

The surge in tech stocks Wednesday stands in stark contrast to how the sector performed in 2000, when investors grappled with a contested election. But back then, investors already had lost confidence in tech stocks as the dotcom bubble imploded.