A tried and tested way of making money in the stock market is to buy and hold on to great companies for the long run, as this strategy enables investors to benefit from secular growth opportunities and emerging trends, and most importantly, it gives their portfolios the chance to benefit from compounding.

Of course, volatility in the market could make investors jittery about putting their money into stocks. But one should remember that the stock market averages solid returns over the long run despite periods of volatility. That's why investors with $1,000 in investable cash should consider buying shares of companies operating in lucrative niches such as cybersecurity and artificial intelligence (AI), two hot trends that are here to stay.

So if your bills are paid, you don't have any high-interest debt to pay off, and you've saved enough for a rainy day, then it may be a good time to buy shares of CrowdStrike Holdings (CRWD 0.24%), Fortinet (FTNT 1.29%), and Zoom Video Communications (ZM 1.73%). Let's look at the reasons why.

These stocks are powered by growth in cybersecurity

The cybersecurity industry is considered recession-proof, since organizations, governments, and individuals can't avoid investing in their cyberdefenses, given the growing number of online threats. According to McKinsey, the annual damage from cyberattacks could hit a whopping $10.5 trillion by 2025, a massive 300% increase from 2015 levels.

The management consulting firm also adds that annual cybersecurity spending of $150 billion in 2021 suggests that there is a low level of penetration of cybersecurity solutions despite the spike in the types and volume of threats. That's why McKinsey forecasts that there's a huge addressable opportunity worth $1.5 trillion to $2 trillion in this market.

And that explains why CrowdStrike and Fortinet have been growing at an impressive pace.

CrowdStrike ended fiscal 2023 (the year ended Jan. 31) with $2.24 billion in revenue, a 54% increase over the prior year. The company benefited from an increase in the number of subscription customers, as well as a jump in the adoption of its services. What's more, the company was ranked No. 1 by market research firm IDC in the global endpoint security market for the third straight year.

It controlled 17.7% of this market last year, up from 13.8% in the prior year. The endpoint security market is expected to generate $28.3 billion in revenue by 2027. Assuming it reaches this point, CrowdStrike's growing influence in this space should give its top and bottom lines a boost in the long run.

Consensus estimates suggest that CrowdStrike could clock in with a compound annual growth rate of 56% over the next five years, which is why investors looking for a growth stock could consider putting $1,000 into this cybersecurity specialist. After all, CrowdStrike has turned a $1,000 investment in its initial public offering (IPO) into almost $2,100 in just under four years and could replicate its hot stock market run in the future as well.

Just like CrowdStrike, even Fortinet has been growing impressively. The company's 2022 revenue of $4.42 billion was up 32% over the prior year. More importantly, Fortinet's deferred revenue increased at a faster pace of 34% over 2021 to $4.64 billion, while billings also increased by a similar number to $5.6 billion.

The faster growth in Fortinet's billings and deferred revenue compared with its actual revenue is an indication that the company is building a solid future revenue pipeline. That's not surprising, as customers have ramped up their spending on its offerings. For instance, Fortinet landed 181 deals worth $1 million or more last quarter, up from 122 in the year-ago period. Meanwhile, the number of deals worth $500,000 or more also increased rapidly to 450 from 320 in the prior year.

Fortinet can sustain its impressive growth, as it gets a quarter of its business from the software-defined wide area network (SD-WAN) and operational technology (OT) cybersecurity markets. These are fast-growing niches, as the SD-WAN security space is expected to generate 21.2% annual growth over the next decade, while the OT security market could expand at an annual rate of 15.5% over the next five years.

As a result, Fortinet should be able to deliver robust growth against last year's revenue of $4.4 billion.

FTNT Revenue Estimates for Current Fiscal Year Chart

FTNT Revenue Estimates for Current Fiscal Year data by YCharts

It's also worth noting that Fortinet has turned a $1,000 investment into more than $13,500 over the past decade, and the huge addressable opportunity in the cybersecurity market could help it remain a top cybersecurity stock for years to come.

AI could be the next big catalyst for Zoom

A $1,000 investment in Zoom Video Communications stock during its IPO in April 2019 climbed to more than $8,700 in the space of just 18 months, thanks to the COVID-19 pandemic that led to a massive surge in the company's user base, revenue, and earnings. However, Zoom stock has fallen dramatically ever since and now trades close to the lower end of its 52-week range.

However, the boom in AI adoption could prove to be the next big growth driver for Zoom stock. Vijay Parthasarathy, the head of AI at Zoom, wrote in a blog post last month that 75% of work conversations are going to be recorded by 2025, citing Gartner's estimates. Zoom can help its clients make the most of the recorded meetings with the help of natural language processing algorithms that will automatically summarize and extract "key information such as next steps, highlights, and more."

The good part is that Zoom is working to integrate AI into more functions such as Zoom IQ for Sales, which can help an organization's sales teams improve their efficiency. The company's focus on such a growth hotspot could turn out to be a nice catalyst for Zoom stock in the long run and help accelerate its growth.

Analysts currently anticipate Zoom's earnings to decline at an annual rate of 10% for the next five years. However, the good part is that analysts have been turning positive about Zoom in recent months as the earnings forecasts for the ongoing and the next fiscal year have increased substantially. The advent of new growth drivers such as AI could further improve Zoom's growth prospects and turn it into a solid AI stock in the long run.