Tech stocks have had a volatile year so far, but there’s one sub-sector that’s providing opportunities for investors right now, according to Morgan Stanley. The investment bank said in a July 6 note that cybersecurity will remain a “relatively safe haven” into the second half of 2022. “With defensible growth and security valuations below historical average, we continue to see opportunity,” the bank’s analysts wrote. “The state of cybersecurity remains strong with spending intentions showing no signs of slowing and security budgets most defensible by far in a weaker macro scenario,” they added. The iShares Cybersecurity and Tech ETF has tumbled about 16% year-to-date, while the broader Nasdaq index is down roughly 25% over the same period — although the tech-focused index bounced last week. Morgan Stanley’s stock picks Morgan Stanley added that it had seen a “notable” increase in the U.S. federal security spending in the second quarter, with a strong pipeline heading into the third quarter. That should benefit many security firms, the bank said. Its top security pick is Palo Alto , which the bank expects to benefit from greater adoption of next-generation cloud security platforms. Morgan Stanley said the stock is undervalued, with the price not taking into account the 30% growth the bank expects. Its price target for this stock is $823, representing an upside of around 59%. It also picked CyberArk , another stock it said was underpriced. The bank said demand for its offering is expected to accelerate and the company is set for higher revenue growth ahead. The bank gave CyberArk a price target of $172, which represents upside of roughly 20%. Morgan Stanley listed one “controversial” name its analysts prefer the most: Okta . The bank said the San Francisco-based authentication firm was trading at a discount of more than 30% to its peers on a median basis. That’s despite negative news surrounding the firm earlier this year , such as a security breach and investor concerns around competition from Microsoft , said the bank. It put a price target of $150 on Okta, representing an upside of around 44%.