Votes are still being counted in key battleground states, and it may be days before a winner emerges in the presidential election. But that uncertainty didn't stop the stock market from soaring on Wednesday. The Dow Jones Industrial Average (^DJI 0.56%) was up about 2.5% at 1:25 p.m. EST.

Shares of UnitedHealth (UNH 1.61%) and tech giants Apple (AAPL -1.22%), Microsoft (MSFT -1.27%), and salesforce.com (CRM -0.57%) were big gainers. Meanwhile, Caterpillar (CAT -0.55%) was the Dow's biggest loser as the potential for a major infrastructure bill faded.

A shrugging person with a question mark bag over head.

Image source: Getty Images.

UnitedHealth rockets higher

UnitedHealth was the Dow's big winner on Wednesday, with the health insurance stock up a whopping 11.5% by early afternoon. While votes are still being counted, it now appears unlikely that Democrats will win control of both houses of Congress along with the presidency. A Biden presidency with a Republican Senate or a second term for Trump would likely greatly reduce the chances of any dramatic legislative action on healthcare.

Including Wednesday's gain, shares of UnitedHealth are up about 22% since the start of the year.

Caterpillar sinks lower

The Dow's big loser on Wednesday was heavy machinery manufacturer Caterpillar. The company is already dealing with a brutal downturn in demand due to the coronavirus pandemic. In the third quarter, sales were down 23%, and earnings per share fell 54%.

With a sweep of both the executive and legislative branches by Democrats looking unlikely, Biden's plan to pour $2 trillion into infrastructure projects in his first term probably isn't going to happen. Shares of Caterpillar were down 5.5% by early Wednesday afternoon as the prospect of a jolt in demand from government spending evaporated. The stock is still up about 7% year to date despite the headwinds facing the company.

Big tech soars

Shares of Apple, Microsoft, and Salesforce booked major gains on Wednesday as investors jumped aboard the biggest tech stocks. By early afternoon, Apple stock was up 4.1%, Microsoft was up 5.3%, and Salesforce was up 5.7%.

Big tech stocks have rallied this year after recovering from a pandemic-driven sell-off in March. While Apple, Microsoft, and Salesforce face potential risks from a prolonged pandemic, a weak economy, and a lack of additional stimulus, investors are brushing those concerns aside on the day after the election.

The fate of Apple's stock in the coming months likely depends on the success of its 5G-enabled iPhone 12 family. The company neglected to provide guidance when it last reported results, and demand for its pricey gadgets will almost certainly be hurt if Congress fails to pass additional stimulus legislation, or if that legislation is narrow in scope.

Microsoft and Salesforce are more enterprise-focused than Apple, and neither company has felt much pain from the pandemic so far. But other enterprise-facing tech companies have seen customers slow down spending in the face of economic uncertainty. Eventually, that weakness may reach tech companies that have so far been largely immune from the impacts of the pandemic.

While the Dow rallied hard on Wednesday, the pandemic and the potential for a messy legal situation following a very close election could inject some volatility into the stock market in the coming weeks.