Investors looking for the next winning stock should look at historical winners. This could result in identifying unique insights that have helped contribute to a company's success, which can be applied when searching for businesses to buy.

You'd probably struggle to find companies that have rewarded shareholders as much as Costco (COST 1.01%) has. In the last 30 years, this top retail stock turned $10,000 into nearly $1.2 million, including dividends (as of Jan. 29). This gain absolutely trounces the S&P 500 and Nasdaq Composite Index.

It's worthwhile to understand what has led to Costco's success before assessing whether the shares are a smart buy today.

Costco's track record of success

Costco's marvelous historical performance can be attributed to several factors, which all demonstrate that this is a fantastic company.

For starters, Costco has exhibited solid growth in the past. One big component is the expansion of the store base. In August of 1994, the business had 221 warehouses. As of Jan. 25, there were 873 locations across the globe.

More stores have translated to much higher revenue over time. In the last decade, Costco's net sales have increased at a compound annual rate of 8.8%. With the store base expected to expand by 31 locations in fiscal 2024, it appears that there is still a lot of potential to grow.

One key to Costco's successful business model is its memberships. The company currently has 72 million membership households, which pay annual fees to have the right to shop at a Costco location. This is what separates Costco from most other retailers, and it provides the business with a high-margin recurring revenue stream.

While the company is known for selling high-quality merchandise at low prices, the memberships prove that Costco does have pricing power. In June 2017, management raised the price of the membership. Leadership has hinted at another membership dues increase soon. The worldwide renewal rate of 90.5% demonstrates that these memberships are sticky.

This has led to rising diluted earnings per share (EPS), which is probably the most important variable when it comes to long-term stock price gains. In the last decade, diluted EPS has grown at an annualized pace of 14.1%.

I'd also point out that Costco's competitive position is strengthened due to the presence of an economic moat. The company is the world's third biggest retailer, with trailing fiscal 2023 net sales of roughly $238 billion. This gives Costco tremendous scale benefits, letting it flex bargaining power with its numerous suppliers to obtain favorable per-unit costs. These savings are immediately passed on to customers in the form of low prices.

This competitive advantage only gets more powerful as Costco gets bigger, and it's something that will keep the company thriving far into the future.

Is Costco's stock a smart buy right now?

Costco's been a great investment in the past, but it's hard to tell if this will be the case going forward. The stock trades at an expensive valuation, a price-to-earnings ratio of 47.3, which is well above its trailing 10-year average of 33.5. I think this shows that the market fully recognizes how wonderful a business Costco is, and there's no margin of safety for investors.

However, a valid argument can be made that because this is such an outstanding company, it might still be smart to pay a premium to be a shareholder. I don't see any reason to believe that Costco's competitive position is under any threat of disruption, which reduces risk for investors. The ultimate question of whether or not to invest depends on how much growth you think this company can achieve.

Because Costco is already such a massive enterprise, it's reasonable to assume that the gains going forward won't necessarily resemble the past. In my opinion, shares are overvalued at the moment, so I'm not buying the stock.