Since the pandemic, Warren Buffett and his company Berkshire Hathaway have had a complicated relationship with bank stocks. They sold many of their bank holdings early on in the pandemic, concerned about their overall exposure to the sector. In the first quarter of 2022, Buffett and Berkshire began buying bank stocks again. But one bank stock has been steadfast in Berkshire's portfolio all along: Bank of America (BAC -1.91%).

In mid-2020, Buffett and Berkshire plowed more than $2 billion into the stock, which currently makes up close to 11% of Berkshire's nearly $347 billion equities portfolio. Not only is Buffett bullish on Bank of America, but it looks like Wall Street has taken a liking to the second-largest bank in the U.S as well and at least one analyst believes the stock could have serious upside ahead.

Warren Buffett.

Image source: Motley Fool.

Why analysts are bullish

In a recent research note, Wells Fargo analyst Mike Mayo once again reiterated Bank of America as his favorite bank investment.

One reason Mayo is so bullish is because of how much the bank benefits in a rising interest rate environment. One of the main ways that banks make money is through net interest income (NII), which is essentially the profit they make on loans, securities, and cash after funding those assets. When the Federal Reserve raises its benchmark overnight lending rate, the federal funds rate, banks will see a higher yield on a large portion of their loans, which adjust higher with the federal funds rate.

So, if banks can keep their funding or deposit costs in check, they can widen their profit margins, and Bank of America has done a nice job of improving its deposit base in recent years.

Bank of America Net Interest Income.

Image source: Bank of America.

As you can see, as short- and long-term rates have come up over the past year, so too has Bank of America's NII. But now the Fed is getting more aggressive with rate hikes than at any time since the Great Recession. The Fed has done one half-point hike so far this year, and the market now expects three more half-point hikes before the year ends.

In his research note, Mayo said that Bank of America demonstrates the thesis of "'NII to the Sky' -- even in a bear case -- better than any other large bank." At the end of March, the bank estimated that a 1% hike by the Fed would result in $5.4 billion of NII over the next year. At the time, the federal funds rate sat inside a range of 0.25% and 0.5%. The upper bound of the federal funds rate could end the year at around 2.8% or maybe even higher. Bank of America is also expecting to hold expenses flat this year.

Perhaps even more impressive is that in a "typical recession," Mayo still projects Bank of America to generate a 10% return on tangible common equity (ROTCE), which is a bank's return on shareholder capital after subtracting intangible assets and goodwill. That would be a great result in a recession.

What's the price target?

Due to all of these factors, Mayo has a price target of $66 for Bank of America, which implies about 80% upside from its share price of $36.70, as of market close on June 2. Analysts have a median price target of $47 for Bank of America, which also implies strong upside.

I would certainly have to concur with Mayo that I think Bank of America is a buy due to its intense asset sensitivity, strong tech capabilities, and deposit base. I am also confident in the bank's ability to withstand and perform well in a modest recession.