Coming into earnings season, most analysts and commentators expected banks to benefit from the recent interest-rate increases, as the Federal Reserve has boosted short-term rates three times over the past 12 months. Yet, at least at some of the nation's biggest banks, that wasn't necessarily the case.

An upward-looking view of a cluster of skyscrapers, with a blue sky and puffs of clouds above them.

Image source: Getty Images.

You can see this in the results of JPMorgan Chase (NYSE:JPM) and Bank of America (NYSE:BAC). Both banks had solid quarters, but both banks also reported sequential declines in their net interest margins, which measures the yield on their assets after backing out the costs of deposits and other types of debt.

All told, universal banks such as JPMorgan Chase and Bank of America saw their net interest margins fall by an average of two basis points, according to KBW's second-quarter earnings round-up. By contrast, more traditional commercial banks like Wells Fargo (NYSE:WFC), as well as banks in the regional banking space, saw their net interest margins expand.

Bank

2Q17 Net Interest Margin

1Q17 Net Interest Margin

JPMorgan Chase

2.31%

2.33%

Bank of America

2.34%

2.39%

Wells Fargo

2.90%

2.87%

Data source: Second-quarter earnings releases.

This undoubtedly caught some investors by surprise, as rising short-term interest rates should have theoretically caused lending margins to expand. But the catch was that long-term interest rates were lower through much of the three months ended June 30.

You can see this by comparing the trend in the fed funds rate, which is the principal short-term interest rate benchmark in the United States, to the trend in the yield on 10-year Treasuries, the main long-term interest rate benchmark.

US Target Federal Funds Rate Chart

US Target Federal Funds Rate data by YCharts.

While JPMorgan Chase and Bank of America offset some of the downward pressure on revenue from lower long-term interest rates by growing their loan portfolios, the growth didn't have as potent of an impact at universal banks because loans make up a smaller share of their total assets than they do at Wells Fargo and other purer play commercial banks, which don't have to allocate a share of their balance sheets to low-yielding trading-related securities.

Bank of America alluded to this on its quarterly conference call, noting that compared with the first quarter of this year, its net interest income was relatively flat, "as the benefit from an increase in short-end rates was offset by a number of factors, including lower long-end rates in the quarter."

To be clear, this is nothing for investors in any of these banks to be worried about. It seems inevitable that both short- and long-term rates will eventually increase, and when this happens, it will translate into meaningfully higher revenue and earnings at banks such as Wells Fargo, as well as JPMorgan Chase and Bank of America.

John Maxfield owns shares of Bank of America and Wells Fargo. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.