This has been an outstanding year for solar stocks, with most climbing steadily throughout 2013. Strong markets in Japan and the U.S. have boosted global demand, and as these markets grow we've seen demand for high-quality modules increase and prices actually rise slightly. This dynamic has been a boon for Canadian Solar (CSIQ -4.38%), SunPower Corporation (SPWR -4.38%), JinkoSolar Holding Co., Ltd. (JKS -1.34%), and SolarCity Corp (SCTY.DL).

SPWR Total Return Price Chart

SPWR Total Return Price data by YCharts

Here's a review of this year's top four solar stocks and why they're outperforming the rest of the market.

Canadian Solar
The turnaround at Canadian Solar has been nothing short of astounding, which is why the stock is up so much this year. In the fourth quarter of last year, the company had $294.8 million in revenue, a gross margin of 5%, and a net loss of $105.0 million.  

By the third quarter of this year, revenue had increased to $490.9 million, gross margin was 20.4%, and net income was $27.7 million.  

One of the things the market loves about Canadian Solar versus other Chinese solar stocks is the exposure to downstream solar. It has built a number of projects in Ontario and has a late-stage pipeline of 1.02 GW. This is becoming more of a utility scale project builder than a module manufacturer, which is a decent place to be in this solar market.

SunPower
Another company with lots of downstream exposure is SunPower, the maker of the most efficient modules in the industry. Utility scale projects have helped drive non-GAAP gross margin up from 14.1% a year ago to 19.1% in the third quarter. SunPower also swung to a non-GAAP profit of $0.44 per share, which crushed even its own expectations.  

Besides utility scale projects, SunPower has a large exposure to Japan's emerging market as well as the U.S. residential market. It has so much captive demand that it is sold out of panels for the next 18 months and is building a new 350 MW plant to increase capacity. This is the first major capacity expansion by a major solar player since the market began falling apart two years ago.

JinkoSolar
Not all Chinese solar stocks have had a great year (see Suntech Power and LDK Solar), but those with strong balance sheets and downstream project exposure have performed well. JinkoSolar has been helped by having just $530.8 million in net debt, which pales in comparison to the billions of dollars drowning larger manufacturers.  

On the project side, JinkoSolar expects to complete 213 MW of projects this year, with a pipeline of 700 MW of utility scale projects and 400 MW of distributed systems, which are among the highest in the industry.

Combine all of those factors with a solid cost structure and you have two straight quarters of profits so far in 2013. That's what helped JinkoSolar become a market leader, something it hopes to expand upon next year.

SolarCity
The most talked about company in solar this year came in fourth among these stocks with a 342% gain so far this year. SolarCity has managed to make distributed solar a viable option for homeowners and commercial building around the country, and it's growing at an incredibly rapid pace: Installations are expected to grow from 278 MW this year to 475-525 MW.  

The industry's first distributed solar securitization deal was also completed last month, opening up a new financing option that will likely be a key to future solar growth.

SolarCity isn't profitable, but that's in part because most of its projects are built with 20-year contracts. It does have $1.74 billion in contracted payments and an estimated $846 million in retained value from those projects, both of which will drive value as they grow.

This was the year when solar power became an economic possibility for millions of Americans, and SolarCity has been a driving force behind that change.

Foolish bottom line
It was a transformative year for the solar industry and as a result these four stocks performed incredibly. Check back next week to see what I see coming for the solar industry next year.