People pose with syringe with needle in front of displayed Johnson&Johnson logo
People pose with syringe with needle in front of displayed Johnson & Johnson logo in this illustration taken, December 11, 2021.

Shares of U.S. healthcare companies are gaining favor as investors bank on their ability to weather rocky economic times and the stocks look more reasonably valued than other defensive sectors.

Healthcare has been the top-performing S&P 500 sector over the past month, rising nearly 3% while the broader market has fallen modestly. The group has fallen 8.7% so far this year, less severe than the nearly 20% drop for the benchmark S&P 500 overall.

Strategists at Goldman Sachs, Morgan Stanley and BofA Global Research are among those favoring the healthcare sector, given that the companies' businesses are expected to hold up better than others should the economy face a downturn.

"We feel like it is one of the last opportunities to play defense at a reasonable price," said Walter Todd, chief investment officer at Greenwood Capital in South Carolina.

Greenwood is overweight healthcare stocks in its large-cap portfolios including shares of Johnson & Johnson, Thermo Fisher Scientific and Pfizer Inc.

How healthcare companies are performing will become more clear in the coming days as second-quarter reports roll in, starting on Friday with UnitedHealth Group Inc, the largest U.S. healthcare company by market value.

Earnings in the healthcare sector - which includes large drugmakers, medical equipment companies, health insurers and biotech firms - have outperformed in recent recessionary periods. That makes them an attractive target for investors looking for assets that can weather a potential downturn, as recession worries grow amid aggressive monetary policy tightening from the Federal Reserve.

For example, while overall S&P 500 earnings fell for nine straight quarters during the Great Recession in 2007-2009, the healthcare sector posted earnings growth in those periods, according to Refinitiv IBES data.

Over the last 25 years, earnings per share for the sector have increased nearly 10% annually compared with 6.6% annual growth for the S&P 500, while producing "much more consistent annual growth relative to the broader market," according to Eric Potoker, U.S. healthcare equity strategist in the CIO office of UBS Global Wealth Management.

"If they have healthcare needs, that is usually one of the last places that people will ration," Potoker said.

Healthcare also remains relatively more attractive than other so-called defensive stocks based on standard valuation metrics.

Healthcare is trading at 15.7 times forward earnings estimates against its long-term price-to-earnings average of 17.5 times, according to Refinitiv Datastream. That represents a 10% discount.

Meanwhile, other defensive sectors are trading at premiums relative to their historical valuations - with utilities at a premium of over 30% and consumer staples at a 12% premium.

Unlike healthcare stocks, utilities and staples, at 19.4 times and 20.1 times, respectively, are also trading above the 16.1 times P/E ratio of the overall S&P 500.

"We find other traditionally defensive sectors, including utilities and staples, to be expensive relative to the broader market," Tony DeSpirito, chief investment officer of U.S. fundamental equities at BlackRock, said in his third-quarter equity outlook in which he described "an underappreciated opportunity in healthcare stocks."

To be sure, should investors become more upbeat about the economy, that could lead them to leave behind healthcare shares for more cyclically sensitive stocks such as financials or industrials.

Healthcare also for years has faced persistent investor concerns about regulatory changes, particularly related to potential U.S. action to rein in prescription drug prices, which has created a cloud over the stocks. In the coming months, Democrats in U.S. Congress could try to pass a drug-pricing bill, and "biopharma stocks could be volatile if legislation progresses," analysts at SVB Securities said in a note.

Illustration shows Pfizer logo
Pfizer logo is seen in this illustration taken, May 1, 2022.