Finally, one solar company has come up with something bright in the third quarter. Although Yingli Green Energy (NYSE: YGE) swung to a loss for the first time in a tumultuous year, its outlook was enough to send the stock northward by around 12%.

Let's take a look at how Yingli fared and what boosted its shares in such difficult times for the industry.

A look at the quarter
Revenues jumped to $667 million, a significant rise of 36% from the year-ago period, as Yingli saw record shipments in the just-concluded quarter. The entire industry has been struggling due to rapidly falling prices of solar products, and the same goes for Yingli as it swung to a loss of $28 million. Same time last year, it had reported a profit of $68 million.

Yingli did manage to keep a tab on its inventories, which crawled up about 23% from last year, a figure which is impressive compared to other illustrious competitors like First Solar (Nasdaq: FSLR) and SunPower (Nasdaq: SPWR), who saw their warehouses piling up crazily. However, it is the future prospects that made Yingli's stock surge.

The ace up its sleeve
China is one of the fastest-growing markets for solar products, and Yingli is in position to tap the maximum out of it. The Chinese solar market will grow to about 3,000 megawatts next year, and Yingli looks to grab 30% of the pie. Although the company has cut its shipment forecast for 2011, the potential jump in shipments in 2012 could bring the shine back to its margins.

Moreover, management believes that the stock is cheaply valued, and they plan to push it up by buying back around $100 million worth of shares over the next 12 months.

Beating the industry blues
The entire industry has been in distress all year, and all players, including Yingli, have seen their margins shrink. But still, I somehow feel confident of Yingli's prospects, as the company has managed to attain the prime position in the key Chinese market. This is a strategic advantage for Yingli, as the majority of solar players depend greatly on the European market, which has been the source of depression this year.

The Foolish takeaway
Yingli's outlook comes as a breath of fresh air in an otherwise gloomy industry. The coming year may turn out to be a good one, but the company's margins can only improve if prices of solar products stabilize. The buyback plan adds further impetus if you're looking to move into the stock, but in my opinion, you should wait till the industry stabilizes and solar unlocks its true potential.

Till then, you can stay on top of the latest developments at Yingli Green Energy by adding it to My Watchlist.