This year is almost certainly one that Wells Fargo (NYSE:WFC) would like to have a do-over, as the performance of its stock proves. Since the beginning of 2017, shares of the nation's third-biggest bank by assets have lost 10%.

That in and of itself makes Wells Fargo's performance seem dismal. But making it even more so is the fact that the S&P 500 has gained 10% over the same stretch.

KBWB Chart

KBWB data by YCharts.

Bank stocks in general have underperformed

Wells Fargo's disappointing performance can be traced to two causes, the first of which is that bank stocks in general have underperformed the market this year.

As you can see, the KBW Bank Index, which tracks shares of two dozen large-cap banks, is only marginally higher for the year compared to the 10% rally in large-cap stocks more generally.

There isn't anything wrong with banks per se. The issue rather is that they seem to be taking a breather after an impressive 2016 performance, when the KBW Bank Index grew by 26% relative to the S&P 500's 10%.

KBWB Chart

KBWB data by YCharts.

This is the opposite of the Dogs of the Dow effect, in which the worst-performing stocks in one year have in the past tended to be among the best-performing stocks the next year.

Wells Fargo's sales scandal

In addition to this larger industry trend, Wells Fargo has also suffered from serious self-inflicted wounds over the past 12 months.

It was at this time last year, that the Consumer Financial Protection Bureau revealed that the California-based bank had spent years opening up as many as 2 million unauthorized accounts for customers without customers' approval or often even their knowledge.

This story was soon followed by a tsunami of negative headlines about Wells Fargo's alleged retaliation against employees within the bank who had tried to bring the practice to the attention of their superiors, the board of directors, and even the former chairman and CEO John Stumpf, who resigned in the wake of the scandal.

John Stumpf, the former chairman and CEO of Wells Fargo.

John Stumpf, the former chairman and CEO of Wells Fargo. Image source: Wells Fargo.

More recently, Wells Fargo has disclosed that similar practices led 500,000 auto-loan customers to be charged for a type of vehicle insurance that they did't want or need. An estimated 20,000 of those ended up defaulting on their loan payments as a result of the added charge and had their cars repossessed.

And just this past month, the bank updated its estimate of the number of illicit accounts opened in the original scandal, which had been disclosed by the CFPB last year. Wells Fargo now believes that closer to 3.5 million accounts were wrongfully opened.

Suffice it to say, none of this has been good for Wells Fargo, which has seen its fundamental performance lag while the sentiment toward its stock has soured throughout the market. It's for these reasons, in turn, that shares of Wells Fargo have trailed its industry and the broader market more generally since the beginning of the year.

John Maxfield owns shares of Wells Fargo. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.