Costco Wholesale (COST 1.01%) stock has beat the market over many years, but in these turbulent times, it hasn't performed so well. It's down about 7% over the past 12 months, and it's up a tepid 6% so far in 2023. 

While the market has been volatile recently, Costco's stock moves have been more or less in line with the broader market's ups and downs.

However, as we go back further in time, its gains outpace the S&P 500's by wider margins. It's been an incredible long-term holding, and when we get back to a bull market, it's likely to soar again. But it's more than a likelihood based on history. Here are three reasons to be confident Costco stock can climb in a bull market.

1. It's all about the members

Costco operates a fee-based membership model that drives customer loyalty and high sales. Members are willing to cough up $60 or $120 annually, depending on the membership type, to benefit from the company's dirt cheap prices that are hard to beat. Once they become members, they have an incentive to shop there instead of somewhere else, leading to high volume. 

Costco's stock fell in the wake of the company's fiscal second-quarter earnings report in February because sales growth is slowing. Sales growth actually came in below Wall Street's expectations, and for a stock with a premium valuation, Costco can't do that without seeing its shares fall in response.

However, the bigger picture is that renewals came in at record rates. In this period of high inflation, consumers are shopping where their dollars go furthest. U.S. and Canada renewals were 92.6% in the fiscal second quarter (ended Feb. 12), with worldwide rates at 90.5%. Both of these figures increased 0.01% from last year's already high rates. Membership rose 7% versus last year, and 630,000 more people became executive members (those who pay $120) during the quarter. They account for 45% of total members but 73% of total sales. 

Costco's sales increased 6.5% in the quarter, a deceleration from the elevated growth it demonstrated since the pandemic started. That slowed even further to 3.5% in February, and Costco may be in for an extended period of sluggish sales growth. 

Putting these metrics together, we see that customers are slowing general spending, but they're demonstrating loyalty to Costco. When the economy improves, that loyalty will fuel growth.

2. Big-ticket items are still on hold

As people cut back on unnecessary spending, larger and more expensive items aren't selling like they used to. Sales of large, discretionary items -- such as jewelry, furniture, and electric items -- made up 58% of e-commerce revenue in the second quarter, and e-commerce sales of large items decreased 15% from last year, dragging down e-commerce sales overall. Large items  were down 11% in stores as well, but they make up only 8% of store sales.

Fresh food sales have been driving sales and management expects that to continue in the near term. But at some point people will get back to buying big-ticket purchases, and loyal members looking for the best prices know where they'll find them.

3. Buy on the dip

As mentioned above, Costco stock fell in February, and it's down over the past year. Shares are trading at 35.7 times trailing-12-month earnings, which is below their five-year average of 36.5. What's interesting is that it typically trades at a significant premium to peers such as Walmart and Target, but it's not that much more right now.

COST PE Ratio Chart

COST PE Ratio data by YCharts

This valuation takes into account current market conditions, but Costco stock is typically valued at a higher premium because of all the factors mentioned: a model that breeds loyalty and volume. Also, Costco operates 848 stores worldwide, including 584 stores in the U.S., and it has a long growth runway for opening new locations.

When is a bull market coming?

Costco stock could still dip lower. The longer the economy is crunched, the longer investors will probably be waiting to see any significant gains from owning Costco shares. But if you have a long-term mindset, this looks like a good buying opportunity. You can't time the market, and when the bull market does come back, you may not have a chance to buy the stock at this valuation.

Nobody knows when the next bull market is coming, but bear markets are always followed by bull markets. If you want to be prepared, have some Costco stock in your basket.