Bank of America Corp. (NYSE: BAC) posted a surprise profit due to a pre-tax gain on sales of assets and an accounting gain in the third quarter.

The bank recorded net income of $6.2 billion, or $0.56 per share, versus a loss of $7.3 billion, or $0.77 per share, in the year-ago quarter – a period that included $10.4 billion accounting charge.

Total revenues jumped by about 6.6 percent from $26.9 billion to $28.7 billion.

In the current quarter, the bank posted $9.8 billion in pre-tax benefits arising from the sale of China Construction Bank shares as well as two accounting gains. The bank also booked a pre-tax loss of $2.2 billion connected to private equity and "strategic investments."

“This quarter’s results reflect several actions we took that highlight our ongoing transformation toward becoming a leaner, more focused company,” said Brian Moynihan, the bank’s chief executive in a statement.

According to the New York Times, the bank’s Merrill Lynch unit was hurt by a weak trading climate in Europe, which drove trading revenues downward. The company’s global banking and markets revenues dropped to $5.2 billion from $7 billion, while the unit reported a $302 million loss in the third quarter, versus reporting a $1.46 billion gain a year ago.

Analysts were not impressed by the bank’s results.

A portfolio manager told Reuters: “The headline numbers are dramatically different than reality. I think it would have been flat at best without the adjustments. Revenue was particularly weak.”

The Bank, which has announced tens of thousands of job cuts, saw its stock price plunge about 40 percent in the quarter in the face of massive legal challenges related to its acquisition of mortgage lender Countrywide Financial. Government officials and private investors are pressuring the bank for compensation for losses incurred during the subprime mortgage crisis.

Year to date the stock is down 55 percent.

Meanwhile, Moynihan is committed to cutting costs and selling off non-core asserts like the bank’s stakes in China Construction Bank, its Canadian consumer credit-card portfolio, and a stake in health care services company HCA Inc. (NYSE: HCA).

The Times reported that the bank has about $485 million exposure to Greece (mostly in loans not linked to government debt); but more than $10 billion total exposure to Spain and Italy.