FOMO is a terrible thing that often drives people to make bad decisions. That's long been an issue on Wall Street, which usually helps to boost stock rallies to shocking (and unsustainable) heights.

But the reality is that investors will look back at July and see that Boeing (BA 3.00%), 3M (MMM 0.97%), and Goldman Sachs (GS 2.50%) were the top-performing stocks in the Dow Jones Industrial Average and wonder if they should be buying, too. Here's a quick look at each one to help you decide.

1. Boeing still has plenty to work through

While Boeing's stock was a top Dow 30 performer in July, the shares are still 45% below the high-water mark achieved in 2019. So the aerospace and defense stock isn't exactly a stellar performer even though it had a good run last month.

There are some notable crosscurrents here. On the negative side of the equation, Boeing is still dealing with the fallout from the difficult launch of a new aircraft. That was not just a financial hit, but also a blow to the company's industry standing.

That said, the biggest problems are likely behind the aerospace company. And it remains one of the largest airplane makers in the world. Demand for aircraft is expected to be strong as emerging economies move up the socioeconomic ladder and more people fly.

What's most notable for Boeing is its $440 billion backlog, or roughly 4,800 commercial aircraft, that will likely take years to work through. That provides at least some line of sight toward a bright future.

For a long-term investor, Boeing might still be worth a look now that the worst of the troubled new product launch is likely over.

2. 3M sees a near-term positive

Diversified industrial giant 3M was the second-best performer in the Dow in July. The big news for the company was a settlement agreement with water providers reached at the end of June. That was followed up with an earnings report at the end of July that beat Wall Street expectations on the top and bottom lines.

So there's a reason for investors to have taken a more positive view here.

But that single settlement is just the start of the company's efforts to deal with its forever-chemicals issues. It is still working to deal with product liability issues surrounding earplugs it sold to the military.

And despite beating expectations in the second quarter, revenue and earnings fell year over year, suggesting that it is still muddling through a tough period for the industry.

The company is still facing material headwinds, and this is a stock that only more-aggressive investors should be looking at because uncertainty remains quite high.

3. Goldman climbs as investors hope there's no recession ahead

One of the big market fears heading into 2023 was the risk of the U.S. economy falling into a recession. Historically, recessions have been pretty bad for Goldman Sachs' stock price.

That makes total sense, given the company is a financial giant with material exposure to Wall Street. Some of the recent strength in the stock is likely tied to the economy, which appears to be defying the expectations for a pending downturn.

Goldman Sachs is a well-respected company. Investors buying it just need to go in knowing that performance will ebb and flow along with the economy and the ups and downs of Wall Street.

That said, the company's second-quarter earnings, released on July 19, weren't so good; it missed analyst expectations on the top and bottom lines. There were also a number of one-time charges to digest.

But investors seem to be betting that the future will be brighter than the recent past, which probably assumes no recession. Only more-aggressive investors will probably want to make that bet, given the ongoing Fed interest rate increases to slow the economy down.

Tread with caution

Of this trio of top-performing Dow stocks, Boeing probably has the clearest line of sight to the future thanks to its huge backlog.

The picture is particularly hazy with 3M because of its legal and regulatory woes, which have been layered atop a difficult operating environment.

And while Goldman Sachs is a powerful financial giant, the near future is likely to be highly affected by economic activity, which is hard to get a read on right now.