Image source: The Motley Fool.

Shares of Wells Fargo (NYSE:WFC) staged a dramatic comeback in November, climbing 15% after losing a similar amount of the market value in the two preceding months. The explanation for its stellar performance had little to do with Wells Fargo itself, and instead more to do with the outcome of the presidential election.

A much-needed reprieve

As you might recall, Wells Fargo's prospects looked dim going into the month. It was revealed in September that thousands of the bank's employees had opened up to 2 million fake accounts for customers in an effort to meet sales goals and thereby boost Wells Fargo's cross-sell ratio -- the average number of the bank's financial products its typical customer uses.

The revelation triggered a dramatic sell-off in its shares, which dropped from more than $50 per share down to less than $44 at the beginning of October. Moreover, the reputational damage Wells Fargo suffered was immense. On two separate occasions, Congress lambasted CEO John Stumpf, who has since resigned. Public and private investigations into the company's conduct were initiated. And it's had to discard the sales tactics it had seemingly used so effectively for so long in the face of public and regulatory pressure.

WFC Chart

WFC data source: YCharts.

Most recently, moreover, the Office of the Comptroller of the Currency seems to have begun subjecting Wells Fargo to unusually stringent oversight. According to The Wall Street Journal, as of Nov. 20, the California-based bank must now seek approval for any change to its business plan, including opening a branch, as well as the hiring or firing of management and the board.

The election and bank stocks

But for all intents and purposes, much of the world forgot about all of this when Donald Trump prevailed in last month's election. The impact on bank stocks, including Wells Fargo, was immediate and substantial. In the remaining three weeks of November following the presidential election, shares of most large-cap bank stocks surged by a double-digit percentage. The KBW Bank Index, which tracks two dozen of the nation's biggest banks, finished the month up by more than 17%.

This was good for Wells Fargo on two levels. First, the media's attention was redirected away from the bank's misdeeds. The significance of this point can't be overstated, as a growing chorus of stories about the mistreatment of customers and employees had been relentlessly covered in the national media, which fueled the bank's reputational damage.

Just as important were the promises that Trump made on the campaign trail to roll back regulations in the bank industry, including to reduce the power of the Consumer Financial Protection Bureau, which led the investigation into Wells Fargo's sales practices. More broadly, Trump has promised to "dismantle" the Dodd-Frank Act, freeing up banks to lend more and thereby increase the amount of revenue they can generate from their balance sheets.

There are a variety of ways that Trump's team, together with the Republican-controlled Congress, could do this -- including lower capital and liquidity rules, more flexibility when it comes to capital allocation, and added freedom to run proprietary trading operations -- but all of the proposals thus far seem almost certain to boost bank profitability. The net result is that the prospects for banks, and Wells Fargo in particular, improved materially as a result of the presidential election.

Wells Fargo still has ground to make up since its fake-account scandal caused its share price to drop in September and October, but its performance in November goes a long way in that direction.