This is not a good year for big department store chains and retailers. J.C. Penney (JCPN.Q) lost more than half of its market value after the company's rebranding efforts failed to improve sales. Sears and Staples are burning cash, and could soon become mere entries in the archives of Wikipedia. To keep same-store sales growth in the 2% range, some companies are investing their gross margins and lowering prices even further, such as Wal-Mart Stores (WMT 0.57%).

The big exception here is Costco (COST -0.12%). This year has been outstanding for the retailer, and with more than $100 billion in annual revenue, Costco keeps growing its top-line and making profits consistently. In the fourth quarter of 2013, the company saw 5% growth in U.S. same-store sales and 7% growth in international sales. Moreover, the company even managed to improve profitability by 1.3% despite the effect of negative currency fluctuations. So what is Costco doing different? Is Costco on its way to replace Wal-Mart and become the largest retailer in the world?

The Costco way versus the Wal-Mart way
Unlike Wal-Mart, Costco uses a paid-membership business model. Customers need to become Costco members in order to purchase merchandise at discounted price, paying at least $55 per year for the membership. This allows Costco to collect most of its profits 12 months in advance. Roughly 70% of the company's operating income is generated in this way.

Source: Costco Investor Relations, Costco Day presentation slides.

The best part of the story is that although membership fees have increased over time, Costco is having no problem in expanding its membership network. In the fourth quarter of 2013, new membership increased 4%, taking the number of members to more than 71 million. Furthermore, most customers are satisfied with Costco's discounts and decide to renew their membership, as evidenced by the recent upsurge in annual membership renewals. In this way, Costco's main profit source is not only improving, it is also recurrent.

Aware of the benefits of having a strong community of customers, Wal-Mart is expanding its Sam's Club subsidiary, which also uses a membership model. However, Sam's Club may be failing to capture market share from Costco. This is because Costco, apart from offering slightly lower price points on certain key products, is trying to improve its customer experience by implementing kind return policies, accepting several payment methods, and adding gift prizes. More importantly, Costco is always changing its brands and introducing new products in order to provide customers with a pleasant "treasure hunt" experience.

At this point, the main advantage that Wal-Mart has over Costco is its pricing power. With more than $400 billion in annual global sales, Wal-Mart can in theory impose the most favorable terms possible from its suppliers and vendors. However, if Costco continues opening 25-40 global warehouses per year, high-single-digit revenue growth rates should help to minimize the pricing power difference between Costco and Wal-Mart.

Lessons from J.C. Penney
The centenarian retailer J.C. Penney, which has not registered a quarterly profit in two years, is an example of how important it is to build and protect a loyal customer base in the competitive retail industry where differentiation is hard to achieve.

This year, the company replaced its famous sales and promotions to adopt an "everyday low price" strategy instead. Such a change may have contributed to build a new brand, but by suddenly abandoning a strong tradition -- last year the company offered more than 500 sales -- this policy also confused loyal customers.

Foolish bottom line
Costco is a great pick for one simple reason: the company excels at building a strong, loyal customer community. This allows Costco to enjoy recurrent, recession-proof revenue, and to get most of its operating profit 12 months in advance via annual membership fees. This competitive advantage should protect the company from competitors such as Wal-Mart and Target, which enjoy stronger pricing power.