The current economic environment has been tough on retailers. Rising interest rates and supply chain disruptions have hurt the earnings of many. And retailers also face the problem of consumers reining in spending. As a result, the shares of many retail stocks have declined.

The market hasn't spared wholesale retail giant Costco (COST 1.04%). The stock has dropped 17% so far this year. But before stuffing Costco into the same bag with struggling retailers, let's take a closer look at this player. Is Costco actually a good bear market buy?

Different from most retailers

Costco's business model is different from that of most retailers. The company actually makes money from shoppers before they even walk through the door. That's because you have to pay for a membership to shop at Costco.

The company sells two levels of membership. There's the standard one for $60 a year, and the $120 executive membership. The latter comes with bonuses such as discounts on various Costco services.

The great news is that the executive level is attracting members -- and they're spending more. Executive memberships rose by 1.2 million from the end of the fiscal third quarter to the fiscal fourth quarter, ended Aug. 28. These memberships account for almost 72% of Costco's global sales.

Membership revenue makes up a significant percentage of Costco's profit. That's because margins on membership fees are high. Managing the membership program doesn't require expensive investments in logistics and transport, for example. So Costco can count on membership revenue to power earnings -- before shoppers even spend a dime in the store.

Now, here you might say: "In times of economic trouble, why would you pay to shop?" Costco's low prices usually make the membership fee worthwhile. And here's where I'll get to the main point about why Costco may suffer less than other retailers during market downturns.

Groceries and essentials

Costco sells groceries and many other essentials, including gas. These are items people can't do without. Whether the economy is booming or sinking, shoppers have to fill up their gas tanks and refrigerators. Costco's low prices and the opportunity to buy in bulk could attract shoppers more than ever when times are tough.

So far, Costco's earnings show that customers keep flocking to this retailer. In the fiscal fourth quarter, net sales rose 15% to more than $70 billion. And more recently, in September, sales climbed 10% to more than $21 billion.

Membership renewal rates also support the idea of shoppers sticking with Costco during these difficult times. In the fourth quarter, the U.S. and Canada renewal rate topped 92%. That's up from a 91.3% renewal rate in the same period a year ago.

So, is Costco a bear market buy? I'm inclined to say "yes." The company has a steady stream of revenue from memberships -- and the category of memberships contributing the most to revenue is growing. Costco's pricing also makes it an ideal place for people to shop when they have to watch their budgets.

Lowest valuation in a year

Costco is trading at 31 times forward earnings estimates. That's around its lowest level by that measure in a year. Considering Costco's growth even in a difficult environment, this offers investors a good entry point.

"But if Costco is such a great bear market buy," you may ask, "why isn't the stock rising?" Costco is actually outperforming the S&P 500 Index.

So, there may be a bit more optimism about these shares than there is about the general market.

But, more importantly, Costco is a buy now because you can snap it up for a decent price -- and probably benefit from a share price recovery and then growth down the road. Costco's already showing us it can increase earnings during difficult times. So once the economic situation improves, the Costco picture should look even brighter. And investors today may reap the rewards over time.