One of the few certainties about investing on Wall Street is uncertainty over the short term. After all three indexes climbed to multiple record highs in 2021, last year saw the Dow Jones Industrial Average, S&P 500, and Nasdaq Composite plunge into a bear market.

The interesting thing about volatility on Wall Street is that investors will always find a bright spot. For the past couple of years, when the going has gotten tough, investors (new and tenured) have turned to companies enacting stock splits.

A blank paper certificate for shares of a publicly traded company.

Image source: Getty Images.

A stock split is an event that allows a publicly traded company to alter both its share price and share count without having any effect on its market cap or operations. Forward stock splits reduce a company's share price to make it more nominally affordable to everyday investors without access to fractional-share purchases with their broker. Meanwhile, reverse stock splits increase a company's share price, usually with the purpose of avoiding delisting from a major exchange.

Most investors tend to gravitate to forward stock splits given that companies conducting forward splits have outperformed and out-innovated their competition.

As we steam ahead into June, one stock-split stock stands out as a phenomenal buy, while another should be avoided like the plague.

The stock-split stock to buy hand over fist in June: Palo Alto Networks

Among the more than half-dozen high-profile companies that have split their stock over the past couple of years, the one that stands out as a surefire buy in June is cybersecurity company Palo Alto Networks (PANW 1.37%). For those curious, Palo Alto completed its first stock split as a public company (3-for-1) in September 2022.

Even the best stocks have headwinds to contend with, and my top stock-split stock for June is no exception. The biggest hurdle that Palo Alto has to contend with is the company's valuation. Investors buying into this growth story right now would be paying about 44 times Wall Street's consensus earnings for fiscal 2024 (Palo Alto's fiscal year ends on July 31).

While not egregiously high, it's certainly higher than some investors would like to see with talk of a U.S. economic downturn swirling. If the U.S. were to dip into a recession, investors' willingness to buy and hold growth stocks valued at a premium would almost certainly dwindle.

But there's another side to this story, and it's one reason Palo Alto Networks is a no-brainer buy at the moment. While cyclical businesses could be hurt by a recession, cybersecurity has evolved into a near-necessity service for businesses with an online or cloud-based presence. Hackers don't take time off from trying to steal personal information just because the U.S. economy or Wall Street are struggling. Regardless of how well the economy or stock market are performing, demand for cybersecurity solutions remains consistent.

What's made Palo Alto Networks such a rockstar is the company's operating shift to cloud-based software-as-a-service (SaaS) subscriptions. Cloud-based SaaS solutions are more adept than on-premises solutions at spotting potential threats.

Furthermore, SaaS should help with revenue retention and lead to higher operating margin over time. Since the end of fiscal 2018, the percentage of revenue derived from SaaS solutions has grown from shy of 62% of net sales to nearly 79%, as of the end of the fiscal third quarter (April 30, 2023).  It's no secret why Palo Alto's operating margin keeps climbing.

Another reason to trust in Palo Alto is the company's ability to land high-profile clients. During the April-ended quarter, 25 accounts contributed in excess of $10 million in total bookings, which represents a 136% increase from the prior-year period.  Though adding clients of any size is good news for Palo Alto, big clients have shown they're likelier to purchase additional services over time.

Lastly, Palo Alto Networks has done a stellar job of making bolt-on acquisitions. These smaller purchases are expanding its ecosystem, bringing in small-and-medium-sized customers, and providing a platform to cross-sell its SaaS solutions.

With forecast earnings growth expected to average 34% over the next five years, Palo Alto Networks is a lot cheaper than you probably realize.

Multiple graphics processing units lined up neatly in a row.

Image source: Getty Images.

The stock-split stock to avoid like the plague in June: Nvidia

But not all stock-split stocks can be winners. Among the brand-name companies that have conducted a stock split in recent years, semiconductor stock Nvidia (NVDA 0.76%) stands out as the one to avoid like the plague in June. Nvidia completed a 4-for-1 stock split in July 2021.

To be fair, Nvidia has done a lot of things right, which is why it was able to, very briefly, hit the elusive $1 trillion valuation mark last week.

Topping the list of catalysts for Nvidia is none other than artificial intelligence (AI). AI encompasses using software and systems to handle tasks overseen by humans. What makes AI a multitrillion-dollar opportunity is its machine-learning aspect, which allows software and systems to grow smarter and evolve over time.

Despite having a suite of AI-driven software solutions of its own, Nvidia's primary role in the rise of AI is supplying graphics processing units (GPUs) for data centers. The A100 and H100 GPUs Nvidia has created serve as the foundation that allows AI-driven software and systems to make split-second decisions and process large amounts of data almost instantaneously.

For the moment, enterprise demand for AI solutions is incredibly strong. Whereas Wall Street was looking for Nvidia to guide to perhaps $7.2 billion in sales for the upcoming fiscal quarter, Nvidia's forecast came in at a cool $11 billion.

But as I'd noted with Palo Alto, even high-flying stock-split stocks face headwinds. For instance, Nvidia has seen revenue in one of its highest-margin revenue channels tail off considerably over the past year. After generating between $3.06 billion and $3.62 billion in quarterly gaming revenue between the second quarter (Q2) of fiscal 2022 and first quarter (Q1) of fiscal 2023, gaming sales have dipped to between $1.57 billion and $2.24 billion per quarter from Q2 2023 through the latest quarter (Q1 2024). 

With the worst of the pandemic now in the rearview mirror and life returning to some semblance of normal, people aren't spending hours on end gaming. Even though data center revenue is Nvidia's core sales driver, this drop-off in high-margin gaming shouldn't be overlooked.

Another reason to be leery of Nvidia is the history of next-big-thing investments. Every single next-big-thing investment for the past 30 years has gone through a boom-then-bust phase. This includes the internet, businesses-to-business commerce, genome decoding, 3-D printing, cannabis, the metaverse, and so on. Though AI could be everything pundits suggest it'll be, there's an extremely high probability that investor expectations will outrun actual demand early in the ramp cycle. In other words, we're witnessing yet another bubble on our hands and the AI industry is far from mature.

With the above being said, it's virtually impossible to justify Nvidia's valuation. Investors today are paying approximately 51 times fiscal 2024 consensus earnings (Nvidia's fiscal year ends in late January) and 23 times full-year sales for a company whose growth engine completely stalled in fiscal 2023.

Once again, I'm not questioning the long-term growth and productivity potential that AI offers. Rather, I'm suggesting that AI is far from a mature industry, yet Nvidia is being valued as if nothing could go wrong. Historically, something always goes wrong with next-big-thing ramps.