Every investor can appreciate a stock that consistently beats the Street without getting ahead of its fundamentals and risking a meltdown. The best stocks offer sustainable market-beating gains, with improving financial metrics that support strong price growth. Let's take a look at what SunPower's (SPWR -1.02%) recent results tell us about its potential for future gains.

What the numbers tell you
The graphs you're about to see tell SunPower's story, and we'll be grading the quality of that story in several ways.

Growth is important on both top and bottom lines, and an improving profit margin is a great sign that a company's become more efficient over time. Since profits may not always be reported at a steady rate, we'll also look at how much SunPower's free cash flow has grown in comparison to its net income.

A company that generates more earnings per share over time, regardless of the number of shares outstanding, is heading in the right direction. If SunPower's share price has kept pace with its earnings growth, that's another good sign that its stock can move higher.

Is SunPower managing its resources well? A company's return on equity should be improving, and its debt to equity ratio declining, if it's to earn our approval.

By the numbers
Now, let's take a look at SunPower's key statistics:

SPWR Total Return Price Chart

SPWR Total Return Price data by YCharts

Passing Criteria

3-Year* Change

Grade

Revenue Growth > 30%

82.6%

Pass

Improving Profit Margin

(395.2%)

Fail

Free Cash Flow Growth > Net Income Growth

(18.1%) vs. (275.7%)

Pass

Improving Earnings per Share

(197.0%)

Fail

Stock Growth + 15% < EPS Growth

(84.0%) vs. (197.0%)

Fail

Source: YCharts. * Period begins at end of Q2 2009.

SPWR Return on Equity Chart

SPWR Return on Equity data by YCharts

Passing Criteria

3-Year* Change

Grade

Improving Return on Equity

(225.1%)

Fail

Declining Debt to Equity

40.9%

Fail

Source: YCharts. * Period begins at end of Q2 2009.

How we got here and where we're going
SunPower earns only two of a possible seven passing grades. The solar sector's smackdown has hit this company as hard as any other, but does that mean it's on its way out? After a long, long slide, SunPower's stock is actually up over the past three months, although not by much. The market seems to be taking a wait-and-see attitude after SunPower offered underwhelming forward guidance with its better-than-expected second-quarter results.

Fool solar expert Travis Hoium has put together a number of good insights into the solar industry, and his repeated conclusion has been that SunPower is one of the best-positioned global solar companies. It has more manageable debt levels than all major manufacturers, except the JA Solar (NASDAQ: JASO) and industry leader First Solar (FSLR -1.46%).

JA Solar, however, has to contend with recent tariffs levied on Chinese manufacturers, which will give SunPower more breathing room to battle First Solar domestically. On the other side of that equation, protective tariffs domestically will probably result in more price battles internationally, as Chinese producers Trina Solar (NYSE: TSL) and Suntech Power (STP) -- which were singled out for their own company-specific tariff rates -- are likely to focus more effort on expanding their sales in Europe, Asia, and the Middle East. This solar trade war may wind up backfiring on leading American manufacturers like SunPower, which, as Travis mentions, are still leading their Asian competitors by simply producing superior products.

I've agreed with Travis in the past on SunPower's potential when we discussed its stock in an analyst roundtable this spring. Thus far, the stock has not proven us right. However, we both remain optimistic about the company's potential. As the solar industry develops better products and generates more data to confirm its value as an energy source, SunPower is in one of the top positions to benefit. Travis' calculations show that the company's high-efficiency modules turn out to be cheaper over the long run, despite what may be higher upfront costs. As more businesses and consumers start to realize that solar energy is a valid (and potentially cost-saving) alternative to traditional power sources, SunPower's poor showing on our analysis could improve by several passing grades.

Putting the pieces together
Today, SunPower has few of the qualities that make up a great stock, but no stock is truly perfect. Digging deeper can help you uncover the answers you need to make a great buy -- or to stay away from a stock that's going nowhere.