It's not a secret that there are some sectors that hold up better in economic downturns than others. Consumer cyclicals and industrials often experience a steep decline in their earnings during recessions.

But companies in healthcare are generally more resilient in recessionary periods. This is because the goods and services provided by these companies are nondiscretionary in nature -- diabetics can't live without insulin and cancer patients can't just skip treatment, either.

In that vein, here are two high-yielding pharma stocks that appear to be solid buys at this time.

A healthcare professional measures a patient's blood pressure.

Image source: Getty Images.

1. Pfizer

There's no company better known for its success in bringing both a vaccine and an anti-viral treatment to market to tackle the COVID-19 pandemic than Pfizer (PFE -0.19%). The drugmaker expects to reach the momentous milestone of $100 billion in revenue in 2022. And while $54 billion will come from its Comirnaty vaccine co-developed with BioNTech as well as its anti-viral called Paxlovid, the other half of revenue is coming from a robust portfolio of drugs. 

The company generated $25.7 billion in revenue during the first quarter of 2022, or 82% higher than the year-ago period. The vast majority of this naturally came from Pfizer's COVID product portfolio. But even without those two products, Pfizer's operating revenue would have been 5% higher. This accounts for the 2% negative impact of patent exclusivity for certain products and 1% negative impact from fewer selling days during the quarter.

The rare heart disease drugs Vyndaqel/Vyndamax and the anti-coagulant co-owned with Bristol-Myers Squibb called Eliquis helped to power Pfizer's non-COVID revenue higher in the quarter. With a pipeline of 96 projects under development and cash to throw at strategic acquisitions, Pfizer should be able to sustain strong revenue and profit generation in the years ahead. 

The stock's 3.1% dividend yield is nearly double the S&P 500 index's 1.6% average yield. And since its dividend payout ratio is projected to be 23.5% in 2022, Pfizer's dividend is in no danger of being cut anytime soon. 

Best of all, shares of the stock can be picked up at a forward price-to-earnings (P/E) ratio of 9.5. This is moderately lower than the drug manufacturer industry average of 11.3, which makes Pfizer a good value for long-term investors.

2. Novartis

With a $202 billion market capitalization, Swiss drug maker Novartis (NVS 1.10%) is the seventh-largest pharmaceutical company in the world.

Unsurprisingly, the company has 13 drugs that are each on track to post at least $1 billion in sales in 2022. And nine of those 13 drugs posted positive net sales growth in the first quarter of this year.

Autoimmune disease drug Cosentyx and the heart failure drug Entresto were the biggest growth drivers for Novartis, both posting double-digit net sales growth for the period. This explains how the company's first-quarter net sales grew 5% in constant currency terms and 1% adjusting for unfavorable currency translation into U.S. dollars during the quarter.

Novartis' existing product portfolio is undoubtedly healthy. And investors can rest assured that the company can build on its financial achievements in the years to come. With more than 160 projects in clinical development, analysts could be too conservative with their predictions of 5% annual earnings growth over the next five years. 

Novartis' market-smashing 4% dividend yield is yet another reason to like the stock, especially considering that the payout ratio will be in the high-40% range for this year. At a forward P/E ratio of 12.4, Novartis seems to be sensibly valued for its quality as well.