For shoppers looking for good deals, Costco Wholesale (COST 1.01%) is a dream come true. The warehouse club retailer sells all sorts of things at extremely attractive prices, from rotisserie chickens to hot dogs to $250 Disney gift cards for $224.99. It's ironic, therefore, that this retail chain known for bargains has a stock that's anything but a bargain.

In the business world, businesses (whether public or private) are bought and sold largely based on their future financials. For example, for a business with $10,000 in annual profits, someone might buy a stake in the company based on the idea that the business will eventually post profits of $50,000. Or for a business with $1 million in annual revenue, someone might buy in on an assumption the company will soon report $1.5 million in revenue. There's a lot more that goes into it, but you get the idea. Investors are willing to pay a premium to get in on the future potential of the company.

When buying a business though, investors should also be concerned about recouping their cash and eventually making money on their investment. Therefore, it's important to not overpay up front.

Investing great Warren Buffett encourages people to think about the stock market in the same way. In his 1987 letter to Berkshire Hathaway's shareholders, he wrote that when he and business partner Charlie Munger bought stocks, "We approach the transaction as if we were buying into a private business."

Applying this concept to Costco stock should give investors pause. From a profit perspective, Costco stock trades at a price-to-earnings (P/E) ratio of 47. That valuation is double the average P/E ratio of the S&P 500, which currently sits at 23. It essentially means investors think Costco is worth buying at twice the price of an average stock.

Perhaps some would object to the comparison. After all, Costco is a very high-quality business (as I'll explain) and consequently should have an above-average valuation. That may be true. However, looking at the history of Costco's P/E ratio and its price-to-sales (P/S) ratio, investors can plainly see that its valuation has recently skyrocketed well above what's been considered normal in the past.

COST PE Ratio Chart

COST PE Ratio data by YCharts.

Compared to most other stocks, Costco stock is expensive. And even compared to where it has traded in the past, it's pricey. This being the case, what should investors do now?

Here's what investors should do

Costco stock is expensive, and for this reason, I believe it's likely to underperform the market in 2024. However, ignoring Costco entirely could be a mistake. There are only so many high-quality businesses in the world, and I believe Costco qualifies as one of them. The company generates hundreds of billions of dollars in sales with a low profit margin. But it earns 73% of its profits from membership fees.

Costco has over $6.5 billion in trailing-12-month net income, and nearly three-quarters of that came from membership fees. Right now, its members are renewing at a 93% rate. Investors will struggle to find many other businesses with such a high retention rate.

Investors shouldn't ignore a high-quality business like this. But they should likely wait for a better price before buying its shares. And that's the encouraging thing: Costco's stock price has dropped by 10% or more nearly once a year for the last decade, so a more reasonable valuation is likely coming at some point soon.

COST Chart

COST data by YCharts.

Given that, if you're a Costco shareholder, it might seem like a sensible strategy to sell your shares now while they are carrying an unusual premium and repurchase them later for a lower price. But that's likely a bad plan.

To succeed over the long term in investing, it's important to hold on to your winners. Yes, I believe Costco stock is overvalued and will likely underperform in the coming year. But the business is still set up for long-term success, and there's no way to know for sure when its next pullback will actually happen -- some stocks trade at expensive levels for much longer than one would expect.

If a Costco shareholder tried to execute a timely sell and then guess when to make the subsequent buy, they'd risk selling a winner prematurely. They might also mistime the window for repurchasing shares. Attempts at market-timing moves like this can be devastating to one's overall long-term portfolio returns.

It might sound like I'm talking out of both sides of my mouth, but I'd assert that it's reasonable to approach Costco stock differently depending on whether or not one already owns shares. For those who don't own this stock, it's reasonable to wait for a more attractive price. For those who do own shares, the smart course of action is to hold on to this long-term winner.

It goes back to something that Charlie Munger used to say: "The first rule of compounding is to never interrupt it unnecessarily." He might not have been thinking about Costco stock specifically when he first said it. But then again, he was a Costco shareholder. And just before he passed, he said, "I'm never going to sell a share."