It's official: Everyone's spooked by the specter of a looming recession. Between rising prices, residual supply-chain weirdness, a market downturn, and incredible uncertainty, it wouldn't be too surprising if the economy actually did end up contracting in the near future. And that means it's time to assess which segments of your portfolio are prepared for the possibility of a coming storm. 

Healthcare stocks are one way for investors to hedge against recession risks. But there's reason to believe that the various areas within the healthcare industry will perform quite differently in the context of an economic drawdown, so let's take a closer look at the pharma and biotech sectors specifically. 

Worried person looking at laptop.

Image source: Getty Images.

Pharmaceuticals will avoid the worst

The good news is that a recession probably won't cause major damage to big pharma stocks. Consider the below chart depicting the performance of top pharma players like AstraZeneca, (AZN 0.19%) GSK, Sanofi, and Novartis.

Chart showing several major pharma stocks recovering from the 2020 COVID-19 crash.

^SPX data by YCharts

The brief recession caused by the coronavirus is highlighted in gray. As you can see, the market crash did end up harming these pharmas, and most didn't outperform the market during the period, but they bounced back quite quickly relative to the value they lost. There's no guarantee of a recession causing a similar pattern though it wouldn't be so surprising.

The reason these stocks were able to bounce back so quickly can be seen in the following pair of charts:

Chart showing several major pharma stocks dropping slightly in revenue and gaining or maintaining net income during the 2020 pandemic recession.

AZN Revenue (Quarterly) data by YCharts

The recession showed no clear effect on quarterly sales or net income for most of these big pharmas. In other words, these businesses did not see their ability to compete or to deliver future returns for shareholders significantly harmed. That's just one recession, though, so let's take a trip down memory lane to look at the same stocks and the parameters in the Great Recession.

Chart showing several major pharma stocks' revenue and net income falling slightly and then recovering in the Great Recession.

AZN Revenue (Quarterly) data by YCharts

Though it was a significantly longer recession, the picture is much the same. There are a few reasons for this durability, but the most important is probably that people don't choose when to get sick, so they don't choose when they need to buy medication. This means that they end up buying it even during economic pullbacks. Other areas within the healthcare field can't necessarily rely on that dynamic.

Expect more headwinds for biotech

The biggest effect of a recession on healthcare stocks will likely be on biotech companies, especially those that haven't yet commercialized their first products. Because they have nothing on the market, they don't have much in the way of revenue. Take Vaxart (VXRT 7.79%), for example. Its trailing 12-month revenue is less than $1 million. To pay the bills, it needs to burn cash.

In Vaxart's case, operating expenditures in 2021 were about $70.6 million -- and currently it has $147.6 million in cash and short-term investments. That means if it continues spending at its current rate, it'll need to raise more money in about two years.

And unless the company is on the brink of commercializing at least one of its pipeline programs, the most advanced of which are currently in phase 2 clinical trials, raising capital will be a taller order in a recession than it would be normally. Poor economic and market sentiment is liable to drag share prices down, making issuing new shares of stock much less appealing. Likewise, expect fewer biotechs to go public, and for initial public offerings (IPOs) to be smaller than in the last few years. 

At the same time, rising interest rates and more conservative lending policies by financial institutions will make taking on new debt significantly more expensive than it is now. That could easily drive down the profits of businesses that take out new debt during a recession for many years after it ends. Plus, it'll likely get harder for young biotechs to get investment from larger companies, and it's possible that merger and acquisition (M&A) activity will fall as major biopharma players look to conserve cash. 

But it's important to keep these recession headwinds in context. Biotechs that see success in their clinical trials will still experience rises in their share prices. New drugs will still get commercialized and yield revenue, though in some cases that revenue may be lower as a result of reduced healthcare spending. And even if it gets harder to raise money, it won't be impossible. 

If there is a recession, don't avoid investing in biotech. Just be aware that a recession makes these highly risky stocks even riskier than normal, and plan your portfolio accordingly.