By Joe Wallace

U.S. stocks climbed Wednesday after late-reporting votes in the still-uncertain election boosted the chances of a Joe Biden victory.

Investors snapped up shares of technology and health-care companies on hopes that a clear Biden win would remove the uncertainty of a prolonged disputed election.

The broad S&P 500 index gained 2.7% in recent trading, while the Dow Jones Industrial Averaged added 520 points, or 1.9%. The tech-heavy Nasdaq Composite jumped even higher, gaining 3.8% in recent trading.

"It flipped when it seemed like Biden was going to win," said Priya Misra, head of global rates strategy at TD Securities. "Maybe the stock market cares more about the presidency and is thinking that if it's Biden at least we get a resolution."

Investors may be overlooking the risk to the economy posed by a divided government, Ms. Misra added, saying that if the Republicans retain the Senate it will make it harder to juice the economy with more stimulus.

Wednesday's gains followed a wild night of premarket trading. S&P 500 futures had briefly turned red after President Trump accused Democrats of trying to disenfranchise his voters and promised to petition the Supreme Court, though he didn't elaborate.

They turned positive again after counts in Wisconsin and Michigan pointed toward possible wins for Mr. Biden, though a substantial number of ballots remain uncounted.

"The market has been underpricing the chance of a close result," said Seema Shah, chief strategist at Principal Global Investors. "I'm surprised U.S. equities are doing as well as they are," Ms. Shah added, saying she expected to see more wild swings in stock prices in the near term.

Still, the lack of a decisive result are keeping markets on edge.

Money managers had long pinpointed a drawn-out or contested result as having the potential to spark big swings in asset prices. In part, this is because such an outcome would diminish the chances of lawmakers quickly passing a second round of economic stimulus. A lack of Democratic gains in the Senate also appeared to lower the likelihood of that happening.

Wagers that a Democratic sweep of the White House and Congress would lead to the speedy passage of more aid had sent bond yields higher in the days leading up to the election. That trade unwound Wednesday as the chances of a "blue wave" faded. The yield on the 10-year Treasury note fell to 0.768% from 0.881% Tuesday, putting it on course for its biggest one-day drop in months.

"This is a mega, mega move," said Gregory Perdon, co-chief investment officer at U.K. private bank Arbuthnot Latham. The prospects of a wave of Treasury issuance to fund a burst of federal spending under a Democratic administration had faded, he said. Yields fall as bond prices rise.

Another sign that stimulus hopes waned: The Russell 2000 index of smaller stocks were lower by about 0.8%. Companies in the index are more exposed to economic growth and were more likely than big tech stocks that dominate the Nasdaq Composite and S&P 500 to benefit from a government spending package.

The president won Ohio, Iowa, Texas and the key prize of Florida, while Mr. Biden flipped an electoral vote in Nebraska and won Arizona, the first time the state has gone to a Democratic presidential candidate since 1996. That set up a showdown in Pennsylvania, Michigan and Wisconsin, which, along with states such as Georgia and North Carolina, weren't yet called.

Technology stocks jumped ahead at the opening bell, with Apple, Amazon.com and Google owner Alphabet all gaining ground. Uber Technologies rose 10% and Lyft around 12% after California voters approved an initiative that let the ride-hailing firms count their drivers as independent contractors.

Shares in banks and industrial companies, which are closely tied to the outlook for the economy and tend to suffer when longer-term bond yields slide, came under pressure.

In a sign that investors were reaching for haven assets, the dollar initially rose against a basket of currencies tracked by The Wall Street Journal. China's yuan, Japan's yen, the euro and the British pound all fell against the U.S. currency, though some of those gains later reversed. European government bond yields also fell, with German 10-year bunds briefly touching negative 0.66%, their lowest level since March.

"The blue wave that the market had started to price has not come to fruition and it's still very much up in the air," said Ian Tew, a head of trading for major currencies at Barclays. "The market is concerned about that, and it then tends to buy the safe haven of the dollar in that environment."

Trading volumes in currency markets were unusually low for an election night, Mr. Tew said, in part because investors and traders were reluctant to put on new positions given the uncertainty. The dollar was largely driven higher by hedge funds and other market participants unwinding wagers they placed against the greenback before the vote, he said.

Still, some fund managers were waiting to pounce on any drop in stock prices as a buying opportunity.

"If you look over the long term, the policies in the two camps in terms of how corporate America might shape itself in the future are not completely apart," said Maria Municchi, a multiasset fund manager at M&G Investments.

--Mischa Frankl-Duval and Michael Wursthorn contributed to this article.

Write to Joe Wallace at Joe.Wallace@wsj.com

(END) Dow Jones Newswires

11-04-20 1046ET