Jim Cramer predicts what the midterm election's outcome could mean for the stock market

  • CNBC's Jim Cramer anticipates how the outcome of the 2018 midterm elections might affect investors, consumers and the stock market.
  • If the Democrats win one or both houses of Congress, the "Mad Money" host expects an economic slowdown and a "return to high growth" in the market.
  • If Republicans maintain their majority, Cramer expects "a roaring bull market" in the defense stocks.

The results of the midterm elections will change the nature of the stock market, CNBC's Jim Cramer said Tuesday as Wall Street awaited the outcome of a defining battle over Congress.

The Democratic Party is expected to regain control of the House of Representatives, with the GOP maintaining a slim majority in the Senate. That would result in congressional gridlock, which could spell trouble for President Donald Trump's agenda but be "very good" for stocks, Cramer said on "Mad Money."

"This gridlock scenario results in a dramatically slower economy," he said. "That's ... terrific for the highest-growth stocks that can keep putting up terrific numbers even during a slowdown. Think Amazon, Alphabet, the cloud plays, the cybersecurity stocks, and many of the ... semiconductor names like Broadcom and Qualcomm, which are tied to the rollout of 5G wireless technology, not the broader economy."

A Democratic win could also benefit the biotechnology cohort, a historically Democrat-friendly counterpart to big pharma, Cramer said. He recommended the SPDR S&P Biotech exchange-traded fund for investors bullish on a blue wave.

Cramer said he could even see shares of Humana, CVS-Aetna and Cigna doing well in the case of a Democratic sweep on the prospect of better funding, and the stocks of health-care giants UnitedHealth Group and HCA doing well no matter what party took over.

But retail stocks could suffer if the Democrats land a victory as Trump's tax cuts fall into political jeopardy and tariffs and interest rates continue to climb, he warned.

"We've seen a tremendous rally in retail. [...] It could come to a truly screeching halt tomorrow," he said. "I'd be very careful here. I bet many hedge funds would like to go long Amazon, which has been down, down, down, and go short all the retailers, which have been up, up, up."

If the Republican Party maintains control of Congress, Cramer offered a simple strategy: buy defense stocks like Northrop Grumman, Lockheed Martin and Raytheon, all of which have declined on fears of a Democratic victory.

"While both parties love shelling out money for military hardware, the Republicans love it even more, so if they can hold both houses of Congress, I expect a roaring bull market in the defense stocks," the "Mad Money" host said.

All in all, Cramer saw secular growth stocks as the best possible investments regardless of the election's outcome. Gridlock or not, congressional Democrats likely won't have enough votes to stop Trump's trade war with China or change the Federal Reserve's plan for raising interest rates, creating a good environment for secular plays, he said.

"I wish there were more winners. But I keep coming back to the prospect that the president's tariffs automatically rise to 25 percent next year and the Fed tightens four more times to ensure that we get a lot of layoffs so there's less inflation," he said.

There could also be a scenario where investors come out of the woodwork after the election and start buying, in which case Cramer recommended employing his strategies in reverse.

"You take the stocks that I have said do well in a Democratic sweep or even a one-house win, and you sell them and you sell them hard. You can keep the Republican stocks, but don't overstay your welcome" ahead of the looming G-20 talks and the December Fed meeting, which will likely bring another rate hike, he warned.

"Bottom line? Whatever way this election goes, now you know how to play it," Cramer said. "But, unfortunately, the biggest issues for this market won't be decided at the polls today, because they're the purview of the president and the Federal Reserve, not of you, the midterm voter."

WATCH: Cramer anticipates the midterms' effect on stocks

Disclosure: Cramer's charitable trust owns shares of Amazon, Alphabet, UnitedHealth and Raytheon.

Questions for Cramer?
Call Cramer: 1-800-743-CNBC

Want to take a deep dive into Cramer's world? Hit him up!
Mad Money Twitter - Jim Cramer Twitter - Facebook - Instagram - Vine

Questions, comments, suggestions for the "Mad Money" website? madcap@cnbc.com

Cramer's New Book