The market has been brutal this year. Investors are increasingly concerned that surging inflation will force the Federal Reserve to increase interest rates to the point that it causes a recession within the next year. That could cause corporate earnings to decline, putting further pressure on stock prices.

However, while economic growth could stall in the near term, the outlook for several long-term trends remains firmly intact. Because of that, now's a great time to invest in some of the biggest long-term megatrends. Here are three to invest $1,000 in today.

The global decarbonization megatrend

The global economy needs to spend more than $150 trillion to eliminate climate-impacting carbon emissions over the next 30 years. That represents an unparalleled investment opportunity for companies focused on renewable energy and other lower-carbon energy sources.

Given the sheer size of this megatrend, there are many ways to invest in decarbonizing the global economy. Companies that operate and develop renewable energy-generating facilities are a great place to start. Two companies leading the charge are NextEra Energy (NEE 3.39%) and Brookfield Renewable (BEPC 1.16%) (BEP 1.20%). NextEra Energy is the global leader in producing wind and solar energy. It's also a global leader in battery storage. Meanwhile, Brookfield is a leader in hydropower, has growing wind and solar energy platforms, and has emerging carbon capture and storage, and green hydrogen businesses. Both companies have a long history of creating shareholder value, which should continue as decarbonization investments accelerate in the future.

Cyber risks are rising

Cybercrime cost the global economy $6 trillion in 2021, double 2015's level. According to one estimate, the cost of cybercrime could rise to $10.5 trillion by 2025. One big driver of the rise in cybercrime is that criminals have more attack surfaces as digital transformation moves more business processes online and more employees work remotely thanks to the power of the cloud

Many companies are working on solutions to stop cybercriminals from attacking organizations. CrowdStrike (CRWD -1.82%) and Zscaler (ZS -0.78%) are pioneers of cloud-based cybersecurity. CrowdStrike uses artificial intelligence to identify threats and stop breaches. Meanwhile, Zscaler pioneered the zero trust exchange to securely connect any device to any app from anywhere. CrowdStrike sees a $126 billion opportunity for cloud security, while Zscaler envisions a $72 billion opportunity to secure users and devices. Both companies are expanding rapidly and should continue to do so for many years to come.

Rising e-commerce sales are driving demand for this real estate

Consumers have steadily shifted their purchasing habits from physical stores to e-commerce sites. While that has hurt demand for retail space, it's driving the need for more warehouse space to support online deliveries. E-commerce sales are on track to grow by $330 billion in the U.S. and $1.5 trillion globally by 2025. For every $1 billion of e-commerce sales, the industry needs 1 million square feet of new warehouse space. That suggests the U.S. needs 330 million square feet of additional warehouse space while the global number is 1.5 billion square feet. 

One company leading the global race to build more industrial real estate is Prologis (PLD -7.19%). The real estate investment trust (REIT) recently agreed to acquire its largest rival, Duke Realty (DRE), in a $26 billion deal. The combined company will have a nearly 1.2 billion square-foot global warehouse portfolio. On top of that, they'll have enough land to develop another 214 million square feet of warehouse space in the future, representing a $31.3 billion investment potential. That portfolio has significant upside potential from those development opportunities. It also has meaningful embedded rent growth as leases expire, given that current market rental rates are 47% above their current lease rates.

Focus on the long-term trend, not the short-term noise

Storms might be brewing in the economy, which is causing a cloud of uncertainty in the near term. However, the longer-term outlook is much brighter, especially for companies focused on capitalizing on major trends. That's why investors with some capital to put to work should consider investing it in one of those megatrends. Over the long term, that investment could pay off big-time as the megatrend continues to play out.