Bank of America (BAC - Get Report)  posted higher quarterly profit than analysts estimated as lending growth and higher interest rates made up for a slide in bond-trading revenue.

Profit of 46 cents a share in the three months through June compared with the 43-cent average of estimates from analysts surveyed by FactSet. Net income climbed 10% to $5.3 billion, the Charlotte, N.C.-based bank, the largest by consumer deposits, said in a statement on Tuesday, July 18.

"Against modest economic growth of 2%, we had one of the strongest quarters in our history," said CEO Brian Moynihan, who succeeded Ken Lewis in 2010 after the bank repaid a $45 billion financial-crisis bailout. 

Average loans climbed 1.7 to $915 billion as credit card balances rose and  drivers borrowed more money to buy cars, though Moynihan said the bank continued to manage its credit risk carefully. Net interest income, which reflects charges to borrowers after deducting the amount paid to depositors, rose 9% to $11 billion after the U.S. Federal Reserve's two increases in short-term rates this year. 

Altogether, the central bank has raised rates four times since December 2015 after keeping them at near-zero levels for seven years following the global financial crisis of 2008. The stagnation crimped net interest margins, and Bank of America's yield of 2.34% in the second quarter was still five basis points below the projection from analyst Brian Kleinhanzl of brokerage Keefe, Bruyette & Woods.

At rival Wells Fargo & Co.  (WFC - Get Report) , net interest income climbed 6% to $12.5 billion as it passed the Fed's two 25 basis-point rate increases along to borrowers more quickly than depositors, according to a statement last week.

Revenue from trading bonds, currencies and interest-rate swaps dropped 14% to $2.25 billion at Bank of America, a decline mirrored at both Citigroup Inc. (C - Get Report) and JPMorgan Chase & Co. (JPM - Get Report) , All three benefited a year ago from markets roiled by Great Britain's unexpected decision to pull out of the European Union, and in later 2016, from Donald Trump's surprise victory in the U.S. presidential election.  

Bank of America dropped 1.3% to $23.71 in New York trading on Tuesday morning, paring a 41% gain since Trump's election in November.

Investment banking fees climbed 16% to $930 billion amid gains in stock underwriting and merger advisory services, the bank said. A total $5 billion in revenue from its global banking division, which includes the investment business, marked the strongest quarter since the company purchased Merrill Lynch in late 2008, CFO Paul Donofrio said.

The company's strong earnings growth, careful risk management and investments in new technology supports its plan to return more capital to shareholders, Moynihan said on a call with analysts. "Through the first six months of 2017, we have more than doubled the amount of net share repurchases and dividends," he said. 

In late June, billionaire investor Warren Buffett said he would swap $5 billion in preferred Bank of America stock for 700 million of the lender's common shares, worth about $17.1 billion.

The move, which would yield a gain of about $12.1 billion based on share prices at the time, was prompted by the Federal Reserve's decision to let Bank of America increase its yearly dividend to 48 cents a share, Berkshire said in a statement. That means the common stock would yield $36 million more a year than $300 million annual dividend Buffett has received on the preferred stake.

A yearly payment high enough to claim the Oracle of Omaha as the lender's biggest investor is a significant accomplishment for Bank of America. The company was forced to cut its dividend from a 2008 peak of $2.56 to just four cents in 2009 as banks shored up capital during the financial crisis.

EXCLUSIVE LOOK INSIDE: Citigroup and Wells Fargo are holdings in Jim Cramer's Action Alerts PLUS charitable trust portfolio. Want to be alerted before Cramer and the AAP team buy or sell the stocks? Learn more now.