Healthy economic growth has helped lift the business prospects for many retailers this year as fears of a retailing apocalypse have subsided. The nation's biggest chains, in fact, are reporting some of the best customer-traffic figures they've seen in years, even as consumers shift more spending toward the online sales channel.

Costco (NASDAQ:COST) has benefited from those positive industry trends. However, the warehouse retailing giant's business is outperforming rivals like Walmart (NYSE: WMT) and Target (NYSE: TGT), which helps explain why the stock has jumped 27% so far in 2018, compared to a 2% uptick in the broader market. Zooming out a bit, Costco is up about 91% over the past five years to trounce the S&P 500's 56% gain and the 30% increase that both Walmart and Target have achieved.

A customer browses through a warehouse aisle.

Image source: Getty Images.

Starting soft

The foundations for Costco's unusually strong returns were set by low initial expectations. The company's fiscal 2017 was weak, after all, with comparable-store sales slowing to below 4%. Before that, comps had been chugging along at between 6% and 7% as the chain soaked up market share. Sure, Walmart and Target had been growing at a 2% rate, but investors have come to expect a wider performance gap from Costco. The retailer started the year with soft membership trends, too. Renewal rates were stuck at 90% after having peaked at 91%.

Executives predicted that the renewal issues were just temporary, and their conviction on that point was reflected in the fact that Costco raised its annual membership fees for the first time in over five years. The next few quarterly reports showed that management was right to have lots of confidence about this retailing business.

A healthy rebound

Sales in Costco's fiscal second quarter, which includes the holiday shopping period, spiked 6% in the core U.S. market, compared to 3% growth at Walmart and a 4% increase at Target. Costco's profitability far outpaced these peers, meanwhile, as its membership income protected it from the price-cutting wars that rivals engaged in. Its renewal rate ticked higher at the same time.

From there, Costco has extended its leadership position in the industry. Fiscal fourth-quarter customer traffic was just below 5%, or as strong as the chain has seen in recent times. The gains put it well ahead of Walmart but below Target in terms of growth.

Yet Costco's rising subscriber base, padded by a growing store base, improving renewal rates, and increased fees, has helped earnings jump. Operating income is up to $4.5 billion, or 3.2% of sales, over the last year from $4.1 billion in fiscal 2017.

COST Operating Income (TTM) Chart

COST Operating Income (TTM) data by YCharts.

Looking ahead to fiscal 2019, Costco is predicting a challenging pricing environment as costs continue getting pushed higher by inflation and trade skirmishes. If anything, though, that situation should help the warehouse giant win even more business. Its price leadership position allows it to delay passing price increases on to customers far longer than peers. That valuable flexibility will come in handy during the upcoming holiday shopping season, and into the new fiscal year.

Signs of a slowdown would show up in numbers like customer traffic, membership income, and renewal rates. Yet, with each of these metrics at or near record highs, the outlook is bright for this retailer.

Demitrios Kalogeropoulos owns shares of Costco Wholesale. The Motley Fool recommends Costco Wholesale. The Motley Fool has a disclosure policy.