The Federal Reserve's interest rate hiking spree over the past couple of years has been a double-edged sword for banks. Higher rates make lending a more profitable business. But they also work against economic growth, crimping banks' other profit centers. The key for these institutions is to maximize the upsides from lofty interest rates while limiting their downsides.

So how has Bank of America (BAC -0.74%) fared in the middle of this tug-of-war? Not quite as well as many investors were hoping it would. If you own its stock, you've certainly got something to keep an eye on. If you don't own it, there may be better options out there to buy right now.

BofA isn't earning as much interest as it should

Federal Reserve Chairman Jerome Powell and his colleagues must walk a fine line, to be sure. Unchecked inflation can up-end an economy. Excessive interest rates enacted to stem that inflation can do the same. The Fed must find and maintain a healthy, sustainable balance between the two.

To this end, the Fed's recent streak of interest rate increases feels awfully aggressive. A year and a half ago, the federal funds rate was practically zero, while the prime rate was just above 3%. Since then, the prime rate has soared to 8.25% -- a jolting change over such a short period of time.

The thing is, inflation had been racing upward since early 2021. And from its peak of 9.1% in June 2022, those rate hikes have helped bring it back down to 3.2% in July 2023. The Federal Reserve has actually done a pretty good job of responding to a tricky and serious situation.

Can Bank of America say the same after being forced to adapt quickly to the changing economic backdrop? After all, higher interest rates make for more profitable loans, but they also make loans much less marketable.

In short, BofA's interest rate-based businesses (like lending and deposits) have been disappointingly so-so in 2023 after soaring late last year.

The image below tells the tale. You can see the prime rate has continued to edge higher in 2023 since jumping to a multiyear high in late 2022, bringing Bank of America's net interest income higher with it. The trends disconnected early this year, though. Net interest income has eased back from Q4's figure of nearly $14.7 billion to Q2's $14.2 billion despite higher interest rates being seen in the meantime. This tells us the business of making loans is less and less profitable when it should (in theory anyway) be more profitable.

Image comparing Bank of America's net interest income to interest rates.

Data source: Bank of America. Chart by author. Dollar figures are in millions.

We can see why this is happening by using other data too. Namely, the size of BofA's loan portfolio has essentially become stagnant, with deposits declining for a couple of quarters now. And its net yield -- the difference between its costs to borrow money and its returns on money it lends out -- was actually down from the fourth quarter's 2.22% to 2.06% in Q2. It was doing better back in 2019 when interest rates were lower and the economy was lethargic. This contraction suggests the bank is being forced to extend relatively generous terms to borrowers.

Connect the dots. Bank of America is making less interest income when it should be making more.

Bank of America's other businesses are also fighting headwinds

Higher interest rates aren't just impacting BofA's lending business. With the exception of its market-making services, high interest rates have also coincided with weakening incomes for its other business lines as well.

Image comparing Bank of America's noninterest income to interest rates.

Data source: Bank of America. Chart by author. Dollar figures are in millions.

This makes sense. Although higher borrowing costs don't directly alter the profitability profile of brokerage or credit card services, they do slow economic growth, which in turn diminishes demand for such services. The plunge in Bank of America's investment banking fees, for instance, isn't unique to it. JPMorgan Chase reported lackluster underwriting numbers for its second quarter. Goldman Sachs' Q2 investment banking revenue was down 20% year over year. Not many companies are looking to go public in the current economic environment, and they're certainly not interested in issuing debt at such high interest rates if they can avoid it.

In a similar vein, institutional and retail interest in stock and bond trading is tepid. Investors of all ilks seem to understand that sluggish economies don't produce many must-own investments. Meanwhile, banking service charges are fading as well, if only because Bank of America is seeing net withdrawals of deposits.

Bottom line? Taking BofA's market-making services out of the mix, this company's quarterly noninterest income has slipped from its Q4 2021 peak of more than $10.1 billion to less than $8 billion in each of the last three quarters. That's less than it was generating with these businesses back in 2019 when economic headwinds led the Fed to start dialing back interest rates.

Investors are ignoring more bullish analysts right now for a reason

Doomed? No, Bank of America will be fine in the long run. Its dividend isn't in any real jeopardy either.

When you start drilling into the data and find that higher interest rates may be doing the bank more harm than good, however, it understandably raises concerns. When will deposits start perking up again? How narrow will the profit margins on BofA's lending activities become now that they've started shrinking? For that matter, how long can revenues from Bank of America's market-making services offset weakness on other fronts?

The analyst community says BofA shares are currently undervalued; the stock's current price of less than $29 is 18% under the consensus price target of $35.37. Don't be too eager to embrace this implied upside, though. There's a reason the stock's still falling in step with the profit dips illustrated on the charts above. The investing crowd is sensing that the current headwinds could blow for a while, even if these investors don't know they sense it.