Source: Company

Wells Fargo (NYSE:WFC) has been doing a good job for shareholders so far in 2014: Shares are up 12% year to date. The bank has outperformed commercial banking peers Bank of America (NYSE:BAC), whose shares gained 5%, and Citigroup (NYSE:C), whose shares are practically flat this year. Since Wells Fargo already has delivered good returns in 2014, is the stock to be considered a buy?

Reason for relative outperformance
A lot of Wells Fargo's relative outperformance has to do with the landmark mortgage settlements that the Department of Justice pushed on Citigroup and Bank of America. Both banks were punished severely for their leading roles in the development of the financial crisis and their exposure to the mortgage market.

The settlements, which combined civil penalties and consumer relief, were just recently reached. In the case of Citigroup, the bank reported its settlement as part of its second-quarter earnings release in July, and Bank of America announced its own settlement with the DOJ in August.

Bank of America was made to fork over a cool $17 billion amid its large exposure to the mortgage business thanks to its ill-timed and ill-advised acquisitions of Merrill Lynch and Countrywide during the financial crisis. Citigroup, on the other hand, shelled out $7 billion to end the government's probe into selling low-quality mortgages to investors.

These settlements, which were recently finalized, so far have inserted huge uncertainty into the financial sector throughout 2014, especially in the second quarter, and largely explain why Bank of America, as well as Citigroup, did so poorly compared to Wells Fargo. Or, in other words, why Wells Fargo did so well compared to other financial companies.

While Citigroup and Bank of America were busy negotiating profit-eroding mortgage settlements, Wells Fargo managed to stay out of the line of fire. Wells Fargo has not been the target of allegations of defrauding investors with sub-standard mortgages and, consequently, was not distracted by the expensive legal fights that determined the headlines for these other banks in 2014.

Warren Buffett's seal of approval
Warren Buffett is a major stockholder in Wells Fargo, and he has repeatedly classified his investment in the bank as a core holding. In 2013, Buffett also increased his stake in the bank to 9.2% from 8.7%, according to his latest shareholder letter (link opens a PDF).

Source: Wells Fargo 2014 Investor Day Presentation

Buffett's approval of Wells Fargo has a lot to do with the bank's strong historical operating performance. Other investors, too, have convincing reasons to like Wells Fargo more than other banks because of its strong earnings record during the financial crisis, and its quick rebound in profitability in 2009.

Just about seven years ago, serious shock waves swept through the financial sector as a result of the bursting real estate bubble. Wells Fargo, however, managed to do quite well, and didn't post a single year with a net loss throughout the financial crisis.

It is this performance record that causes investors to perceive Wells Fargo's stock to be a superior investment, and suggests that the bank will continue to outperform in the years ahead.

Perceptions play a huge role in the stock market, and both Warren Buffett's repeated endorsement of Wells Fargo, as well as the company's proven track record, explain why Wells Fargo is one of the highest valued banks in the large-cap banking segment.

Outperforming peers
It is easy to see why Warren Buffett has a long-standing interest in Wells Fargo and designated the commercial bank as one of his core investments: Strong (relative) financial performance on a variety of metrics.

While Wells Fargo's earnings record throughout the financial crisis has been impressive in itself, the bank also manages to perform quite well when compared against its immediate peers:

Source: Wells Fargo Investor Presentation

With a return on equity of 13.4% and a return on assets of 1.47%, Wells Fargo achieved once again respectable results in the second quarter, and actually outperformed peers like JPMorgan or Bank of America by a handsome margin. Wells Fargo's third-quarter results further underscored that the bank can defend its strong performance metrics: Its third-quarter ROE was similarly high at 13.10%, its ROA at 1.40%, and its efficiency ratio at 57.7%.

With a relatively low efficiency ratio, a metric that gauges how efficient a company is in earning its money, and high profitability measures, it is not really a surprise that Wells Fargo trades at 63% premium to its book value.

Wells Fargo's market perception
Further evidence that investors perceive Wells Fargo to be a better value play than Citigroup or Bank of America, for instance, relates to its book valuation. Both Citigroup and Bank of America trade at serious discounts to their respective book values, which is, at least partly, attributable to the mortgage theater that played out in front of the financial press and investors in 2014.

Wells Fargo, on the other hand, with that healthy premium to book value mentioned above, is the only large-cap Wall Street bank trading at such a high book valuation.

The Foolish bottom line
Sometimes, good returns can be achieved simply by staying out of trouble and not drawing any heat from the government. While Bank of America and Citigroup had to pay up for their mortgage misdeeds, Wells Fargo managed to sail along much more smoothly. Its high book valuation also indicates that investors certainly don't expect Wells Fargo to become a DOJ target and face billion-dollar settlements any time soon.

In addition, a solid and confidence-inducing earnings record throughout the financial crisis, high profitability and a shining Warren Buffett investment certainly help Wells Fargo to stand out from the crowd. Given this track record, a premium valuation is very well deserved, and suggests that Wells Fargo will continue to do well in the years ahead.