Bank of America reported a decrease in revenue from last year, however, it still beat the Capital IQ Consensus expectation.

Second-quarter earnings for the bank came in at $0.36 per share, $0.03 better than the Capital IQ Consensus. However, revenues fell 7.2% annually to $20.6 billion, which was better than the Capital IQ Consensus prediction of $20.52 billion.

The net interest income came in at $9.2 billion, while the net interest yield decreased from the first quarter to 2.03%.

Total loans, on the other hand, came in at $903.2 billion, an increase of about 1% from last quarter, and 2% from last year.

The provision for credit losses increased to $976 million from $780 million in the second quarter of 2015 due to a slower pace of improvement in the consumer portfolio. Compared to the prior quarter, provision for credit losses was down slightly.

While the bank's revenue may have decreased from last year, mortgage rates are near their all-time lows, which means banks are struggling to balance volume with profitability.

In fact, things may start looking up for Bank of America, which passed its stress test in June after failing it three times previously.