This year has been challenging for investors. The market has taken a nasty fall as they weigh the near-term impact of rising interest rates on the global economy.

While the economy could slow in the coming months, it should grow in the decades ahead. That's why it's essential to have a long-term mindset. Many companies should continue expanding at healthy rates in the future because they focus on extended growth trends. Meanwhile, with their share prices lower due to the market sell-off, they look like even more attractive long-run investment opportunities. 

Three companies that fit that bill are Brookfield Renewable (BEPC -0.89%) (BEP -0.73%)CrowdStrike Holdings (CRWD -0.40%), and Prologis (PLD 0.22%). Those with $5,000 in idle cash (or any other amount) to invest for the long term could earn excellent returns over the next two decades by putting that money into these stocks.

1. Brookfield: Plugged into the global decarbonization megatrend

The world's economy needs to transition to cleaner fuel sources to mitigate the worst impacts of climate change. That should drive trillions of dollars into decarbonization technologies in the coming decades. This trend is supplying Brookfield Renewable with a growing pipeline of investment opportunities.

The renewable energy company currently has 75 gigawatts (GW) of projects under development, enough to power over 12 million homes. It expects to develop about 21 GW of those projects by 2030 to double its current operating capacity. That helps support Brookfield's forecast that it can increase its cash flow per share by more than 10% annually through at least 2027.

That should enable Brookfield to raise its dividend by 5% to 9% per year. With the current dividend yield at 3.8%, every $1,000 invested can generate $38 of annual income. That number should rise each year as the company increases its payout.

This dividend income and the company's rising cash flow should enable it to produce double-digit total annualized returns. It has a long history in this regard, providing 17% annualized total returns to investors since its inception. 

2. CrowdStrike: Cashing in on cloud security

Cyberattacks are growing in frequency and cost. Meanwhile, risk factors are also rising as companies move more of their business processes to the cloud and more employees work remotely. Because of that, companies need to beef up their cybersecurity to protect their data. These trends are driving strong growth for cloud security leader CrowdStrike.

The company anticipates a large and expanding total addressable market. It foresees a $75 billion opportunity for its current product portfolio. And it sees that rising to $158 billion by 2026 as the cloud security market continues growing and CrowdStrike expands its products and capabilities.

With annual recurring revenue (ARR) currently at $2.14 billion, it has a lot of resources. The company has been expanding rapidly, with ARR surging 59% year over year. Meanwhile, it's also generating a growing stream of free cash flow, which rocketed 54% during the first half of its fiscal year. That's more money to invest in innovation to capitalize on the enormous need for cloud security.

With a vast and growing market, and a cash-producing business, CrowdStrike should be able to continue expanding briskly for years to come. 

3. Prologis: Enormous embedded growth with additional upside

Consumers are steadily shifting more of their purchases online. That's driving the need for more logistics space to handle growing sales. And the pandemic and related supply chain issues threw a wrench into inventory management strategies. Companies have been forced to abandon "just in time" inventory for "just in case," and lock up additional warehouse space. These drivers are benefiting Prologis, a leading logistics real estate company.

Rental rates on warehouses are soaring, allowing Prologis to charge much higher fees as existing leases expire and it signs new ones at market rates. The real estate investment trust estimates that it can grow the net operating income of its current portfolio at an 8% to 10% annual rate for the next several years, assuming no further increase in rents. 

But rents are likely to continue rising. And the company has a knack for expanding its portfolio by completing high-return development projects and making value-enhancing acquisitions. It recently closed its deal to acquire Duke Realty, significantly expanding its U.S. logistics portfolio.

With a top-tier balance sheet, Prologis has the financial flexibility to continue capitalizing on expansion opportunities as they arise. Add that to rent growth, and the company should be able to continue increasing cash flow per share and its dividend -- which currently yields 3.1% -- at double-digit annual rates for years to come.

Great stocks for the long haul

While 2022 has been challenging for investors, the longer-term picture is much brighter, especially for companies operating in sectors with strong long-term tailwinds. That's certainly the case for Brookfield Renewable, CrowdStrike, and Prologis. This year, they've been under pressure, with shares tumbling 25% to 40% from their recent highs due to the stock market sell-off.

But those lower prices make them look like even better buys right now for those with some cash to deploy into ultra-long-term investments. They could set investors up to earn even higher returns as their stock prices recover.