Shares of warehouse club giant Costco Wholesale (COST -0.75%) solidly outperformed the broader market in 2015, posting a 14% gain, according to S&P Capital IQ data. The stock hit a new all-time high of $169.73 during the year before ending 2015 at $161.50.

COST Chart

Costco 2015 stock performance. Data by YCharts.

It's all about consistency
It's not hard to understand why Costco shares outperformed in 2015. Across the retail world, brick-and-mortar retailers suffered at the hands of online competition last year.

Meanwhile, rising wage bills are starting to cut into profitability. This is a major reason why earnings per share will likely decline 10% at Wal-Mart (WMT -0.39%) in the current fiscal year. Wal-Mart's management has already warned investors to expect another steep drop in EPS in the coming year.

By contrast, Costco has been a bastion of stability. Revenue rose 3.2% in the 2015 fiscal year (which ended in August) despite significant pressure from the strong dollar and low selling prices for gasoline.

Costco posted solid sales growth despite facing big headwinds in 2015. Image source: The Motley Fool.

Meanwhile, Costco has always paid its workers extremely well, so unlike Wal-Mart, it didn't face a huge jump in its wage bill. As a result, its EPS grew 15.5% during fiscal 2015. Costco also rewarded shareholders with a sizable special dividend last year, bringing its total dividend payouts for the year to nearly $3 billion.

Even a slowdown in sales growth and a slight dip in EPS during the first quarter of fiscal 2016 didn't hurt Costco stock that much. A slew of one-time items affected Costco's earnings during the quarter, but the company's underlying performance was quite strong.

Investors have been willing to pay a big premium for Costco's reliably strong results. While other retailers -- even huge powerhouses like Wal-Mart -- seem to lurch from one crisis to the next, Costco shareholders sleep well, knowing that sales and profit are on a long-term upward trajectory.