Bank of America Corp, the largest U.S. bank by assets, reported a second straight quarterly net loss, hurt by a $2 billion writedown of the value of its mortgage business.

The bank posted a fourth-quarter shareholder loss of $1.57 billion, or 16 cents a share, compared with a loss of $5.2 billion, or 60 cents a share, a year earlier.

Excluding the mortgage business writedown, the bank earned $756 million, or 4 cents per share, in the latest quarter.

Analysts had expected earnings of 14 cents per share, according to Thomson Reuters I/B/E/S.

Total revenue fell 11 percent to $22.7 billion.

The bank's fourth-quarter results were the second straight to include large cash charges.

In third quarter, it reported a $10 billion writedown of its cards business after the U.S. Congress approved the Dodd-Frank Act, a financial reform bill that includes curbs on debit card fees banks can charge merchants.

Bank of America shares closed up 1.2 percent at $14.54 on Thursday on the New York Stock Exchange.

(Reporting by Joe Rauch; editing by John Wallace)