(Bloomberg) -- Wall Street analysts are optimistic that health-care stocks are poised to keep rebounding from the first quarterly loss since the onset of the pandemic. 

As geopolitical tensions mount, inflation surges and the bond market flashes warning signals that interest-rate hikes may set off a recession, there are signs of investors circling back to health-care stocks that are often seen as a haven from swings in the economy. AbbVie Inc., AmerisourceBergen Corp., Anthem Inc. and UnitedHealth Group Inc. have all jumped back to record highs even though as a group they still trade at valuations below the S&P 500 Index. 

“There seems to be seem a sentiment shift since recent Fed commentary,” said Bloomberg Intelligence strategist Michael Casper. “Oversold sectors like health-care have caught a bid in sign of relief the Fed wasn’t more aggressive at the March meeting.”

Drug distributor McKesson Corp. has led the gains with a roughly 24% advance in the first quarter, leaving it set for a six-month winning streak, its longest in nine years. AbbVie, the maker of the world’s top selling drug, is also on a six-month run, the longest for the company since it went public via a spinoff in 2013. 

“What we’re witnessing really is a macro-driven mean-reversion underway toward a more normal historical P/E discount,” said Asad Haider, a strategist at Goldman Sachs Group Inc. 

With hedge fund exposure to biopharma near a five-year low, he sees room for the large-cap drugmakers to move higher toward their historical discount to the S&P 500 as investors focus on discounted names like AbbVie, Bristol Myers Squibb Co. and Merck & Co.

Wells Fargo & Co. strategists upgraded their outlook on health care to “favorable” on Thursday. The bank cited valuations and pent-up demand, noting the sector’s tendency to outperform during volatile times like an economic downturn or a rising rate environment. JPMorgan Chase & Co. called out the sector’s safe haven status earlier this week. 

The comments come as the health-care companies in the S&P 500 rallied back this month, paring their first quarterly loss since the start of 2020 to 1.8%. Biotechnology stocks are coming off the worst quarter in over three years, with Nasdaq Biotech Index set for its first monthly gain since August. 

That suggests the index may have bottomed out, with prior resistance levels from 2019 and 2020 now supporting the benchmark. Still the small caps in the sector have fared much worse than larger peers and Wall Street recommends more selectivity in this area.   

Oppenheimer strategist Jared Holz is recommending higher-quality companies with “at least some element of a business structure/revenue generation.” That includes Apellis Pharmaceuticals Inc., Horizon Therapeutics Plc and Vertex Pharmaceuticals Inc., which was also recommended by JPMorgan strategists on Wednesday. 

While the recent sector rally was a good sign, “all is not solved in biotech,” Holz said.

©2022 Bloomberg L.P.