G

Image source: iStock/Thinkstock.

The past 12 months have probably seemed like a roller-coaster ride for many Bank of America (NYSE:BAC) investors. Shares of the bank dove deep at the beginning of 2016 only to then rise abruptly to end the year. All told, Bank of America's stock gained more than 30% this year.

BAC Chart

BAC data by YCharts.

A rough patch to begin the year

The rough start to the year, in which the bank lost a third of its market value from Jan. 1 through the first week of February, was fueled by a steep decline in energy prices.

Oil prices dropped below $30 a barrel in January, leading analysts to wonder whether Bank of America would have to absorb large losses in its energy-lending portfolio. This was partially confirmed when the bank reported fourth-quarter earnings on Jan. 19.

Brent Crude Oil Spot Price Chart

Brent crude oil spot price data by YCharts.

Bank of America set aside $810 million in loan-loss provisions in the fourth quarter in response to the trend in energy prices. That was four times the level from the year-ago period.

The North Carolina-based bank's executives nevertheless sought to assuage investors' concerns, explaining that a mere 2% of the bank's loans were tied to energy and that even if oil prices stayed at $30 a barrel for nine quarters, the bank would still only lose $200 million beyond its energy-related loan-loss reserves.

"We're very focused on energy, given the volatility in oil prices," said CFO Paul Donofrio on a call with analysts. "We feel like we have done an effective job managing this risk," he added.

Brexit and bank stocks

Oil prices soon began to recover, prompting bank stocks to follow suit. By June, oil was approaching $50 a barrel and Bank of America's stock had gone from around $11 a share at their low in February to more than $15 a share by April.

But bank stocks changed direction again in June after the market was surprised by the outcome of a vote in the United Kingdom to separate from the European Union, known as Brexit. The concern for banks was twofold.

In the first case, as I discuss at length here, investors were concerned about the impact the vote would have on bank trading revenues. As analysts at KBW explained at the time:

A vote for Brexit would lead to macro uncertainty and this would likely result in higher volatility (sometimes unhealthy), but also lower capital markets activity as companies stop transacting due to uncertainty in law and markets. We would also expect the British Pound and Euro to depreciate versus the dollar and this would cause FX headwinds for select companies. Overall, we would classify U.S. Universal Banks and Exchanges & Order Execution Firms as having the greatest risk to earnings should Brexit occur.

There was also concern that multinational banks such as Bank of America with large capital markets businesses based in London would have to relocate a portion of their operations to the European mainland, which would increase costs at the $2.2 trillion bank and others.

The net result was that Bank of America's shares dropped sharply again, bottoming out at approximately $12 a share by the end of June.

The post-election rally

By the time July rolled around, it looked as if Bank of America's stock was headed for a down year. But everything changed with the outcome of the presidential election in November.

President-elect Donald Trump campaigned on a pro-growth platform, promising not only to scale up government-financed infrastructure projects but also to roll back regulations across a multitude of industries. For banks, this could mean eliminating some of the most onerous provisions of the 2010 Dodd-Frank Act and thereby freeing banks up to increase lending, cut compliance costs, and return more capital to shareholders.

A month later, the Federal Reserve consolidated the post-election gains in bank stocks by raising the fed funds rate, the key short-term interest rate benchmark in the United States. This move, combined with the recent rally in long-term interest rates, should start to translate into hundreds of millions of dollars' worth of additional revenue and profits each quarter for Bank of America.

In sum, 2016 was an eventful year for the nation's second-biggest bank by assets, and with the pending developments in Washington, it seems safe to assume that 2017 will be, too.

John Maxfield owns shares of Bank of America. 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.