Costco Wholesale (COST 1.42%) almost never goes on sale. Unlike the prices at its warehouse locations, its stock valuation tends to remain elevated compared to its retailing peers like Walmart and Target.

True to form, Costco's stock has outperformed these and other industry rivals so far in 2023, up nearly 20% through early July. Yet there are some good reasons for this rally, and the stock could still deliver strong returns for investors from here. Let's look at a few reasons why its shares still look attractive.

Prime positioning

Most national retailers are facing a growth slowdown following several years of above-average demand. Costco is no exception, but its wider merchandise selection is helping it navigate the current demand slump.

Consumers are less interested in buying many discretionary products like jewelry and home furnishings. That fact has reduced sales growth to near zero at places like Home Depot and Target in early 2023.

But Costco still managed to grow overall comparable-store sales by 4% in the most recent quarter after adjusting for gasoline price shifts. And declines in its e-commerce segment, which leans heavily toward those discretionary purchases, are moderating. That division shrank by 8% in May compared to a 9% decline in the prior full quarter. Wall Street is right to assign a premium to a business that can outperform in this tricky selling environment.

Steady earnings

Costco generates most of its earnings from membership fees, not from product markups. That's an important distinction in any environment, but it's even more valuable today when demand trends are shifting.

Companies like Target and Tractor Supply are projecting weaker profit margins and falling earnings right now as they work to keep inventory flowing through their networks. Yet Costco's operating margin is holding impressively steady at about 3% of sales. Operating income over the last nine months was $5.3 billion, exactly even with the prior-year period.

COST Operating Margin (TTM) Chart

COST Operating Margin (TTM) data by YCharts

One knock against the stock is that this financial strength doesn't predictably translate into higher cash returns to shareholders as it might with peers like Walmart. The company pays a meager dividend and doesn't regularly spend aggressively on stock buybacks.

Instead, Costco prefers to reinvest essentially all its excess profits each year into extending its price leadership position. That approach maximizes long-term returns by supporting higher market share and rising customer traffic.

The price is right

Costco stock has become just slightly more expensive in 2023, with shares valued at a price-to-sales ratio of 1, compared to a P/S ratio of about 0.9 in January. You could own Walmart or Target for closer to 0.6 times revenue and receive higher dividend income immediately.

However, for growth-focused investors seeking quality, Costco is still an attractive option. The retailer's customer traffic, market share, and profit margin have all held up well through the tough selling conditions in late 2022 and early 2023.

A record proportion of members are renewing their subscriptions today, too, indicating excellent customer loyalty. While investors would prefer to own these assets at a big discount, they shouldn't let a modest stock price rally keep them away from this high-performing business.