(Reuters) - Bank of America Corp (>> Bank of America Corp) reported a profit for the third quarter, compared with a year-earlier loss, as Chief Executive Brian Moynihan's cost-cutting efforts helped the bank mitigate the impact of weak revenue in three of its four main businesses.

BofA has been slashing billions of dollars in costs in its commercial lending, investment banking and wealth management businesses as overnight fund rates remain near zero and worries about China's economy and uncertainty over the timing of a U.S. rate hike prevent traders from making big bets.

Shares of the No.2 U.S. bank by assets rose as much as 2.6 percent in morning trading on Wednesday.

The bank's non-interest expenses fell by a third to $13.81 billion, mainly due to an 83 percent drop in costs in its legacy assets and servicing unit, which houses many of the bad loans inherited from Countrywide Financial.

Consumer banking was BofA's only business to report a rise in revenue as the lender restructured its branch network, grew active accounts and issued more credit cards.

"We continue to make good progress in a tough revenue environment due to low interest rates and a sluggish economic recovery," Moynihan, who won the backing of shareholders last month to remain chairman, said on a conference call.

"The late summer's volatility, especially in the fixed income trading markets, (remains) challenging," Moynihan said.

BofA is seen as the most sensitive to interest rate changes among the big U.S. banks.

Deutsche Bank analyst Matt O'Connor wrote in a note this month that BofA's 2016 earnings would be 7.1 percent lower than his current estimates if interest rates don't rise. In contrast, Wells Fargo & Co (>> Wells Fargo & Co) earnings would be 3.6 percent below his current estimates.

Wells Fargo, the biggest U.S. residential mortgage lender, reported a rise in profit for the first time in three quarters on Wednesday, helped by its purchase of commercial loans from General Electric Co.

REVENUE DROPS

BofA's total revenue fell 2.4 percent to $20.91 billion on a fully taxable equivalent basis in the quarter ended Sept. 30, but beat the average analyst estimate of $20.77 billion, according to Thomson Reuters I/B/E/S.

"Although revenues declined modestly in a tough operating environment, BofA made another solid step forward in maintaining the stability and predictability of its earnings by holding costs flat, improving credit, and further strengthening its capital position," RBC Capital Markets analyst Joe Morford said in a note.

Net interest income declined 6.7 percent to $9.74 billion on a fully taxable equivalent basis, while bond trading revenue fell 10.9 percent to $2 billion.

JPMorgan Chase & Co (>> JPMorgan Chase & Co.) also reported a fall in quarterly bond trading revenue on Tuesday and warned that market expectations for the current quarter appeared to be too high in light of slow market trading.

Excluding litigation costs, expenses fell 4 percent as the bank cut jobs and restructured.

BofA said its headcount fell 6 percent from a year earlier.

Moynihan, who took the top job in 2010, shook up the bank's management in July, replacing Chief Financial Officer Bruce Thompson with longtime executive Paul Donofrio.

BofA, which has paid more than $70 billion in legal expenses since 2008, said its legal costs fell for the third straight quarter, dropping to $231 million from $6 billion a year earlier.

BofA's non-interest income, which includes mortgage banking, rose 1.6 percent to $11.17 billion.

Provision for credit losses increased 26.7 percent to $806 million.

BofA reported net income of $4.07 billion, or 37 cents per share, attributable to shareholders. Analysts on average had expected earnings of 33 cents per share.

In the year-earlier period, the bank had a loss as it took a $5.6 billion charge related to the mortgage settlement.

BofA shares were up 1.6 percent at $15.77. Up to Tuesday's close, the stock had fallen about 13 percent this year, while the KBW bank index <.BKX> had fallen about 5 percent.

(Reporting by Sweta Singh and Anil D'Silva in Bengaluru; Editing by Kirti Pandey)

By Sweta Singh