With midterm elections underway, investors are waiting to see if, and how, the results may weigh on stocks — and which names will outperform. The market is expecting Republicans to at least gain control of the House and is rising for a third straight day on Tuesday. RBC’s head of U.S. equity strategy, Lori Calvasina, believes there may be a rally if Republicans get a majority in one or both chambers of Congress. How much of one depends on what happens. Gains will be modest if the GOP only wins the House, but will be larger if it wins the Senate as well, she wrote in a note Monday. A shift to Republican control within Congress will affect some parts of the markets and some individual stocks more than others. For one, it would likely mean higher defense spending, Morgan Stanley analyst Kristine Liwag wrote in a note Tuesday. That would be bullish for defense contractors. Coincidentally, Lockheed Martin shares reached an all-time high on Tuesday. However, a Democrat in the White House and GOP-controlled Congress could cause political gridlock and delays in finalizing the defense budget for fiscal year 2023, she warned. Then there are Democratic agenda items, like additional drug price controls, tax increases, energy taxes, Medicare for All and legislation affecting “sin” industries, such as prisons and tobacco, that will go by the wayside if Republicans sweep Congress, according to Strategas. The firm uses potential legislative changes to create Republican and Democratic sweep portfolios, which identify investments with the most to gain or lose based on the election outcome. Meanwhile, RBC believes communications services, energy and industrials will likely benefit from GOP control of one or both chambers of Congress, largely because of what it would mean for government regulation. To determine what stocks might outperform in the event of a GOP victory, CNBC Pro screened for names that analysts like in both RBC’s sectors and Strategas’ Republican sweep portfolio. At least 60% of analysts covering the stocks have to rate them a buy. The stocks also have to have a potential upside of at least 20%, based on the average analyst price target, according to FactSet. Here is the list of names within RBC’s sectors. Of those on the list, midstream energy infrastructure company Targa Resources has the greatest percentage of buy ratings from analysts who cover the stock. Shares are up more than 36% year to date and have another 30% upside to the average analyst price target, according to FactSet. Alaska Air, on the other hand, has lost about 13% so far this year. The carrier has 38% upside to the average analyst price target, FactSet data show. Some 84% of analysts who cover the stock rate it a buy. Alaska Air recently reported third-quarter earnings that beat analyst expectations, thanks to a busy travel season. While tech has been slammed this year, Alphabet and Match Group are analysts’ favorites within the communication services group. Google-parent Alphabet is down about 38% year to date but has nearly 45% upside to the average analyst price target. Some 75% of analysts covering the stock rate it a buy. Earlier this month, Alphabet had its worst day since March 2020 after it reported an earnings miss and slowing growth. Match has lost more than 65% so far this year but has 50% upside to the average analyst price target, according to FactSet. Of those analysts who cover the stock, 65% rate it a buy. The online dating company recently posted higher-than-expected revenue in the third quarter. Morgan Stanley is among those bullish on Match. “Self-help story, sequential acceleration, and several upside drivers set up to be one of the best ’23 stories in our space at compelling valuation, albeit with macro uncertainty,” Morgan Stanley said in a note last week. For Strategas’ political stock list, CNBC Pro added an additional screening of stocks that have at least seven analysts covering them, since some on the list attract only sparse coverage. Monolithic Power Systems has the greatest percentage of buy ratings from analysts covering the stock, according to FactSet. The stock is down about 28% year to date, but has 27% upside to the average analyst price target. Strategas put Monolithic Power Systems into its Republican sweep portfolio because it believes the semiconductor company will benefit from less chance of corporate tax increases. Two energy names in the portfolio, Cheniere Energy and Enterprise Products Partners , have more than 20% upside to their average analyst price targets. Some 81% of analysts rate Cheniere a buy, while 62% have a buy rating on Enterprise Products. “We believe Democrats’ clean energy agenda actually benefits fossil fuels. But a Republican sweep helps with the distribution and transportation of fossil fuels (pipeline, exports, etc.),” Strategas wrote in a September note that laid out its portfolios. Another name poised to benefit is SoFi Technologies, since Republicans are unlikely to forgive student loans, Strategas said. The fintech company’s stock, down 67% so far this year, has faced headwinds such as the moratorium on student loan payments and President Biden’s student loan forgiveness program. That program is now on hold as Republicans challenge it in court. SoFi has 55% upside to the average analyst price target, with 60% of analysts covering the stock rating it a buy, according to FactSet. — Michael Bloom contributed reporting.