Cybersecurity stocks present a compelling short-term bet for investors ahead of the 2018 midterm elections, Goldman Sachs advised clients Thursday.

Pointing to an expected uptick in security spending in the run-up to November, analyst Arjun Menon told clients that the select group of stocks are likely to see upside in the months to come.

“Recent press reports suggest rising concerns about the possibility of meddling in the U.S. midterm elections this November,” the analyst wrote. “A rise in allocation to security spending – the top spending priority among chief investment officers according to the most recent GS IT Spending Survey – in anticipation of potential threats would boost the top-line of cybersecurity stocks.”

Source: Goldman Sachs Global Investment Research

Cybersecurity stocks are up 22 percent year to date — well ahead of the S&P 500’s 4.6 percent climb – but the industry remains below their 2015 highs on a relative basis, Menon added. He highlighted companies like Cisco and Akamai, which offer a variety of security products, including network and data protection as well as cloud computing defense, as firms that would likely stand to gain from a growing emphasis on cybersecurity.

The 10 largest constituents of the ISE Cybersecurity Index (HXR) – a modified market cap-weighted index that tracks companies providing cybersecurity tech – are expected to grow sales at almost three times the pace as the median S&P 500 company, the Goldman analyst added.

“Cybersecurity stocks are expected to grow sales faster than the Info Tech sector and S&P 500 in 2019 and trade at below-average relative valuations,” Menon wrote, forecasting 9 percent growth in cybersecurity revenue growth against expectations for 6 percent in technology as a whole.

Goldman Sachs also highlighted the industry for its insulation against an escalating trade war between the United States and its international partners as well from a slowdown in economic activity. Any impact of tariffs on cybersecurity stocks, Menon said, should be relatively muted given that the industry is typically weighted toward software.

The firm warned last year that if President Donald Trump does implement a protectionist trade policy, it could start a global trade war and lead to a market drop.

"One potential risk to our central case is that global growth slows, or profits are hit, by increased US tariffs on trade and the possibility of an escalating global trade war," Goldman's chief global equity strategist Peter Oppenheimer wrote in a note to clients last July.

In the event of the conflict, the strategist recommended investors buy companies with higher domestic sales exposure.