The world is going green. And whether or not you agree with the shift to new energy sources, it’s happening. Several years ago, the United Nations reaffirmed that “carbon neutrality by 2050 is the world’s most urgent mission.”

That bold initiative was set in motion in 2015 with the adoption of the Paris Agreement on climate change. Countries representing more than 70% of the world economy committed to achieving net zero emissions by the middle of the century.

Yet even with the planned global move away from fossil fuels to cleaner energy, thematic ETFs linked to the trend have struggled mightily.

During the past year, the iShares Global Clean Energy ETF (ICLN) crashed, falling almost 31%, while the Vanguard S&P 500 ETF (VOO) rose 23.38%. With more than $3 billion in assets, the iShares fund is the largest green energy ETF, and it’s exposed to multiple sub-sectors that have suffered disappointing performance.

Single-sector focused funds have fared worse. That includes the Invesco Solar ETF (TAN), which lost around 44% of its value in the past year alone.

Some of this underperformance stems from negative market sentiment. Amid a spate of bad news, ETF investors yanked $2 billion out of green energy funds during the past 12 months.

Last year, a European solar industry trade group, SolarPower Europe, warned of bankruptcies across the solar industry as a result of overinvestment, the falling prices of photovoltaic panels and increased demand from Chinese suppliers.

And recent auctions for offshore wind power in Britain and the Gulf of Mexico met weak demand, dealing a setback to green energy ambitions for the wind sector.

The electric vehicle market has meanwhile been hit hard by weakening consumer demand, elevated interest rates and the sector’s need to navigate around fast-moving government legislation.

Certain markets now show glimmers of hope, however: The Invesco Global Water ETF (PIO), which has been a rare bright spot during otherwise bad news, gained 10.76% in the past year. The fund tracks the Nasdaq OMX Global Water Index, which includes publicly traded companies that conserve and purify water for homes, business and industries.

Like all young industries, green energy is undergoing rapid change and growing pains. It’s something investors have witnessed in other industries like the internet, semiconductors and telecommunications.

Regardless of these setbacks, the broader shift to renewable energy has corporate and political support. And while it remains to be seen if the global economy will achieve ambitious carbon neutral targets, long-term investors with enough patience can still benefit from the initiatives. And advisors and investors who preserve could be greatly rewarded in the coming years.

Ron DeLegge II is the founder of ETFguide.com and author of several books, including "Habits of the Investing Greats" and "Portfolio Architecture: A Handbook for Investors."