If you own Walgreen (WBA -1.91%) stock, 2013 has been a great year so far. Is it time to cash in, or is Walgreen still a good investment? Let's dig into how things are looking in this month's stock checkup.

Performance
Walgreen is up nearly 35% year to date. That's an excellent return for a multi-year period, much less a five-month period. How does this performance compare with the rest of the members of the S&P 500 index?

WAG Chart

WAG data by YCharts

The picture says it all. Walgreen stock has trounced the S&P so far this year. Of course, some sectors perform better than others. Let's look at how well Walgreen stacks up against some of its peers.

WAG Chart

WAG data by YCharts

Walgreen easily outperformed both CVS Caremark (CVS -0.82%) and Wal-Mart (WMT 0.96%). However, Rite Aid (RAD -8.33%) blew all of the competitors away in terms of share performance after turning the corner on profitability in the fourth quarter of 2012.    

Valuation
Everyone loves their investments to do well, but has Walgreen stock become too pricey with the big gains of 2013? Let's look at the company's historical price-to-earnings valuation.

WAG P/E Ratio TTM Chart

WAG P/E Ratio TTM data by YCharts

Walgreen's trailing P/E is still quite a bit lower than the levels from a few years ago. However, the P/E is the highest it's been since 2007. This historical comparison, though, doesn't tell us definitively whether Walgreen stock is undervalued or overvalued now.

It can be helpful to look at how other companies are valued. The following chart shows both trailing and forward P/E multiples for Walgreen and its primary rivals.

Source: Yahoo! Finance.

On a trailing P/E basis, Walgreen stock is close in valuation with Rite Aid but stands significantly higher than CVS Caremark and Wal-Mart. However, all four companies are valued roughly the same on a forward-looking basis.

Comparisons between companies can be unwieldy, though, because of differences in their business models. CVS Caremark, for example, also operates the nation's second-largest pharmacy benefits management service. Wal-Mart's operational scope goes well beyond the types of products Walgreen sells.

S&P Capital IQ estimates the fair value of Walgreen stock at around $58 per share. That reflects a 15% premium to the stock's current price. 

Growth potential
The real key to determining whether it makes sense to buy or sell a given stock lies in understanding the company's growth potential. Using history as a benchmark doesn't leave a warm and fuzzy feeling.

WAG Revenue TTM Chart

WAG Revenue TTM data by YCharts

Walgreen grew revenue steadily through early 2012. However, a dispute with Express Scripts resulted in considerable financial pressures. Walgreen seems to be back on track now, though, with the new contract with Express Scripts signed in July.

Earnings growth is a different story. Walgreen's track record has been spotty at best. However, in the most recent quarter the company saw earnings growth of more than 10% year over year. Of course, we also must note that this improvement is compared against the period when Walgreen faced lower sales resulting from being out of the Express Scripts network.

My take is that Walgreen should see more consistent earnings growth going forward. The company appears to have learned its lesson from the Express Scripts debacle. Its recent extension of an agreement with rival CVS Caremark lends support to this premise.

Overall
Is Walgreen stock still a good pick after the great run-up so far this year? I think so. The stock seems to be reasonably valued considering its growth potential. Investors should also consider the 2.2% dividend yield. Overall, my opinion is that the outlook appears solid for Walgreen at this time, barring any major macroeconomic issues.