It's been a tough year for investors who began 2017 holding shares of either CVS Health Corp. (CVS 0.47%) or Express Scripts Holding Company (ESRX). Both stocks have fallen by a double-digit percentage while the benchmark S&P 500 has tacked on a big 15% gain.

Now that both stocks have fallen a bit, it could be a good time to go bargain shopping. Let's see how these two rivals stack up against each other on some important metrics to find out which has a better chance of delivering market-beating gains in the years ahead.

Two men in business attire playing tug-of-war.

Image source: Getty Images.

Growth

Both companies boast successful pharmacy benefits management (PBM) operations. These businesses band America's private insurers together to negotiate lower prices from the world's drugmakers. Bigger is better in this business, which is one reason Express Scripts bought Anthem's struggling PBM operation for $4.7 billion in 2009. The other reason, at least according to Express Scripts, was Anthem's agreement to accept higher pricing from Express Scripts for 10 years.

Anthem's new management team has since accused Express Scripts of playing unfairly to the tune of $15 billion, decided to run its own PBM again, and hired CVS Health to provide support services for five years beginning in 2020. The aggrieved insurer was responsible for a staggering 19% of Express Scripts' total revenue in the first nine months of the year.

Express Scripts recorded a 1% total revenue slide in the first nine months of the year with Anthem as a client. Over the same periods, CVS Health's PBM reported a 9% revenue gain, which pushed total revenue about 4% higher.

Express Scripts' recent acquisition of Evicore will help it expand beyond pharmacy benefits into the wider world of medical benefits management. Until we see signs the company can offset the impending loss of Anthem's business, though, we can safely expect CVS Health's top line growth to outpace that of its main competitor in the PBM space over the next several years.

Pharmacist holds a pill bottle as he works on a computer.

Image source: Getty Images.

Shareholder appreciation

Express Scripts doesn't pay a dividend, but the $2.8 billion it already spent buying back its own stock this year isn't unusual. Over the past five years, the number of Express Scripts shares outstanding dropped 31%, allowing earnings per share to rise much faster than overall profits.

CVS Health lowered its outstanding share count by 18% over the past five years. That pales in comparison with Express Scripts' share-reduction effort, but CVS Health has also been giving investors a slice of rapidly rising profits in the form of quarterly dividend payments that are 122% larger than they were in 2012.

CVS Health stock offers a nice 2.8% yield, and the dividend appears well funded. The company used just 40% of earnings generated over the past year to make the last four payments. With a commitment to returning profits that its competitor lacks, CVS Health clearly has the upper hand when it comes to shareholder appreciation.

Valuation

Now that Amazon.com, Inc. (AMZN -1.35%) has wholesale drug distribution licenses in 13 states, we can safely assume the e-commerce behemoth will disrupt America's $450 billion market for prescription drugs. That fear has driven shares of Express Scripts and CVS Health down to what looks like bargain-basement prices.

The average stock in the benchmark S&P 500 trades at around 24.4 times trailing earnings, but you can scoop up CVS Health shares for about 14.6 times trailing earnings. Although CVS Health is looking awfully inexpensive, at just 10.3 times trailing earnings, Express Scripts looks even cheaper.

Both stocks also look extremely inexpensive on a forward-looking basis. Right now, CVS Health trades at around 12 times this year's earnings expectations. Express Scripts looks like a better bargain on this yardstick as well, with a recent price around 8.8 times this year's earnings expectations. 

A pharmacist writing on a clipboard as she looks up at shelves of pills.

Image source: Getty Images.

The winner is...

If I had to choose one of these stocks to buy right now, I'd go with CVS Health despite Express Scripts' knockdown price. Express Scripts relied on its PBM network for 50%, and its home delivery and specialty pharmaceutical operations for another 44% of total revenue during the first nine months of the year. CVS Health lumps similar services into a single operating segment that generated 71% of total consolidated revenue reported during the same period, or 62% if you don't eliminate duplicate transactions that fall into multiple segments, like when a member served by the PBM pays for a prescription at a CVS retail outlet.

We don't know Amazon's intentions, and it might be best to avoid both of these stocks until we do know. That said, it sure looks as if CVS Health is better positioned to go 12 rounds if the e-commerce heavyweight enters one or two sections of the prescription-drug arena. Factor in all the dividend payments that you'll get to keep along the way, and CVS Health looks like a far better pick right now.