Image source: iStock/Thinkstock.

How did Bank of America (BAC -0.13%) perform in the second quarter? This seems like a straightforward question, but the answer is: It depends. Namely, it depends on whether you're talking about the North Carolina-based bank's actual or adjusted earnings.

If you look at Bank of America's actual earnings, you'd be led to believe that it had a miserable quarter. The nation's second biggest bank by assets earned $0.36 per share on a GAAP basis, which equates to a 16% decline from the year-ago period, when it earned $0.43 per share.

This isn't because Bank of America had a sharp increase in expenses. Its operating costs on a year-over-year basis dropped by $465 million. And while its credit costs increased by $196 million, this was more than offset by the decline in operating expenses.

The issue lies in Bank of America's revenue, and specifically the amount of money it earns from its asset portfolios. Its net interest income in the second quarter came out to $9.2 billion. By contrast, in the second quarter of last year, the figure was $10.5 billion.

If you're looking for the reason Bank of America's GAAP earnings fell by $900 million, in turn, it's because the bank's net interest income declined by more than $1.2 billion.

But even though this helps explain why Bank of America's reported earnings fell compared with the year-ago period, it's still only a partial explanation. To understand the issue fully, it's important to appreciate that not all of Bank of America's interest-earning assets generated less revenue.

In fact, its loan portfolio earned $264 million more interest income than it did in the same period last year. The negative impact came instead from a $1.6 billion year-over-year reduction in interest income from Bank of America's securities portfolio, and specifically from its holdings of mortgage-backed securities.

These are a common but peculiar type of security. Like bonds, they're backed by debt -- namely, mortgages. But unlike a bond, the value of which is inversely correlated to interest rates (when rates go down, bond prices go up), a mortgage-backed security loses some of its allure when interest rates decline, as they did last quarter.

Lower interest rates give people incentive to refinance their mortgages, which means they pay off the loans held in the mortgage-backed security. This decreases the interest income the security produces. People in the financial industry refer to this as prepayment risk.

When this happens, a bank can account for the impact on its portfolio of mortgage-backed securities in one of two ways. It can reduce the amount of money it earns from the portfolio as prepayments come to fruition, or it can record a one-time charge that accounts for the anticipated drop in interest income in one fell swoop.

You can see the impact from the two methods by comparing Wells Fargo with Bank of America. Wells Fargo, which follows the first method, recorded a $24 million year-over-year increase in interest income from its securities portfolio last quarter. That compares to the already-noted $1.6 billion decrease at Bank of America.

Importantly, the disparity in this regard is superficial. It reflects a difference in accounting principles, not fundamental performance.

Given this, in addition to reporting GAAP earnings, Bank of America reports an adjusted earnings figure that backs out the somewhat idiosyncratic way it accounts for interest rate fluctuations. And it's this figure, as opposed to its GAAP earnings, that more accurately reflects Bank of America's performance in any given quarter.

Quarter

Net Interest Income (As Reported)

Net Interest Income (Excluding Market-Related Adjustments)

Q2 2016

$9.2 billion

$10.4 billion

Q1 2016

$9.2 billion

$10.6 billion

Q4 2015

$9.8 billion

$10.5 billion

Q3 2015

$9.5 billion

$10.3 billion

Q2 2015

$10.5 billion

$10.0 billion

Data source: Bank of America.

When you look at Bank of America's adjusted earnings for the second quarter, things look a lot better. After excluding the market-related adjustment to its net interest income, the $2.2 trillion bank earned $0.42 per share in the three months ended June 30. And if you do the same thing to its earnings in the second quarter of last year, they come out to $0.40 per share.

Thus, while it's tempting to think that Bank of America earned less money last quarter than it did in the year-ago period, the truth is that it actually earned more. This helps to explain why the bank's shares are up 5% in the wake of its earnings report.