Bank of America (BAC) - Get Report  posted higher quarterly profit than analysts estimated as increasing interest rates fueled returns on lending enough to overcome sliding bond-trading revenue.

Profit of 48 cents a share in the three months through June compared with the 46-cent average of estimates from analysts surveyed by FactSet. Net income rose 13%% to $5.6 billion, the Charlotte, N.C.-based bank said in a statement on Friday, Oct. 13.

"Our focus on responsible growth and improving the way we serve customers and clients produced another quarter of strong results," said CEO Brian Moynihan, who succeeded Ken Lewis in 2010 after the bank repaid a $45 billion financial-crisis bailout. "Revenue across our four lines of business grew 4%, even with a challenging comparable quarter for trading."

Average loan balances climbed 6% to $842 billion and the margin on credit widened, though the bank continued to manage its risk carefully. Net interest income, which reflects charges to borrowers after deducting the amount paid to depositors, climbed 9.3% to $11.4 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 for lenders, which typically buoy returns by passing along increases more quickly to borrowers than depositors, and the shift has given them an edge.

Bank of America's yield of 2.36% in the third quarter was higher than the projection of 2.3% from analyst Jason Goldberg of Barclays.

Revenue from trading bonds, currencies and interest-rate swaps, meanwhile, fell 19% to $2.15 billion, a decline mirrored at both Citigroup Inc. (C) - Get Report and JPMorgan Chase & Co. (JPM) - Get Report  earlier in the week. All three benefited a year ago from markets roiled by Great Britain's unexpected decision to pull out of the European Union and the U.S. presidential campaign leading up to Donald Trump's victory.

EXCLUSIVE LOOK INSIDE: Citigroup is a holding in Jim Cramer's Action Alerts PLUS charitable trust portfolio. Want to be alerted before Cramer and the AAP team buy or sell the stock? Learn more now.

Total revenue in Bank of America's global markets group dropped 11% to $3.9 billion, with a slight increase in stock-trading failing to make up for the much larger fixed-income decline.

Still, trading desks at Bank of America saw a pickup in September like rivals, CFO Paul Donofrio said. And investment banking revenue of $1.5 billion topped Macquarie Research analyst David Konrad's projection, largely on the back of outperforming underwriting fees for debt offerings, he said in a note to clients.

Fee income was pressured firmwide, however, with almost every category lower than the previous quarter, Barclays' Goldberg said in a note. Mortgage, trading and brokerage service fees all declined.

The company "continued to manage risks well" in the third quarter, Donofrio said, citing a decline in the ratio of loans written off for non-payment to Bank of America's total book.

Bank of America gained 1.4% to $25.80 in New York trading on Friday afternoon. The shares previously surged 50% since Trump's election, a gain twice as large as the broader S&P 500, as traders speculated that lenders would benefit from looser regulations under a Republican government.

Consumer banking, the company's largest business, posted $2.09 billion in profit, the highest in more than a decade, Donofrio noted. 

"For years now, consumer banking has stayed focused on responsible growth while investing in new technology and capability to improve the way we serve our customers," he said. "We're seeing the benefit of all of that."

Updated from 7:15 a.m. ET on Friday, Oct. 13, 2017.

More of What's Trending on TheStreet: