Warren Buffett is buying stocks at a pace not seen in several years. In the first quarter, he added eight new holdings to Berkshire Hathaway's (BRK.A -0.34%) (BRK.B -0.01%) portfolio. He also increased Berkshire's stake in seven existing positions.

However, the Oracle of Omaha has also sold several stocks. In the first quarter, he completely exited Berkshire's position in Bristol Myers Squibb (BMY -0.30%). But the pharma stock has performed really well in recent months, with shares jumping more than 20% year to date while the overall market has tanked.

Why did Buffett sell one of his best stocks of 2022? He hasn't stated his rationale publicly. However, closing Berkshire's stake in Bristol Myers Squibb is part of a broader pattern.

Good riddance, big pharma?

Bristol Myers Squibb wasn't the only big-pharma stock that Berkshire completely exited in the first quarter. The conglomerate also sold all of its remaining shares in AbbVie

These moves have been telegraphed for several quarters. Berkshire has been reducing its stake in biopharmaceutical stocks on a regular basis. It closed out its position in Biogen and Merck last year. 

A scientist writing on a document while standing in front of a microscope in a lab.

Image source: Getty Images.

Generally, Buffett likes to hold stocks for years. In this case, though, the legendary investor appears to have soured on pharma stocks relatively quickly.

Berkshire loaded up on shares of Bristol Myers Squibb and other drugmakers in 2020. However, most of these stocks have delivered impressive returns so far in 2022. AbbVie, Bristol Myers Squibb, and Merck have trounced the S&P 500 -- and Berkshire itself. 

BMY Chart

BMY data by YCharts.

Of the group, only Biogen has performed dismally. And that's because the company has all but thrown in the towel on Aduhelm after the Centers for Medicare and Medicaid Services refused to pay for the Alzheimer's disease drug in most cases. 

Challenges and opportunities

Bristol Myers Squibb surely faces some big challenges. The company's top-selling product Revlimid must now compete with generic rivals in the U.S. and European markets.

Within the next few years, key patents for several of Bristol Myers Squibb's other blockbusters also will expire. Cancer immunotherapy Yervoy will lose U.S. market exclusivity in 2025, and blood thinner Eliquis will follow suit in 2026. The company's top immunotherapy Opdivo will lose U.S. exclusivity in 2028.

None of this was hidden from Buffett when he first bought Bristol Myers Squibb shares two years ago, though. In some respects, the drugmaker's prospects have improved since then.

For example, Bristol Myers Squibb has won two important U.S. regulatory approvals for heart-failure drug Camzyos (mavacamten) and combination immunotherapy Opdualag this year. The company expects to also secure U.S. approval for deucravacitinib in treating psoriasis later in 2022.

CEO Giovanni Caforio stated in Bristol Myers Squibb's Q1 conference call that he's confident the company can deliver $25 billion or more in non-risk-adjusted revenue growth by 2029. These three new products are critical for the company in achieving that goal.  

A regret in hindsight?

Buffett doesn't hesitate to sell a stock when he loses confidence in the company's management. He also will usually sell when the valuation of a stock gets unreasonably high.

However, neither of these scenarios should apply to Bristol Myers Squibb. Caforio and the rest of the management team have pretty much done what they've promised. The stock remains attractively valued, with shares trading at only 9.8 times expected earnings. 

Buffett would be the first to admit that he's made a few decisions in the past that he later regretted. I suspect that selling Bristol Myers Squibb could be added to that list over the next few years.