Walgreens Boots Alliance (NASDAQ:WBA), the second-largest drugstore chain in the United States behind only CVS Health, is under siege. Falling generic drug prices in the U.S., reimbursement pressures from third-party payers, Brexit, and the so-called "retail apocalypse" have all taken a massive toll on the iconic drugstore chain over the last three years.

The net result is that Walgreens' shares have dramatically underperformed the broader indexes during this aging bull market. The drugstore giant's stock, for instance, has lost an unsightly 32% of its value over the prior 36 months. That's a particularly tough pill to swallow for long-term shareholders, given that the S&P 500 has appreciated by a whopping 53% over this same period. 

A female doctor holding out a prescription pad with her left hand and a pen with her right hand.

Image source: Getty Images.

Can Walgreens mount a comeback, or is it time for shareholders to cut their losses? Let's take a look at both sides of argument to find out.

The case for Walgreens

Despite all these negative headwinds, Walgreens does offer investors a handful of compelling reasons to stay the course. First off, the company's shares are now trading at a meager 9.1 times next year's projected earnings and at a near industry-low price-to-sales ratio of 0.37. That's bargain territory any way you slice it -- especially for a household name that's been business for a whopping 118 years at this point. 

Additionally, Walgreens has proven its worth as a top income play by paying a dividend for 86 straight years. The company has also raised its dividend for a noteworthy 43 consecutive years, earning its title as a Dividend Aristocrat. Moreover, Walgreens' dividend yield of 3.23% is slightly above average for its peer group and its trailing payout ratio of 32.4% implies that its dividend program is sustainable for the long haul. Most large healthcare stocks that pay a dividend, after all, sport far higher trailing payout ratios.

Lastly, Walgreens has been taking drastic steps to reduce costs by closing underperforming stores and accelerating its digital footprint through a unique collaboration with Microsoft. The drugstore giant is also attempting to give customers a solid reason to actually visit its stores, such as its recent partnership with food store stalwart Kroger. Walgreens, in short, does have a plan in place to beef up its digital footprint and to increase traffic at its various brick-and-mortar locations.  

The case against Walgreens

The bad news is that this cost-cutting effort won't change the company's near-term outlook from a top-line perspective. While Walgreens' store optimization and transformational cost management program are slated to stabilize its bottom line over the next two years, these cost-reduction moves simply don't solve the company's core problem -- that is, customers shifting toward online retailers like Amazon.com (NASDAQ:AMZN) as their preferred shopping destination. Making matters worse, Amazon's recent purchase of PillPack gives the e-retail behemoth a foothold in the world of prescription drugs, putting it in direction competition with drugstore chains like Walgreens. 

Now, Walgreens has made strides toward making its digital store a top destination for its core customer base, ensuring that it won't be easily overtaken by newcomers like Amazon. That said, Amazon still holds a key advantage over Walgreens in the field of e-commerce. Amazon, in effect, has a loyal customer base that has become accustomed to the ease with which they can order almost anything through the company's app. So, if Amazon does start offering a wide variety of prescription drugs across the United States, Walgreens might have a hard time retaining its market share.     

Verdict

Walgreens might come across as a highly attractive value stock and income play at these levels. But the company's future is arguably too uncertain to buy its stock right now. After all, Amazon's ability to offer consumers an unparalleled one-stop shopping experience, excellent customer service, and rapid home delivery could prove to be too much for traditional drug store chains like Walgreens. To be fair, Walgreens is trying to improve its value proposition to customers through multiple partnerships, but taking on Amazon is no easy feat.