There's no question that the solar sector has hit a rough patch in its short history. Uncertainty and changes to feed-in tariffs in Europe hit the market in the second quarter, just after suppliers had added a glut of new capacity over the past year. And earlier this week fellow Fool Harsh Chauhan said that one of the industry's leaders, SunPower (Nasdaq: SPWRA) (Nasdaq: SPWRB), is skating on thin ice. But an analysis of past profits and current challenges discounts the changes that are going to happen in the industry going forward.

I have long contended that there are three distinct strategies to investing in solar stocks: cost leaders, efficiency leaders, and everyone else in between. In solar, the cost leader is First Solar (Nasdaq: FSLR), the efficiency leader is SunPower, and everyone in between means Chinese manufacturers, which all produce a similar product.

SunPower has been one of my top picks because of its high efficiency modules and ability to innovate improved products, while still sporting a strong strategic advantage.

What efficiency brings to the table
The number most often quoted by solar manufacturers and observers is cost per watt, which helps explain how much bang for their buck installers get for solar modules, but it doesn't tell the whole story. A solar installation has to have rooftop space or land, inverters, wires, and labor to install the modules. These costs are called balance of system costs and are just as important as cost per watt.

So if someone in a desert in Arizona wants to install solar panels, First Solar's low-cost panels might be the best option, but in California, New Jersey, and Japan, SunPower can offer lower overall costs.

This is important because Italy and Germany have set up feed-in tariffs that favor rooftop solar to ground-mounted or utility-scale solar. Rooftop solar, or distributed solar, is closer to the demand source and has a more favorable impact on the grid as a whole than utility-scale solar, which generates fluctuating power that requires backup sources.

So despite higher costs per watt, SunPower will have an advantage in some of the largest solar markets in the world.

More opportunity to cut cost
If you're the highest cost producer in the market, that also means you have the most opportunity to cut costs. For a long time, Chinese manufacturers like Trina Solar (NYSE: TSL), Yingli Green Energy (NYSE: YGE), and Suntech Power (NYSE: STP) rode falling polysilicon prices and easy money from China's banks to a leadership in solar.

But about a year ago everything changed. Trina, one of the few companies that explicitly states cost per watt, started to see costs rise. With polysilicon climbing, the company highlighted a bigger problem: Non-silicon costs haven't fallen at all recently. Chinese manufacturers were going to have to find a new way to keep costs falling.

SunPower also benefited from decreasing silicon prices, but the company has also put millions of dollars into research and development to improve module efficiency and costs. In the fourth quarter of 2011, the company expects cost per watt to reach $1.48, or $1.08 per watt on an efficiency-adjusted basis. That adjusted cost per watt (which accounts for efficiency differences) is $0.08 lower than Trina Solar was able to produce panels at during the most recent quarter.

Creating their own demand
When demand is in doubt, what better demand source can you have than ... yourself? That's exactly what SunPower and First Solar have done with their power plant development units around the world. When demand falls in Germany or Italy's retail markets, they can shift modules to plants they are developing with power purchase agreements already in place.

That's a major competitive advantage for SunPower since Chinese manufacturers like LDK Solar (NYSE: LDK) and JA Solar (Nasdaq: JASO) haven't developed such an arrangement.

Foolish bottom line
It's tough to look ahead when it seems like the ground is crumbling under solar manufacturers, but when I do, I see SunPower emerging as a winner in the long term. The company has $1 billion of credit available from Total as part of the oil giant's investment in the company this year. I've pointed to improving macroeconomic conditions as another reason that solar stocks as a whole should rebound, with SunPower leading the charge.

And it shouldn't go unnoticed that as Chinese competitors continued to rely on Europe for demand in the second quarter, SunPower got 63% of its sales from North America. That's a big head start in one of the world's fastest growing solar markets.

I've given SunPower a green thumb on My CAPS picks. You can follow my picks here or give SunPower a green or red thumb on your own CAPS page.

Interested in reading more about SunPower? Click here to add it to My Watchlist, which will find all of our Foolish analysis on this stock.