At this point, it's safe to say there was little reason to worry about how banks performed last quarter. This morning, Bank of America (BAC 3.35%) became the final megabank to report earnings for the second quarter. And, at least at first glance, business at the nation's second largest lender by assets appears to be on the up and up -- for a chart of the biggest banks by assets in the country, click here.

For the three months ended June 30, Bank of America earned $4 billion, a staggering 63% increase over the same quarter last year. As you can see in the table below, its success is largely attributable to three different factors. First, the bank's net interest income improved on a year-over-year basis by $1 billion thanks to a markedly lower cost of funds. Second, it set aside $562 million less in provisions for credit losses than it did last year. And finally, its noninterest expense declined by an impressive $1 billion.

Since the beginning of earnings season, one clear trend has emerged: Capital markets are on the mend, resulting in higher noninterest income from both trading and investment banking activities. We've seen this now at both JPMorgan Chase (JPM 2.51%) and Goldman Sachs (GS 0.22%), which reported increases in net income by 31% and 101%, respectively. And Bank of America is no exception, as its global markets segment was its best performing division by far.

Getting a bit more specific, Bank of America had a number of particularly notable wins last quarter. Its Basel III tier 1 common capital ratio improved considerably, going from 7.95% last year all the way up to 9.6% at the end of June. It continued to offload mortgage servicing rights, decreasing its portfolio of loans serviced for third parties down to $759 billion, versus $949 billion in the first quarter and $1.2 trillion in the second quarter of last year. Meanwhile, its mortgage origination volume shot up over the last 12 months by 41% to $26.8 billion -- though it's still woefully lagging behind Wells Fargo, which has originated more than $100 billion worth of mortgages in each of the last seven quarters. And the quality of its loan portfolio improved as well.

At the same time, if there was one thing investors should keep their eye on, it's Bank of America's accumulated other comprehensive loss, which resides in the equity portion of the balance sheet. Thanks to the deterioration in the value of its securities portfolio tied to the recent increase in interest rates, this figure increased by $4.2 billion -- that is, more than offsetting its $4 billion in net income. You can see the impact of this on Bank of America's book value, which fell on a sequential basis from $20.19 per share in the first quarter to $20.18 at the end of last quarter despite its otherwise impressive earnings.

All things considered, I'd say last quarter was a resounding, though not entirely unexpected, success for Bank of America. "At the beginning of the year, we said we would focus on three things -- revenue stability, strengthening the balance sheet and managing costs," said chief financial officer Bruce Thompson. "This quarter, we delivered on all three." I would agree.