) -- The solar energy industry is booming. With governments subsidizing new installations, companies are racing to build huge solar parks and rooftop installations.

According to the Solar Energy Industries Association, U.S. residential developers installed 164 megawatts of solar capacity in the first quarter of this year, up 53% from the year before.

The U.S. now has 8,500 megawatts, enough to power 1.3 million homes. According to the Solar Foundation, U.S. companies that manufacture and install solar equipment account for 119,000 jobs. In comparison, there are 83,000 coal miners.

In the past, solar development languished because the alternative energy always cost much more than conventional power sources. Projects were only feasible when they were supported by government subsidies. But thanks to economies of scale, prices of solar panels are falling. Navigant Research says that solar power will cost about the same as conventional sources by 2020.

With demand growing, the stocks -- and the exchange-traded funds that track them -- have skyrocketed. This year

Guggenheim Solar ETF

(TAN) - Get Report

jumped 82% and

First Trust NASDAQ Clean Edge Green Energy

(QCLN) - Get Report

, which holds a big stake in solar stocks, gained 68.8%.

Although the long-term outlook for solar power is bright, only investors with strong stomachs should buy after the big run-up. In recent years, solar stocks have proved volatile. Just this week, solar ETFs dipped after

First Solar

(FSLR) - Get Report

, a panel manufacturer, reported declining sales and earnings.

The solar stocks suffered an enormous downturn that began in 2010 and continued through 2012.

The problem was a glut of panels produced by Chinese manufacturers. Supported by government loans, the Chinese factories flooded world markets.

Prices of solar panels dropped from more than $3.00 per watt of power in 2005 to less than $1.00 last year. The price cuts hurt profits of manufacturers around the world -- including those in China. Several companies went out of business. With share prices collapsing, the Guggenheim ETF lost 63.4% in 2011 and 30.7% in 2012.

This year investors became convinced that the picture was finally improving.

The weak prices of social panels helped stimulate demand. In states like California and Hawaii, homeowners rushed to install roof-top panels that no longer seemed exorbitant.

Developers are building massive solar parks that can supply energy to electric utilities. The Chinese have embarked on a massive construction program that promised to soak up extra supplies of solar equipment.

"People have more confidence that the companies will move back to profitability," says Edward Guinness, portfolio manager of

Guinness Atkinson Alternative Energy

(GAAEX) - Get Report

, a mutual fund.

Despite the improving demand, the picture for the stocks is mixed, says Treasa Ni Chonghaile, portfolio manager of

Calvert Global Alternative Energy

(CGAEX) - Get Report

, a mutual fund that invests in wind and biofuels as well as solar.

Although developers that build solar parks are reporting improving profits, manufacturers still face margin pressures. Ni Chonghaile now has 8% of her assets in solar, down from 15% a few years ago.

"A lot of companies still have problems," she says. "We are only interested in quality businesses that are profitable or close to being profitable," she says.

The Calvert fund owns

Canadian Solar

(CSIQ) - Get Report

, which makes solar equipment in China and develops parks in Canada and the U.S.

Although the manufacturing business is struggling, the development operation is showing healthy profits, says Ni Chonghaile.

Another holding is

Advanced Energy Industries

(AEIS) - Get Report

, which makes equipment that is used to convert solar energy into electrical power. "This is a way to play the growth of installations in the U.S.," she says.

Demand for solar power is soaring in Japan, says Edward Guinness. Japan shuttered nearly all its 50 nuclear plants after the Fukushima disaster. To compensate for the lost power, the country has embarked on a massive program to develop solar plants. Japan is expected to add 5 gigawatts of solar power this year, the equivalent of five nuclear power plants. That will create more sales for manufacturers.

Guinness owns

Trina Solar


, a Chinese producer. "They are one of the low-cost producers in the world, and their balance sheet is not stretched," he says.

At the time of publication, Luxenberg had no positions in securities mentioned.

Follow @StanLuxenberg

This article is commentary by an independent contributor, separate from TheStreet's regular news coverage.

Stan Luxenberg is a freelance writer specializing in mutual funds and investing. He was executive editor of Individual Investor magazine.