One downside of the market's 2024 rally is that investors could see lackluster returns ahead. The S&P 500 gained 20% year-to-date through early November, or about double its long-term annual rate. Many growth stocks are valued near all-time highs.

That unusually strong performance might pave the way for softer results in the short term, especially for the companies that attracted the most attention from Wall Street in recent months.

That's why it pays to focus on the long term and to pack your portfolio with stocks that have durable competitive advantages. You lessen the risk you'll overpay for a business that's about to announce a disappointing string of results.

With that in mind, let's take a look at two companies that could power your portfolio's returns for the next several decades.

1. Costco Wholesale

Costco Wholesale (COST -5.11%) is an attractive way to profit from the best parts of the retail industry while limiting exposure to its biggest downsides. The warehouse retailer offers a defensive operating posture thanks to its $250 billion annual sales haul and its merchandising of both consumer staples and discretionary products (like electronics and cruise vacations).

But you don't have to give up the chance at strong sales growth in exchange for that stability. Costco's most recent results showed a healthy 9% comparable-store sales spike along with a 23% increase in its e-commerce segment.

NASDAQ: COST

Costco Wholesale
Today's Change
(-5.11%) -$49.39
Current Price
$917.69
Arrow-Thin-Down
COST

Key Data Points

Market Cap
$407B
Day's Range
$914.85 - $964.80
52wk Range
$702.00 - $1,078.23
Volume
6,617
Avg Vol
2,246,844
Gross Margin
12.67%
Dividend Yield
0.51%

Its earnings power is more stable than its peers, since most of Costco's earnings come from membership fees rather than merchandise sales. The recurring nature of those fees makes its profits predictable in a way that rivals like Target and Walmart can't match. And the fact that over 90% of members renew their subscriptions means there's plenty of room for the chain to boost its fees every several years.

Indeed, you'll have to pay a premium to own this high-performing business. Shares are valued at 1.5 times sales today, compared to a price-to-sales ratio of 1 for Walmart and 0.70 for Target.

Yet Costco shareholders have room to benefit from the chain's continued market-share wins in both the online and offline retail spaces over the next 20 years. Toss in those sporadic but significant special dividends, and there's every reason to expect more market-beating returns from here.

2. Garmin

If you've been turned off by the rising valuations of tech stock giants like Apple and Microsoft, consider adding Garmin to your portfolio instead.

The GPS device manufacturer just announced banner financial results, with third-quarter sales jumping 24% year over year. Its fitness, outdoor, marine, and automotive divisions each expanded by over 20%, offsetting lackluster results from its aviation segment.

Operating profit margin came in at 28% of sales, which isn't far from Apple's 32% rate. You can own Garmin at a much more reasonable price, with shares trading at 26 times earnings compared to Apple's 37 times earnings.

GRMN PE Ratio Chart

GRMN PE ratio data by YCharts; PE = price to earnings.

Garmin has a proven track record of developing hit tech products, both in consumer spaces like smartwatches and in more niche environments like aviation and marine navigation platforms.

For the stock to win from here, the company must extend that operating momentum while continuing to make smart acquisitions like the recent purchase of marine lighting specialist Lumishore.

Its diverse portfolio and steady stream of innovation have helped it grow sales significantly over the past decade. Consider putting Garmin in your portfolio so you can benefit from the next round of similar successes over the coming decades.