For most of this decade, CVS Health Corporation (NYSE:CVS) stock handily beat the S&P 500. But not last year. In 2017, shares of the pharmacy services giant fell 8% while the S&P 500 enjoyed a nice gain of 19%.

It's possible, of course, that last year was an aberration. Is CVS Health stock a buy in 2018? Or should investors look elsewhere? Let's examine both sides of the argument.

2018 painted on highway that turns into question mark in the sky

Image source: Getty Images.

The case for buying CVS Health

CVS Health really consists of two businesses rolled into one. The company ranks as the largest pharmacy retailer in the U.S. It's also the second-largest pharmacy benefits manager (PBM) in the country. And there's the possibility that CVS Health could become the fifth-biggest health insurer in the U.S. if the company's acquisition of Aetna (NYSE:AET) goes through.

The long-term investing thesis for CVS Health, with or without Aetna, hinges largely on demographic trends. As baby boomers age, they will need more prescription drugs. That creates growth opportunities for CVS Health's pharmacy stores. But with prescription drug spending rising as the number of older Americans increases, it should also drive higher demand for PBMs to help control those costs. That creates growth opportunities for CVS Health's PBM business.

Now let's add Aetna into the equation. As I see it, there are three primary reasons why buying Aetna makes sense for CVS Health. First, it puts the company in a more competitive position as new challengers arise -- and I'm talking specifically, of course, about Amazon.com (NASDAQ:AMZN). Second, the deal gives CVS Health a boost after losing a couple of major contracts in 2016 to archrival Walgreens Boots Alliance

Third -- and most important -- there could be tremendous synergies from the acquisition of Aetna. A deal could steer Aetna's 23 million medical members to CVS Health's clinics located within its pharmacy stores as well as to its pharmacies. The combination of Aetna and CVS' PBM could negotiate lower drug prices. 

While all of this looks like a great picture for CVS Health's long-term growth, there are also a couple of other reasons to buy the stock. Income investors should like CVS Health's dividend yield, which stands north of 2.5%. Value investors should like that the stock trades at roughly 12.4 times expected earnings.

The case for staying away from the stock

Probably the biggest reason to stay away from CVS Health stock is the potential disruption that Amazon might bring to the retail pharmacy market, and even to the PBM market. Granted, it's not a certainty that the e-commerce giant will expand into these markets, but many outside observers predict that's what will happen.

It's not hard to imagine Amazon allowing patients to refill prescriptions with one click. Even better, patients could just ask Alexa to refill their prescriptions. While CVS Health is rolling out next-day delivery from all of its stores and same-day delivery in some metro areas, such moves might not be enough to compete effectively against Amazon. For customers who prefer to go to a pharmacy (for example, immediately after a physician visit), Amazon could create pharmacies within its Whole Foods stores acquired last year.

Amazon could also offer lower prices to customers and payers thanks to its impressive logistics operation and buying power. Even a large pharmacy retailer such as CVS Health could find itself at a disadvantage. Moving into PBM services would be a natural next step for Amazon after expanding into the retail pharmacy business. And, again, the company's scale would be a big plus in doing so.

Aside from the Amazon threat, there are also reasons to be pessimistic about CVS Health's Aetna deal. Combining pharmacy services with health insurance might sound great on paper, but there are lots of details to work out, and, therefore, lots of ways the integration could go awry.

Also, the total value of the Aetna acquisition is a whopping $77 billion, including assumption of Aetna's debt. CVS Health had a little over $2.5 billion at the end of the third quarter of 2017, with $25.8 billion in debt of its own. Buying Aetna will mean that CVS Health increases its leverage significantly. It would also likely freeze CVS Health's steady dividend hikes that investors have enjoyed in recent years.

And the winning argument is...

Unlike some, I like CVS Health's decision to buy Aetna for the most part. However, I also think there are definite reasons why CVS should be worried about Amazon. If I were a magic eight ball, my answer when it comes to buying CVS Health stock would probably be: "Ask again later." 

When in doubt about buying a stock, the best option is to look elsewhere. There are plenty of stocks that have clear growth prospects and solid moats that investors can buy. CVS Health might continue to be a winner over the long run, but the potential entrance of Amazon into the pharmacy market creates uncertainty, to say the least.

John Mackey, CEO of Whole Foods Market, an Amazon subsidiary, is a member of The Motley Fool's board of directors. Keith Speights has no position in any of the stocks mentioned. The Motley Fool owns shares of and recommends Amazon. The Motley Fool recommends CVS Health. The Motley Fool has a disclosure policy.