Coming into 2013, I called this the year of solar. My thesis was that costs had fallen enough to encourage a significant rise in demand and manufacturers would finally begin to see their financial conditions improve after two years of massive losses. Nine months into the year it looks like the industry is improving more quickly than I expected, and as a result stocks are on the rise.

FSLR Total Return Price Chart

FSLR Total Return Price data by YCharts

The biggest driver of fast rising stocks is a big jump in demand, particularly in new high margin regions. Japan's solar market has exploded and will install about seven gigawatts this year; the U.S. market will grow about 30%; and China's domestic demand is soaking up overcapacity in that country, projecting an average installation rate of about 10 GW in the next three years. This jump in demand has helped the whole industry, but those in a strong strategic position have benefited more than others.

The winners in 2013
For investors, the companies positioned well have also been those improving their bottom lines the fastest. SunPower (SPWR -8.41%) and JinkoSolar (JKS 6.05%) both swung to a profit in the second quarter, and Canadian Solar (CSIQ 1.20%) was close to breaking even as well.

SPWR Net Income Quarterly Chart

SPWR Net Income Quarterly data by YCharts

The big drivers of improving financials at all three companies were Japan sales and their systems businesses. Japan accounted for 28% of SunPower's module shipments in the second quarter, 36% at Canadian Solar, and will be about 10% of JinkoSolar's module sales this year. This is important because margins in Japan are much higher than they were in Europe, which formerly dominated demand. For example, SunPower generated a 16.3% generally accepted accounting principles gross margin in Asia-Pacific and China (dominated by Japan) and had just a 9% GAAP gross margin in Europe.  

The systems business is even more profitable for solar companies and bigger from a revenue standpoint. Canadian Solar announced the sale of 36 megawatts of projects  just a week into July, 16 of which sold for $92.2 million ($5.76 per watt). SunPower sold the 579 MW Antelope Valley solar projects (renamed Solar Star) to Warren Buffett's MidAmerican Solar for up to $2.5 billion ($4.32 per watt). It is also constructing the 250 MW California Valley Solar Ranch. Not only are these projects high margin -- as indicated by a 22.2% Americas GAAP gross margin in the second quarter -- they're a huge boost to revenue and demand. SunPower will make about 1.1 GW of solar modules this year, so these two projects alone account for about 75% of the year's capacity.

JinkoSolar is a little behind the curve in systems compared to Canadian Solar and SunPower, but a $1 billion "strategic cooperation agreement" with the China Development Bank to build solar power plants will help the company expand. Expect system sales to be a big part of the second half of the year and an even more important part of operations next year.  

Growth on our rooftops
The other big growth avenue for investors is in small solar systems installed on residential and commercial rooftops around the world. SolarCity (SCTY.DL) is the U.S. pack leader here and grew residential installations by 144% in the second quarter, to 43 MW. The difference between residential and utility solar is that scale isn't as large as utility projects, so growth will be slower from an absolute MW perspective. But don't underestimate this as a big player in solar long term.  

Residential and commercial solar installations cut down on the need for transmission and distribution lines and allow homeowners to invest in solar. As the industry cuts cost, these smaller installations will be a growing part of the sector and expand around the world. That's why everyone is getting involved.

SolarCity installed about 26% of all residential solar last quarter and accounted for about 6.4% of all installations. If you're looking to invest in residential and commercial solar this is the one to buy.

Lots of risk remains
Just because the solar industry is doing well doesn't mean that all companies are worth your investment. Suntech Power's biggest subsidiary is in bankruptcy and an ongoing restructuring could leave current shareholders with nothing. LDK Solar has missed multiple debt payments this year and is likely headed for a similar fate. Balance sheets matter in solar, particularly in China.

Then there's First Solar (FSLR 2.42%), which has a huge utility scale business (one of the positive industry drivers above) but doesn't make efficient modules that are being sold to Japan and the U.S. residential and commercial markets. First Solar is still profitable, but its margins are declining while efficient module makers are increasing margins and growing markets.

Solar is the place to be
This year has been a great one for the solar industry and shows just how big an opportunity this is for investors. When investing, look for solar companies that have a strong balance sheet, high quality manufacturing, a diverse customer base, and a differentiated product to stay ahead in this market. I think SunPower is well positioned in the U.S. while JinkoSolar and Canadian Solar are still the two best ways to play Chinese manufacturers. 

There will be a few huge winners for those who can pick the right stocks and there's no indication that the meteoric rise of solar stocks will stop anytime soon. Get in and enjoy the ride.