It can be tough to buy stocks after a big rally. Making a stock buy then can feel like you may be overpaying or that you're stepping right in front of a pullback. More often than not, however, jumping into a high-quality name following a spate of bullishness ends up working out. After all, stocks usually log gains for good reason.

To this end, some of the market's highest-quality companies comprise the Dow Jones Industrial Average (^DJI -0.98%). Here's a closer look at the index's biggest winners from last month. Is it too late to buy any (or all) of them?

Best of the best

The Dow's biggest April gainers are Microsoft (MSFT -2.45%), JPMorgan Chase (JPM 0.15%), and Merck (MRK 2.93%), up 6.6%, 6.9%, and 8.5% (respectively) versus the Dow's more modest advance of 2.6%.

^DJI Chart

^DJI data by YCharts.

Two of those three big gains -- JPMorgan and Microsoft -- took shape instantaneously.

JPMorgan's stock soared in the middle of the month following an impressive first-quarter report. The bank not only crushed revenue estimates of $36.2 billion with actual sales of more than $39.3 billion but turned that top line into a bottom line EPS of $4.32. The analyst community was only calling for an EPS figure of $3.41.

The software giant's shares popped late in the month also due to healthy Q1 numbers. Year-over-year revenue grew to the tune of 7%, driving earnings of $2.45 per share that handily topped Wall Street's expectations of only $2.23. Artificial intelligence and cloud computing were particular bright spots, though more than that, Microsoft's solid quarter helped assure investors that the tech sector isn't in quite as much trouble as has been implied of late.

As for drugmaker Merck, while it posted its Q1 numbers near the end of the month, its stock had been inching its way higher for the better part of April. The Q1 figures simply confirmed what most investors were anticipating. That is, in the midst of the race to develop and manufacture COVID-19 vaccines and treatments, Merck's continued focus on other, more permanent opportunities paid off. Keytruda, the company's cancer-fighting breadwinner, continues to gain traction, with sales up 20% year over year during the quarter in question.

The bigger question remains, however. Which -- if any -- of these three Dow Jones stocks can still be bought following April's benchmark-beating gains?

Answer: All of them.

Built to last and thrive

This isn't always the case. Sometimes, stocks really can race too far out of reach to safely plug into. That's true even for the slower-moving blue chips that tend to be found in the Dow Jones Industrial Average. 

In the case of these three companies, there's plenty more proverbial meat left on the bone.

Take Merck as an example. Last month's 8.5% gain is just the most recent segment of a months-long 50% rally off of its early 2022 lows. But even with this big move, shares are still only priced at less than 14 times next year's projected per-share profits (to be spurred by a relatively tempered 6.2% improvement in sales). The market's simply been underestimating the upside of Keytruda's continued approvals for additional types of cancer. In the meantime, its often-overlooked HPV vaccine Gardasil is starting to make a serious impact on the top and bottom lines.

JPMorgan Chase's healthy Q1 can be repeated as well. Much of its 52% surge in net income stems from the recent rise in interest rates. All told, net interest income of $13.9 billion during the first quarter of 2022 grew to $20.7 billion last quarter. While rates aren't expected to continue rising, they're not apt to fall significantly in the foreseeable future either. In the meantime, JPMorgan was able to acquire most of beleaguered bank First Republic's assets at a deep discount. It should be able to do something fiscally constructive with them, even if it's going to take a while to sort matters out.

Then there's Microsoft, which doesn't need a specific growth catalyst but has one anyway with artificial intelligence. It's now a stakeholder in ChatGPT and is already working on industry-specific and company-specific versions of the automated conversational technology. Meanwhile, the software giant offers a general-use conversational AI service to users of its Bing search engine. Never even mind the fact that the company remains the centerpiece -- and gatekeeper -- of the personal computing world. Its Windows operating system is installed on more than 60% of the world's desktops and laptops, according to numbers from GlobalStats. 

Microsoft shares aren't cheap right now, particularly after April's gains. The stock is currently priced at nearly 30 times its trailing per-share profits and roughly 28 times next year's projected earnings. The thing is, that's right in line with its recent norm.

Recent rallies are the least of your concerns

Given the choice between buying quality stocks on a dip and buying these same stocks following a big gain, I'd rather jump in following a pullback.

Many investors miss out on major opportunities, however, by refusing to buy after a big gain or waiting to buy after a dip that never takes shape. As Robert Burton said all the way back in 1621, it's easy to be "penny wise and pound foolish," meaning our efforts to squeeze out a few extra pennies' worth of value can easily cause us to waste several dollars. Indeed, of all the factors to consider when picking stocks and choosing when to buy them, one month's performance is the least of them. First and foremost, look for quality companies with staying power regardless of their current valuation.