All investing involves a degree of risk -- and that's especially true for stocks. But investors can minimize the overall risk profile of their portfolios by diversifying their investments across different sectors of the economy.

One sector of the economy that can help your portfolio withstand just about anything is healthcare. That's because the sector provides valuable goods and services to patients, such as medicines, vaccines, medical devices, and health insurance.

For today, let's highlight two high-quality pharmaceutical stocks that investors may want to consider buying and holding for the long run.

A person speaks to their doctor.

Image source: Getty Images.

1. AstraZeneca: An attractively valued growth stock

With over 83,000 employees throughout the world, AstraZeneca (AZN 2.52%) is a truly global business. The company's $199 billion market capitalization positions it as the eighth-biggest drugmaker on the planet.

As you would expect from a large-cap pharmaceutical company, AstraZeneca boasts world-class products. The English drugmaker's portfolio consists of 14 products that are on track to generate at least $1 billion in revenue in 2022. This includes oncology medications Tagrisso and Imfinzi, asthma treatment Fasenra, stomach acid reducer Nexium, and Evusheld COVID-19 monoclonal antibodies, among others.

Given AstraZeneca's massive size and scale, you can't blame investors if they mistake the English pharmaceutical's growth prospects as dull and uninspiring. But with the existing product portfolio and nearly 180 projects currently in clinical development, the company's growth potential is anything but boring. Analysts believe that AstraZeneca's non-GAAP (core) diluted earnings per share (EPS) will compound at 16% annually over the next five years. That's far superior to the drug manufacturer industry's average annual earnings growth forecast of 6.8%. 

Income investors will appreciate AstraZeneca's 2.3% dividend yield, which is meaningfully above the S&P 500 index's 1.6% yield. And investors can snatch up shares of the stock at a forward price-to-earnings (P/E) ratio of 17.7. Considering AstraZeneca's much higher growth prospects, that is actually a compelling valuation stacked up against the drug manufacturer industry average P/E of 14. That's what makes the stock a hand-over-fist buy in 2023. 

2. Bristol Myers Squibb: A bona fide value stock

Like AstraZeneca, Bristol Myers Squibb (BMY 0.49%) is a major pharmaceutical company. Bristol Myers' $155 billion market capitalization makes it the ninth-largest drugmaker in the world.

The company's product portfolio is more concentrated compared to AstraZeneca, with seven drugs that were blockbusters in 2022. The most notable drugs for Bristol Myers include oncology mega-blockbusters Opdivo and Revlimid as well as smash-hit blood thinner co-owned with Pfizer known as Eliquis. 

With these three drugs having already experienced patent expirations or facing expirations by the end of the decade, you would think the company's outlook would be poor. But with numerous recently launched drugs like Sotyktu and Breyanzi, to name just a couple, Bristol Myers should have the star power to offset the revenue declines from these looming patent expirations.

Together with more than 50 compounds currently in different stages of clinical development, this is why analysts anticipate that Bristol Myers will deliver 3.8% annual earnings growth over the next five years.

Yield-focused investors will also value the company's well-covered 3.1% dividend yield. And the stock is trading at a forward P/E ratio of just 9.1. This valuation arguably more than prices in the patent risks facing Bristol Myers in the medium term.