Shares of Wells Fargo (NYSE: WFC) hit a 52-week high yesterday. Let's take a look at how it got here to find out whether there are still clear skies ahead.

How it got here
The banking industry has not been a good place to invest over the past few years. Wells Fargo is the exception that proves the rule, as it is now the only major bank you can buy that's had a positive performance since just before the housing bust:

WFC Total Return Price Chart

WFC Total Return Price data by YCharts

JPMorgan Chase (NYSE: JPM) would have been counted in that rare company very recently, but its "London Whale" trading debacle and the questions surrounding that speculative enterprise have kept it from matching Wells Fargo's performance.

The other two supersized commercial banks -- Bank of America (NYSE: BAC) and Citigroup (NYSE: C) -- remain in a deep hole looking up at a faint light. Bank of America's latest earnings were met with a collective shrug of the market's shoulders, despite its profitable numbers.

Bank of America and Wells Fargo were the only two major banks to bring in more revenue and profit for 2012's first half than they had last year, with Bank of America's gain largely tacked onto a huge writedown made last year. The other two fallen banks had mostly bad news for their shareholders, as my Foolish colleague John Maxfield points out in his first-half banking recap. Wells Fargo was an island of tranquility this year in a rather stormy sea.

What you need to know
Wells Fargo isn't just the best performer in market terms; it also sports the best net margins of its peers. Its relative consistency and stability have led it to the highest P/E of the group, and it also sports the only market cap greater than its book value:

Company

P/E Ratio

Price-to-Book

Net Margin (TTM)

Tier 1 Common Capital Ratio

Wells Fargo 11.0 1.4 18.8% 9.2%
JPMorgan 7.4 0.8 17.7% 10.1%
Bank of America NM 0.4 (1.5%) 8.2%
Citigroup 7.4 0.4 14.1% 11.6%

Sources: Morningstar and Fool.com. NM = not material; negative result.

Banks, even those as well managed as Wells Fargo, have plenty of problems to contend with. Running through the list of potential liabilities would require a book, or at least a few well-constructed articles. Wells Fargo's done a better job managing those problems than its peers have, which is why many Foolish analysts still feel strongly about its long-term potential.

Wells Fargo's made it through the mortgage debacle, and the ensuing $25 billion settlement for alleged abuses, better than its peers, too. The biggest threat on the horizon (besides another economic meltdown, of course) seems to be the slow-moving LIBOR scandal, which continues to spread with every new allegation. Wells Fargo's kept its name largely clear of these headlines, which bodes well for shareholders. Its liability (if any) may be much less than those of Barclays and Citigroup.

What's next?
Wells Fargo's conservative style has thus far been its greatest asset. This bank should continue its solid performance as long as management remains on the straight and narrow. The Motley Fool's CAPS community has given Wells Fargo a four-star rating, with 90% of our CAPS players expecting the company to beat the indexes going forward. Our CAPS community seems to think strongly of Wells Fargo's long-term potential.

Interested in tracking this stock as it continues on its path? Add Wells Fargo to your Watchlist now, for all the news we Fools can find, delivered to your inbox as it happens. You may also want to dig deeper into Bank of America's potential as it recovers from its disastrous moves. We have a wealth of information available in our newest premium research report, available now with a full year of updates included. For another banking play, the Fool's got a popular free report on "The Stocks Only the Smartest Investors are Buying." Start your search for the next great banking stock today -- find out more.