As if that isn't enough, the company is also in talks with the Justice Department over a separate mortgage deal. A person familiar with the matter confirmed to CNNMoney that BofA met with the DOJ this week to talk about a possible settlement. The bank has previously offered more than $12 billion to resolve the matter, but no deal has been announced yet.

Plus, BofA revealed a $650 million settlement on Tuesday with American International Group(AIG) (AIG) to resolve residential mortgage-backed securities claims.

Those legal hits drove BofA's net income down to $2.3 billion from $4 billion the year before. Excluding those charges, BofA would have exceeded Wall Street's earnings forecasts.

More signs of improving economy: Like many of its peers, BofA's overall results managed to exceed expectations amid the improving economy. There were indications that things are picking up for both corporations and consumers.

"The economy continues to strengthen, and our customers and clients are doing more business with us," BofA CEO Brian Moynihan said in a statement.

In a sign of the stronger economy, BofA's consumer and business banking profits rose to $1.8 billion from $1.4 billion. The company benefited from lower credit losses as well as higher deposit and brokerage balances.

BofA's global banking revenue rose thanks to more investment banking fees from all the mergers and initial public offerings.

"Among other positive indicators, consumers are spending more, brokerage assets are up by double digits and our corporate clients are increasingly turning to us to help finance business expansion and merger activity," Moynihan said.

Earlier this week Goldman Sachs(GS) and JPMorgan Chase(JPM) reported stronger-than-expected results. JPMorgan benefited from the a pickup in activity from Main Street customers, a similar story to Bank of America and good sign for the U.S. economy. Goldman was aided by the investment banking bounce.

While foreign exchange and commodities trading suffered declines, BofA pointed to improved performance in mortgages and municipal products. Not surprisingly, equity sales and trading revenue tumbled due to much lower volatility in the stock market in recent months.

Shares of the Charlotte, North Carolina based bank fell 2% on Wednesday.