Investors have had to grapple with a topsy-turvy stock market in recent months. Stubbornly high inflation has caused the Federal Reserve to pivot to tighter monetary policy, recently raising its benchmark interest rates by 75 basis points and marking the biggest increase since 1994. As a result, the stock market has reacted poorly. Since the start of 2022, the S&P 500 has retreated 24%, and investors shouldn't count on the index bouncing back until we're provided with a clearer view of the global economy.

During times of uncertainty, it's never a bad idea to bank on companies with durable business models. One of those businesses, Costco Wholesale (COST -0.12%), is built to power through recessions. Over the past decade, shareholders of the membership-only retail juggernaut have enjoyed a total return of 546%, representing a far superior gain to the S&P 500, which experienced a 232% total return in the same time frame.

Now that the stock has contracted 21% year to date, investors should seriously consider adding it to their long-term portfolios.

Person shopping in brick-and-mortar store.

Image source: Getty Images.

As sturdy as a business gets

Although there is plenty to like about Costco's business, the company's secret sauce is its membership model. In its third quarter of 2022, membership fees only made up roughly 2% of total revenues; however, they represented 73% of the company's bottom line. The retailer also retains its customers extraordinarily well, boasting a 92% renewal rate in the United States and Canada.

Thus, the company's membership program, which only costs $60 per year to join, provides the business with a very consistent stream of profits. Not to mention, Costco has not raised its membership fee since 2017, and it typically does so every five to six years. So investors should be on the lookout for a hike soon.

In Q3, the retail leader grew total sales by 16.3% year over year to $51.6 billion, and earnings per share rose 10.5% to $3.04. Membership fees jumped 9.2% to $984 million, showcasing the company's ability to continually retain customers and add new ones. The operating margin fell 28 basis points to 3.5%, and its net profit margin remained nearly stable at 2.6%.

For the full fiscal year, analysts expect Costco to generate $225.5 billion in sales, indicating 15.1% growth year over year, and earnings per share are projected to climb 17.6% to $13.04. These are rock-solid growth rates, given the company's mammoth size and the existing state of the global economy. And with prices rising and borrowing costs going up, consumers will likely rely even more on Costco and its hard-to-beat low prices.

Costco's valuation is normalizing

It's no secret that Costco has historically traded at a premium relative to its retail peers. Today, the retail captain carries a price-to-earnings (P/E) multiple of 35.2 versus top competitors Walmart and BJs Wholesale, which currently trade at 25.5 and 17.4 times earnings, respectively.

COST PE Ratio Chart

COST PE Ratio data by YCharts.

That said, Costco shares are starting to look enticing compared to their historical trading levels. Over a five-year span, the stock has traded at an average P/E multiple of 36.2, implying that its current valuation is cheap, relatively speaking. Given the ongoing stock market chaos today, investors should keep a close eye on Costco stock moving forward.

Be patient, though -- although it wouldn't be a bad idea to nibble on the stock, for now, I'd wait until we witness a steeper decline. At that time, it would be a wise decision to scoop up shares of the retail king.