Investing when the market is at an all-time high can seem counterintuitive. But JPMorgan recently published a study, and the results are illuminating: Between 1988 and 2020, if you had invested in the S&P 500 at all-time highs, your total return over any one-, three-, or five-year period would have been greater than if you'd invested on another random day. In other words, people who bought at the peak actually did better than those who sat on the sidelines.

With that in mind, the S&P 500 is currently within 1% of its high, but Netflix (NFLX -0.63%) and Zscaler (ZS 1.28%) look like smart long-term investments. Here's why.

Young adults watching streaming content on Netflix.

Image source: Getty Images.

1. Netflix

In its campaign to upend the entertainment industry, Netflix has accomplished what few companies ever manage: Its brand name has become a verb (e.g. Netflix and chill). And one of the drivers behind that feat is its pursuit of original content.

Since introducing Netflix originals in 2013, the company has produced over 2,300 titles, which now represent over 35% of all content on its platform. More importantly, Netflix's original films have been nominated for 89 Oscars and won 15 awards, and its original television series have been nominated for 225 Emmys and won 43 awards. In short, Netflix is not just making content, it's making good content.

This creates a sort of flywheel effect. As more subscribers join Netflix, the company collects more data for its AI models, which inform decisions about future content development. Over time, this makes Netflix's programming more appealing to viewers, and it allows the company to make more personalized recommendations. In turn, that should help it win new subscribers and retain existing ones.

Netflix also benefits from its first-mover status, and its brand name has become synonymous with premium streaming content. Collectively, these advantages have helped the company grow quickly.

Metric

Q2 2018 (TTM)

Q2 2021 (TTM)

CAGR

Subscribers

130 million

209 million

17%

Revenue

$13.9 billion

$27.6 billion

26%

Data source: Netflix SEC filings, Ycharts. TTM = trailing-12-months. CAGR = compound annual growth rate.

Investors should also note that Netflix has raised subscription prices over the time period shown above. Specifically, the average monthly revenue per paying membership has climbed from $10.45 in June 2018 to $11.67 in June 2021, an increase of nearly 12%. This demonstrates the company's pricing power, and reiterates the importance of its original content strategy, as exclusive films and series help Netflix differentiate itself from rivals.

Of course, Netflix can't raise prices indefinitely, but I believe the company still has plenty of growth levers. For instance, paid membership rates in Latin America and the Asia-Pacific region are still relatively low compared to those in North America and Europe. And Netflix recently announced the upcoming launch of video games on its platform.

2. Zscaler

Cyberattacks are becoming more common, fueled by the proliferation of connected devices and the rise of remote work in the wake of the pandemic. In fact, a recent study from Zscaler identified a 700% increase in malware targeting internet of things (IoT) devices compared to pre-pandemic levels. Even worse, the report found that 76% of these devices still communicate on unencrypted channels, leaving corporate networks vulnerable to attack.

That's where Zscaler can help enterprises defend themselves. The company's cloud, called the Zero Trust Exchange, relies on a distributed network architecture known as a secure access service edge (SASE). This type of network accelerates and protects corporate resources like applications and data, while eliminating the need to buy and maintain on-site hardware.

More importantly, research company Gartner has recognized Zscaler as the clear industry leader, citing the depth of its protective capabilities and the breadth of its network as differentiating factors. That value proposition has been a powerful growth driver for this cybersecurity company.

Metric

Q3 2018 (TTM)

Q3 2021 (TTM)

CAGR

Revenue

$170.5 million

$601.9 million

52%

Data source: Ycharts. TTM = trailing-12-months. CAGR = compound annual growth rate. Note: Q3 2021 ended April 30, 2021.

Investors should note that, while Zscaler is not profitable on a GAAP basis, the company did generate $127 million in free cash flow over the past 12 months. That's encouraging, as it indicates that Zscaler produces sufficient capital to maintain operations without seeking external infusions of cash (e.g. debt or equity).

Looking ahead, the company still has plenty of room to grow its business. It currently has roughly 4,500 clients representing 20 million paid users, but management believes that figure could grow to as high as 600 million users. In fact, Zscaler puts its addressable market at $72 billion, over 100 times its trailing-12-month revenue.

To capitalize on that opportunity, the company is adding new products. Last December it introduced Zscaler Cloud Protection, extending its zero-trust solution to cloud workloads. This followed the launch of Zscaler Digital Experience in 2019, which allows clients to measure user experience across business applications. In both cases, these products enhance Zscaler's ability to monetize its business, and make its platform a more well-rounded solution.

Here's the bottom line: Cybersecurity is only becoming more important, and Zscaler's SASE is the best network security product on the market. That's why this growth stock looks like a smart long-term investment.