G

Wells Fargo's shares didn't move a lot, but it made it to the finish line. Image source: iStock/Thinkstock.

It's been a banner year for banks. The KBW Bank Index, which tracks two dozen blue-chip bank stocks, is up 28% in 2016. That's more than twice the return on the S&P 500.

But some banks haven't fully participated in the rally. Wells Fargo (NYSE:WFC) is a case in point. Shares of the nation's third biggest bank by assets are up for the year, but only by 3%.

KBWB Chart

KBWB data by YCharts.

A rough start to the year

While 2016 has ended well for most bank stocks, it didn't start that way. From the beginning of the year into the first half of February, bank stocks dropped precipitously, with shares of Wells Fargo losing 17% of their value.

Low energy prices were the culprit. As the price of oil fell below $30 a barrel in January, analysts and commentators began to speculate that the nation's biggest banks would start to write off loans from their energy portfolios.

This is exactly what Wells Fargo did. When it reported fourth-quarter 2015 earnings in January, loan loss provisions at the bank increased by 71% on a year-over-year basis, climbing from $485 million in the fourth quarter of 2014 up to $831 million in the fourth quarter of 2015.

On the conference call with analysts, its CFO said that the bank expected loan losses in the sector to continue mounting. And Wells Fargo's now-former CEO, John Stumpf, apprised investors that upwards of 250 employees at the bank were "big-time focused on this."

These efforts aside, bank stocks proceeded to follow the price of oil up over the next few months, with energy prices flirting with $50 a barrel by the beginning of June.

Brexit batters bank stocks

But just as oil prices were recovering, assuaging fears of further loan losses at Wells Fargo and other major energy lenders, a second crisis struck. In the middle of June: Voters in the United Kingdom voted to leave the European Union.

Known as Brexit, the development sent bank stocks spiraling downward. The concerns were threefold. First, the presumed turmoil that would erupt from the unexpected outcome would increase uncertainty and thereby decrease business investment and thus demand for loans.

Second, economic and political problems in Europe would cause the value of the euro to decline relative to the dollar and thereby increase the cost of U.S. exports. As a domestic bank, this would hit Wells Fargo particularly hard.

Finally, the turmoil in the credit markets would weigh on the Federal Reserve's long-awaited decision to raise the fed funds rate, the key short-term interest rate benchmark in the United States. Because banks make more money when interest rates rise, this would mean that Wells Fargo and others would have to continue to be patient before a rate rise came to fruition.

All of these factors conspired in June to push Wells Fargo's shares down by 17% yet again for the year.

Self-inflicted wound

Just as Wells Fargo's shares recovered from the pullback following Brexit, they plummeted again in September. This time, though, the bank couldn't blame others for its problems.

In early September, the Consumer Financial Protection Bureau revealed that thousands of employees in Wells Fargo branches had opened millions of fake accounts for customers in order to meet aggressive sales targets. The damage to Wells Fargo's reputation translated into a 20% drop in Wells Fargo's stock price, the third time in 2016 that its shares lost nearly a fifth of their value.

Wells Fargo has since changed its CEO, eliminated product sales goals in its branches, paid $185 million in fines to regulators, and been sanctioned by three of the four main industry regulators -- the Fed, the CFPB, and the Office of the Comptroller of the Currency.

The post-election rally

But even though Wells Fargo's fake-account scandal is among the worst to strike the industry in recent memory, it still wasn't enough to keep the bank's shares down for long. Fast-forward to November, and its stock made up for the loss and then some.

The outcome of the presidential election served as the catalyst. President-elect Donald Trump's campaign promises to accelerate economic growth through tax cuts and infrastructure projects, combined with easing up on bank regulations, has convinced investors that banks could soon make much more money. 

One month later, this view seemed to be confirmed by the Federal Reserve's decision to increase the fed funds rate.

Thus, despite being down by upwards of 20% on multiple occasions through 2016, Wells Fargo's shares are headed for a mediocre 3% gain on the year. This may not seem like a huge accomplishment given how the rest of the banking sector performed this year, but it's certainly a lot better than it could have been.

John Maxfield owns shares of Wells Fargo. The Motley Fool has no position in any of the stocks mentioned. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.