There will be winners and losers in the stock market following Republicans and Democrats splitting Congress in the 2018 midterm elections.

The big winner could be the stock market overall as a hamstrung government leaves in place much of what President Donald Trump has accomplished, but also keeps in check on some of his more extreme actions like trade battles. Stock futures pointed to a triple-digit gain for the Dow Jones Industrial Average on Wednesday.

Industrial and materials stocks could be among the best performers on speculation politicians can broker an infrastructure deal, Wall Street analysts and strategists speculated before the election. Drug stocks could come under pressure on a bipartisan plan to rein in drug prices.

A check on trade tensions: Good for stocks

With Democrats controlling the lower chamber of a split government, Trump could be forced to soften his aggressive trade strategy with China. The trade war between the two nations has roiled markets and often left investors on edge about the future between the world's two largest economic powerhouses.

Shares of Caterpillar, which had taken a hit from Trump's trade war with China, rose 4.4 percent Wednesday.

"Our base case of the Democrats taking over the House holds the potential to reduce downside risks from trade policy friction," Deutsche Bank's chief equity strategist Binky Chadha wrote last week. "Congressional investigations and potential impeachment proceedings, even though nominal, would likely use up significant bandwidth while a growing number of Democrats and even Republicans are likely to attempt reducing Presidential power in dealing with trade."

A reduction in trade tensions between Washington and Beijing allows the market to refocus on strong U.S. growth, Chadha added, as well as ease pressure on global growth and lead to a "stronger eventual rally."

The White House imposed tariffs of 10 percent on $200 billion of Chinese products in September, with the rate set to increase to 25 percent by the end of the year unless the countries can reach a breakthrough in the trade talks. In response, Beijing said it would impose taxes on 5,207 U.S. imports worth about $60 billion.

The two nations had already imposed tariffs on $50 billion of each other's goods before the September sanctions.

Dan Clifton, head of policy research at Strategas Research, said Trump will now start looking ahead to his own re-election and continue to seek policies to help the economy.

"I think it starts at the G-20 meeting with China," Clifton said. "It looks like the president could do something big on trade."

Bipartisan support for infrastructure: Upside for materials, industrials, energy

Though Republicans and Democrats disagree on a wide variety of policy proposals, members of both parties have been supportive of infrastructure reform. Any progress on that front could be profitable for companies exposed to public work projects, such as machinery manufacturers, steel producers and oil and gas providers.

"The Democrats are likely to push plans for large-scale infrastructure spending. Republicans have generally opposed Democratic plans on this issue, but President Trump has expressed support for infrastructure spending and might be willing to help," HSBC chief U.S. economist Kevin Logan wrote in a note in October.

United Rentals, which rents construction equipment, rose 1.2 percent Wednesday. Shares of United Technologies and Honeywell added 2 percent and 1.1 percent respectively.

Materials, industrials and energy stocks "could benefit from a small infrastructure bill under Democrats, a weaker U.S. Dollar and reduced trade tensions," Bank of America Chief Equity Strategist Savita Subramanian wrote in September.

Pharmaceuticals: A common target?

Strategists speculated Congress and Trump could find common ground on reducing drug prices, a potential headwind for health care and drugmakers specifically.

Shares of major pharmaceutical companies Pfizer, Merck and Johnson & Johnson were slightly higher Wednesday, though underperforming the bigger rally in the overall market.

Morgan Stanley policy strategist Michael Zezas pointed to House Minority Leader Nancy Pelosi's mention of pharmaceuticals last night, saying it "was really the only issue that she mentioned" during her victory speech last night.

"It's entirely possible the Democrats might try and prioritize something around prescription drug pricing which, at least in name, the president seems to agree with Democrats on," Zezas said. "So I think that's a sector you've got to continue to look at that might have some pressure."

Fundstrat's Thomas Block added in a note Wednesday, "In my view one of the business sectors that could take a lot of heat is Pharma."

"Trump has often sided with Democrats on allowing importation of drugs from other nations that control the prices. Also Trump in the past has expressed support for the idea of allowing the federal government to use its marketplace leverage to negotiate lower Medicare prices with pharmaceutical companies, another idea long advocated by Democrats," Block wrote.

— CNBC's Patti Domm and Michael Sheetz contributed reporting.

WATCH: Here's what you should know about the 'fear index'