Green investing used to be synonymous with losing money. But while the S&P 500 Index is up 2 percent this year and the MSCI All-Country World Index is up 5 percent, clean energy ETFs have double-digit returns.

The Market Vectors Global Alternative Energy ETF (GEX) sports a 17 percent gain. The Guggenheim Solar Energy Index ETF (TAN) is up 37 percent. All 12 clean energy ETFs are beating the market, and their combined assets just topped $1 billion.

Demand for clean energy continues to rise. China remains a big part of the story: It's targeting a record 17.8 gigawatts of solar installations in 2015, according to Bloomberg Intelligence. More evidence comes from SolarCity Corp., which doubled its installations of solar panels in 2015's first quarter, compared with the same period a year ago. 

This year’s run-up in clean energy ETFs highlights the volatility of these investments, which have had years of horrible underperformance. Even with the recent jump, both ETFs have underperformed the S&P 500 by more than 100 percent since 2009. 

That kind of all-or-nothing performance is common for ETFs focused on narrow themes. That's because they typically hold some volatile small- and mid-cap stocks, as well as foreign stocks. This makes most clean energy ETFs about twice as volatile as the S&P 500––which may be exactly what some aggressive investors want.

For investors who don't want such a wild ride, there's a less volatile option. The United Nations pushed for, and ultimately seeded, two “low-carbon” ETFs last year. The funds take a broad market index and remove a big portion of the carbon footprint from it.

While GEX and TAN are a play on young clean energy companies, the SPDR MSCI ACWI Low Carbon Target ETF (LOWC) and iShares MSCI ACWI Low Carbon Target ETF (CRBN) are cleaner versions of a popular index. 

The carbon emissions of companies in the low-carbon ETFs are 81 percent lower than that of companies in the MSCI ACWI Index, according to MSCI’s carbon metrics. It's not that the ETFs remove any of the "dirty" stocks from the index they track. Instead, they shave the weightings of the biggest carbon emitters while trying to still keep the ETF's performance close to its index.

For example, the index has a 1 percent weighting to Exxon Mobil, while LOWC and CRBN have a 0.13 percent of assets in the company. 

Trimming oil and gas companies has LOWC and CRBN outperforming their dirtier benchmark index by about 0.35 percent. If those companies go on a big run, the ETFs will underperform. In this instance, that may be a price green investors are willing to pay.