Most of the time, investors should be aiming to buy stocks on a dip. Why pay more when a little patience (and some short-term market fluctuations) will allow you to get more bang for your buck?

There are occasions though, when it makes sense to step into a ticker that’s not only at a high, but outright soaring. Although a pullback may be in the cards at some point in its foreseeable future, the greater risk is waiting, only to see that ticker continue logging gains. The trick, of course, is knowing when those occasions occur.

With that as the backdrop, here’s a closer look at three stocks near rally-driven highs that still make for great long-term investments at their present price.

1. Home Depot
The real estate picture is supposedly gloomy. Sales of new homes remain roughly in line with pre-pandemic levels, and they’re only that high because existing home sales remain just above the multiyear low hit late last year. Owners aren’t giving up their low-interest mortgages, while cash-strapped consumers just aren’t interested in shelling out a ton of money for a house that may not hold its value. Spending on remodels is down too.

So why are shares of home improvement retailer Home Depot (HD) at a new 52-week high that’s in line with their late-2021 peak (when spending on homes and home improvement projects was surging)? Because investors are looking forward rather than backward.

Reality: Number-crunching done by real estate sales platform Zillow reports the United States’ current housing shortage stands at 4.5 million, up from last year’s tally of 4.3 million. Between the nation’s continued population growth and the sheer limit to the number of houses the home construction industry is capable of building in any given year — around 1.5 million — it could take several years to close this gap. There’s also just a bunch of pent-up homebuying waiting to be unleashed, with many would-be buyers waiting on the sidelines for interest rates as well as home prices to come down… which they now are.

Being the biggest name in the business, Home Depot is perfectly positioned to capitalize on this demand.

Investors keeping close tabs on Home Depot will point out that its results don’t jibe with this narrative. Last quarter’s sales were flat, while same-store sales within the U.S. fall 3.6% year over year. The retailer also lowered its full-year earnings guidance with its most recent quarterly numbers.

The underlying headwind is seemingly winding down, though, putting Home Depot back in position to dominate the growing home improvement market. Heck, the analyst community believes Home Depot’s top line will start growing again next fiscal year, with earnings growth to resume the year after that on the heels of lower interest rates and more stabilized supply and demand. That’s what the stock’s recent buyers are keying in on.

2. Coca-Cola
Coca-Cola (KO) is such a commonly suggested stock pick that it’s almost become cliché. Indeed, it’s arguable that the reason shares are still within sight of last month’s record high is that it’s one of the few tickers investors know is safe and reliable enough to own in these uncertain times.

The thing is, the crowd is correct. Coca-Cola is one of the market’s very best all-around-resilient names regardless of the environment.

That doesn’t mean the beverage giant has an impressive growth engine to rev. This is a slow-moving business to be sure. This year’s projected revenue growth of a little over 8% is something of an outlier, in fact, exaggerated by last year’s anemic comparison. The coming year’s projected sales growth of just under 5% is in line with the company’s longer-term norms. Ditto for earnings, which have only grown at a slightly faster pace, and should continue to improve about as much.

What Coca-Cola lacks in growth pizzazz, however, it more than makes up for in consistency. The company’s now raised its dividend every year for the past 62 years, with its ability to pay it never really coming into doubt.

That’s the upshot of being the biggest name in the business, and managing a wide range of leading beverages well beyond your namesake cola. See, this company also owns Gold Peak tea, Minute Maid juice, Powerade sports drink, and Dasani water, just to name a few. Not only does it always have something to meet the world’s ever-evolving tastes, it enjoys a great deal of sales and marketing leverage.

Bottom line? As long as consumers get thirsty, The Coca-Cola Company should be able to generate at least some degree of sales growth.

3. Microsoft
Finally, add software powerhouse Microsoft (MSFT) to your list of soaring stocks to buy and hold for the next 20 years.

The usual bullish arguments apply. Those are, the world still heavily depends on Microsoft’s software. Roughly one-third of the world’s students, businesses, and individual consumers still choose Microsoft’s productivity tools like Word and Excel, while numbers from Global Stats’ Statcounter indicate Microsoft’s Windows is installed on nearly three-fourths of the world’s computers.

Then there’s cloud computing. Although Amazon Web Services remains the planet’s single-biggest cloud computing service provider, there’s more than enough business here to go around. Microsoft is the fastest-growing name in the cloud computing arena, in fact, according to data collected by Synergy Research Group as well as market research outfit Canalys.

Given how much of its software and services are rented rather than outright purchased, it comes as no surprise that Microsoft’s top and bottom lines have been growing rather steadily for years now.

None of this strength, however, is at the heart of the reason you’d want to step into Microsoft stock even in the wake of its 86% advance from its early 2023 low. The overarching reason this company is a compelling 20-year investment is its proven willingness and ability to address new opportunities as they surface.

Think about it. Twenty years ago, cloud computing wasn’t even a thing. Twenty-five years ago, the Xbox video gaming console didn’t exist. Even just five years ago Microsoft wasn’t likely thinking an artificial intelligence platform would be ready to monetize, yet its Copilot Pro is now available to paying subscribers that want to get more out of their computers.

We don’t know what Microsoft’s next big development is going to be. Given its track record of innovation along with the world’s dependance on so much of its existing technology, however, there’s little doubt it will be able to continue growing its top and bottom lines.

— James Brumley

Where to Invest $99 [sponsor]
Motley Fool Stock Advisor's average stock pick is up over 350%*, beating the market by an incredible 4-1 margin. Here’s what you get if you join up with us today: Two new stock recommendations each month. A short list of Best Buys Now. Stocks we feel present the most timely buying opportunity, so you know what to focus on today. There's so much more, including a membership-fee-back guarantee. New members can join today for only $99/year.

Source: The Motley Fool