Earlier in June, the two-year Treasury yield rose to a higher level than the 10-year Treasury yield. This is referred to as a yield curve inversion, which often signals that the market believes a recession is on the horizon. Out of the 28 times that the U.S. yield curve has inverted since 1900, a recession has followed shortly thereafter on 22 occasions.

This is why investors may want to think about adding recession-resistant stocks to their portfolio. The healthcare sector has historically held up well in recessions because of the nondiscretionary nature of the goods and services that it provides to patients. Here are two stocks that investors can confidently buy and hold for the next decade to compound their wealth.

A doctor examines a patient during an appointment.

Image source: Getty Images.

1. Novartis

With a market capitalization of $196 billion, Swiss drugmaker Novartis (NVS 1.78%) is the seventh-largest pharma company on the planet (tied with UK-based AstraZeneca).

In the first quarter, the company had 12 products on track to be blockbusters in 2022. And eight of these products recorded net sales growth during the quarter. This explains how Novartis delivered respectable overall net sales and earnings growth for the first quarter. 

Thanks to Novartis' strong existing product portfolio, analysts believe that the company will generate 4.8% annual earnings growth over the next five years. And Novartis appears to be set looking out over the long haul as well. This is because its drug pipeline is over 160 projects deep throughout therapeutic areas like immunology, respiratory and allergy, and solid tumors. 

Clinical trials are far from a guarantee of robust future product sales. But the number of projects in Novartis' pipeline means a high probability that at least a couple of dozen of those projects will go on to produce meaningful sales.

Novartis' generous 3.9% dividend yield also seems to be well-covered. That's supported by the fact that the stock's projected dividend payout ratio will be 48.9% over the next year. This payout ratio should give Novartis room to grow its dividend in line with its earnings moving forward, which is why I'm expecting mid-single-digit annual dividend growth. 

And investors can pick up shares of the pharma stock at a forward price-to-earnings (P/E) ratio of 13.7. This is only slightly higher than the pharmaceutical industry average of 12.7, which makes Novartis a reasonable value, considering its stacked pipeline.

2. Humana

Humana's (HUM 1.10%) $58 billion market cap makes it the fifth-biggest publicly traded health insurer.

There are arguably few better industries to be invested in than health insurance. Market research firm Vantage Market Research predicts that rising healthcare expenditures and the increasing frequency of chronic medical conditions will drive healthy demand for the industry. This is why the market research firm forecasts that the global health insurance market will grow at 4.4% annually from $2.6 trillion in 2021 to $3.3 trillion by 2028.

Humana's prominence in an industry with an encouraging growth outlook explains why analysts are anticipating that the company will post 14% annual earnings growth over the next five years. And with the stock's dividend payout ratio poised to be 12.4% in 2022, Humana should have plenty of double-digit annual dividend growth left in the tank. In my opinion, this compensates for the low starting yield of 0.7%. 

The stock's forward P/E ratio of 16.8 is slightly higher than the healthcare plan industry average of 16. But I believe this premium is justified. This is because Humana's 14% annual earnings growth potential is superior to the industry average of 12.8%.