Shares of Wal-Mart (NYSE: WMT) hit a 52-week high on Friday. Let's take a look at how it got there and see whether clear skies are still in the forecast.

How it got here
Where is Wal-Mart, and what have you done with one of the least volatile stocks in existence?

Wal-Mart has been on an absolute tear recently, hitting highs not seen since 2000, when you could literally have thrown a dart and found a winning stock. The company, which is the largest retailer in the world, is benefiting on multiple fronts.

First, Wal-Mart is a safe-haven investment that tends to outperform when investors are skittish about global growth. As long as European woes overhang, investors will seek safer, dividend-paying stocks like Wal-Mart. Second, Wal-Mart waved its magic wand and found a way to get its domestic operations back on track. Wal-Mart's same-store sales rose 2.6% as it added 10,000 new products to its stores, brought back in traditionally strong items, and focused on its everyday low prices even more to get its retail division growing again. Finally, Wal-Mart's peers haven't exactly performed well in Wall Street's eyes. Costco (Nasdaq: COST) has missed same-store sale estimates for two consecutive months, with Target (NYSE: TGT) also missing same-store sale estimates in April.

Despite its sheer size and marketing budget dominance, Wal-Mart still has its work cut out for it. The majority of Wal-Mart's revenue -- 55% to be exact -- is derived from its grocery businesses. Although that's not a "bad" thing, it is a low-margin, slow-growth business that detracts from Wal-Mart's growth strategy (on the other hand, it does add to shopper all-in-one convenience). Meanwhile, WalMex (OTC: WMMVY.PK), the company's subsidiary in Mexico, is currently under investigation for allegations of bribery. This scandal adds to the sea of negative PR the company deals with on a regular basis.

How it stacks up
Let's see how Wal-Mart looks next to its peers.

WMT Chart

WMT data by YCharts

Aside from struggling Target, one-stop retail chains have done a great job of growing revenue over the past five years, with the "Costco of Latin America," PriceSmart (Nasdaq: PSMT) offering the best return.

Company

Price/ Book

Price/ Cash Flow

Forward P/E

5-Year Revenue CAGR

Wal-Mart 3.3 8.5 12.8 5.1%
Costco 3 12 20.3 8.1%
Target 2.5 7 12.1 3.2%
PriceSmart 5.2 22.6 23.2 18.5%

Sources: Morningstar, author's calculations, CAGR = compound annual growth rate.

Each of these companies has a long history of growth, solid profitability, strong cash flow, and strengths and weaknesses to offer investors.

Target offers the most compelling valuation of the group and has been doing what it can with its REDcard loyalty program to drive return business. However, the company's finance division is still recovering from the poor spending habits of its customers.

Wal-Mart offers an equally attractive valuation, even after its recent run. On the other hand, Wal-Mart's business has erred on the side of low-margin products, which detract from its once high-growth potential.

Costco, like Wal-Mart, deals in the business of low-margin items and has managed to outdo Wal-Mart in sales growth over the past five years. Unfortunately, it lacks the international exposure of Wal-Mart and could find high-growth opportunities shrinking if the U.S. economy derails.

Finally, we have PriceSmart, which is the priciest, but also the quickest-growing retailer, of this group, which announced comparable sales increases of 13.2% in May. With growth expectations as high as they are, only Wall Street's whimsical expectations of PriceSmart seem to be getting in the way of a higher stock price.

What's next
Now for the $64,000 question: What's next for Wal-Mart? That question is going to depend on whether it can continue to move in the right direction with its U.S. operations and if it can continue to outperform internationally.

Our very own CAPS community gives the company a four-star rating (out of five), with 89% of the more than 7,000 members expecting it to outperform. I have yet to make a CAPScall on Wal-Mart, and I plan to keep that tradition alive today by remaining undecided on its near-term outlook.

Overall, I won't deny that Wal-Mart can crush local businesses into submission, or that it wrote the book on efficient retail operations. But I do think Wal-Mart's grocery business has the company geared to grow at 3% annually over the next decade, and I'm not sure that's enough to outperform the market indexes over that time period -- especially with all three having corrected moderately from their highs. I like Wal-Mart's dividend and believe it's a staple stock for the risk-averse long-term investor, but I'd much rather see the company get a few more quarters of outperformance in U.S. retail operations under its belt before I'm ready to give it the green light.

If you prefer having international exposure but don't have the time to sift through hundreds of foreign names, then you might be interested in reading about three companies that our analysts at Motley Fool Stock Advisor believe will outperform in emerging markets. Get your copy of this latest, free, special report.

Craving more input on Wal-Mart? Start by adding it to your personalized Watchlist. It's a free service from The Motley Fool to keep you up to date on the stocks you care about most.