Shares of Walgreen (NYSE: WAG) hit a 52-week high on Friday. Let's look at how it got here and see whether clear skies are ahead.

How it got here
It's been an up and down year to say the least for Walgreen. The company got into a tiff with Express Scripts (Nasdaq: ESRX) about reimbursement rates, and it ended up losing business to rivals such as CVS Caremark (NYSE: CVS) in the fallout. The stock plunged during the impasse, and recently announced results were hurt, but when the two made up this summer with a long-term deal, the stock popped again and we're now reaching new highs.

While Walgreen was negotiating with Express Scripts, CVS was busy taking its customers. The rival chain expects to keep 50% of the business it won during the impasse, and that's helped push CVS's stock up even faster than Walgreen.

WAG Total Return Price Chart

WAG Total Return Price data by YCharts

At least the stock hasn't been a decliner like one of the company's competitors. Over the past five years, Walgreen and CVS have both outperformed Rite Aid (NYSE: RAD), and looking at the numbers, it's not hard to see why. The two dominant pharmacies have similar profit margins and price-to-book values while Rite Aid is losing money and has negative shareholder equity.

Company

Price/Book

Profit Margin

Dividend Yield

Forward P/E

Walgreen 2.1 3.5% 3.1% 10.6
CVS Caremark 1.6 3.2% 1.3% 12.8
Rite Aid N/A (1.1%) 0% N/A

Source: Yahoo! Finance.

This table also shows what little difference there is between Walgreen and CVS, except the dispute over Express Scripts.

What's next?
CVS has clearly been the winner of these two over the past year, but can Walgreen catch up? I think there are reasons to think it can.

CVS is trading at a higher earnings multiple on both a trailing and forward basis. It also pays a lower dividend than Walgreen does. As Walgreen wins back Express Scripts customers and its stake in Alliance Boots begins to add to earnings, I think the results will turn around.

The pharmaceutical business is fairly stable, and an attractive dividend and relatively low valuation will help Walgreen. The stock hasn't gone anywhere for the past five years, but I think there's double-digit upside as the company reduces acquisition costs and returns to more steady-state operations.

For more strong dividend picks, check out our report highlighting nine rock-solid dividend stocks. The report is free when you click here.