Costco (NASDAQ:COST) stock is firing on all cylinders lately; shares of the discount retail juggernaut are up by 20% year to date, trading at fresh historical highs above $160 per share. Let's take a look at the main drivers behind this performance and, more importantly, whether Costco will continue delivering solid gains for investors, or if the company's best days are already in the past.

A smart business model
Costco has a smart and differentiated business model. The warehouse retailer makes most of its profits from membership fees as opposed to margins on product sales. This allows Costco to sell its merchandise for razor-thin profit margins, and customers seem quite happy to pay those membership fees in exchange for the privilege of buying from Costco at conveniently low prices.

The company keeps costs as low as possible, particularly in areas such as marketing and advertising, where many competitors typically spend considerable resources. Costo also relies on smart supply chain strategies, such as purchasing merchandise directly from manufacturers and storing inventory on sales floors instead of using using a central warehouse.

Costco has reached considerable scale; the company is forecasted to make nearly $124 billion in sales during this fiscal year. Scale advantages allow Costco to capitalize on its negotiating power with suppliers to obtain low purchase prices and flexible payment conditions, and the company gets to spread its fixed costs over a massive amount of units, which reduces fixed costs per unit. 

Cost leadership is clearly a huge source of competitive advantage in the industry, and customers appreciate the company's value proposition. Costco has ranked in the leading position in its industry in the American Customer Satisfaction Index in every year since 1999.

The company's biggest competitor is Wal-Mart (NYSE:WMT), and especially its Sam's Club warehouse retail division. But Wal-Mart is no match for Costco when it comes to customer satisfaction -- the company has a satisfaction score of 71 for 2014, considerably below Costco and its customer satisfaction score of 84. Sam's Club in particular is doing better than Wal-Mart overall, with a satisfaction score of 80, but it still comes considerably behind Costco.

Rock-solid financial performance
The retail industry is famously challenging and competitive, and most companies in the business are reporting uninspiring financial performance. On the other hand, Costco is translating its competitive advantages into strong financial performance for investors.

Members remain remarkably loyal to Costco -- its renewal rate was 88% on a global basis during last quarter -- while big markets such as the U.S. and Canada did even better, with 91% of members renewing their subscriptions. Membership fees grew 2.2% in U.S. dollars and 6% on a constant currency basis during the quarter.

Currency volatility and fuel price fluctuations are considerably dragging on Costco's performance in U.S. dollars, but the business is as strong as ever when leaving these external factors aside. Comparable sales excluding currency movements and fuel price deflation grew 7% on a global basis during the nine weeks period ended on November 1. Performance was quite strong across the board: Adjusted comparable sales grew 6% in the U.S., 10% in Canada, and 7% in other international markets.

By comparison, Wal-Mart announced a much smaller increase in constant-currency comparable sales of 2.8% during the quarter ended on October 31. Wal-Mart's Sam's Club division reported a discrete increase of 0.4% in comparable sales excluding fuel during the period.

Importantly, Costco still has a lot of room for expansion. The company owns 686 warehouses around the world: 480 in the United States and Puerto Rico, 89 in Canada, 36 in Mexico, 27 in the United Kingdom, 23 in Japan, 12 in Korea, 11 in Taiwan, seven in Australia, and one in Spain. The company is planning to build 32 new warehouses during fiscal 2016, and management believes Costco has enough room for 1,000 warehouses in the U.S. alone.

Considering that there are still opportunities for expansion at home and that international markets offer tremendous potential, everything indicates that Costco has what it takes to continue delivering solid gains in the years ahead.