Costs for specialty drugs have soared in recent years and are almost certainly headed even higher. That's bad news for patients and payers. But it's good news for specialty pharmacies, which focus on providing high-cost prescription medications for treating complex conditions such as cancer, rheumatoid arthritis, and multiple sclerosis.

Investors hoping to profit from this trend have limited options available. There aren't too many specialty pharma stocks. However, CVS Health (NYSE:CVS), Express Scripts (NASDAQ:ESRX), and Diplomat Pharmacy (NYSE:DPLO) stand out as top specialty pharma stocks to consider buying in 2017. Here's why they could be smart picks.

Drugs with prescription pad

Image source: Getty Images.

CVS Health: The biggest

CVS Health ranks as the top specialty pharma in terms of revenue. The company operates 23 retail specialty pharmacy stores and 13 specialty mail-order pharmacies. CVS Health's 2015 acquisition of Omnicare also gives it a commanding presence in the specialty pharma market for long-term and post-acute care (LTPAC). 

Of course, CVS is much more than just a specialty pharma. The company also runs the largest retail pharmacy business in the U.S. And it claims one of the biggest pharmacy benefits management (PBM) services operations in the country with Caremark.

Investors should like CVS Health for two primary reasons. First, the company is positioned to grow earnings per share by 10% on average over the next several years. Second, CVS pays a solid dividend, with a current yield of 2.5%. The combination of decent growth with a nice dividend (which is likely to increase in the future) makes CVS Health one of the best specialty pharma stocks around.

Express Scripts: A strong runner-up

Express Scripts is the No. 2 specialty pharma in the U.S. with its Accredo and Freedom Fertility specialty pharmacy business units. The company owns seven specialty pharmacy home-delivery pharmacies and 36 specialty branch pharmacies. 

While specialty pharmacies represent a significant part of Express Scripts' revenue, the company's primary focus is in providing pharmacy benefits management services. Express Scripts is the largest stand-alone PBM in the U.S. The PBM part of the company's business is trying to keep specialty drug costs down at the same time as its Accredo and Freedom Fertility units make more with higher specialty drug prices. 

Although Express Scripts doesn't pay a dividend like CVS Health does, the company appears to be on track for higher earnings growth than its rival. Wall Street analysts estimate that Express Scripts will increase its earnings by an average annual rate of 12% over the next five years.

Diplomat Pharmacy: The best pure-play choice

Diplomat Pharmacy's market cap of around $1 billion might seem puny in comparison to CVS Health and Express Scripts. If you're looking for a pure-play specialty pharma stock, though, Diplomat is as good as it gets. The company is the fifth-largest specialty pharmacy overall, but it's the largest independent specialty pharmacy. 

During the last five years, Diplomat has completed six acquisitions that helped the company grow significantly. These deals, combined with organic growth, enabled Diplomat to increase revenue by a staggering average annual rate of 42%. The company claimed a 4% market share of the total U.S. specialty pharmacy market last year.  

Its meteoric rise has also given Diplomat stock a premium valuation, though. Diplomat's shares trade at 21 times estimated earnings -- much higher than the forward earnings multiples of CVS Health and Express Scripts. But with plenty of new specialty drugs on the way, especially in oncology, the company should be in good shape for the future. 

Best overall pick

My view is that all three of these stocks should perform well in the future. The best pick, in my opinion, though, is Express Scripts.

Express Scripts presents the most attractive bargain. The stock currently is priced at less than nine times expected earnings. When you factor in growth projections over the next several years, Express Scripts looks even cheaper. 

The company faces some uncertainties, most important of which is the potential loss of major customer Anthem. Overall, though, I like Express Scripts' prospects over the long run.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.