Bank of America (BAC 3.35%) reported an estimates-beating second quarter on Thursday, but its shares fell due to a generally gloomy outlook for the banking sector as the coronavirus pandemic surges and intensifies across most of the United States.

For the quarter, the bank's revenue came in at $22.3 billion, which was 3% below its Q2 2019 result. Net profit fell by 52% year over year to $3.5 billion ($0.37 per share). Both total loans and leases and deposits rose, with the former increasing by 4% to slightly under $1 trillion, and the latter up 25% to over $1.7 trillion.

Money being passed through a bank teller window.

Image source: Getty Images.

On average, analysts following the stock were expecting $21.95 billion on the top line, and a net profit of $0.25 per share.

As expected by basically everyone following this company in particular or the U.S. banking industry in general, Bank of America's profitability was most affected by heavy loan loss provisioning. This totaled $5.1 billion during the quarter, nearly six times the amount it set aside to cover anticipated defaults a year earlier, and more than the $4.8 billion allocated to that purpose in Q1.

Countering that was the strong performance of the company's global markets unit -- essentially, its securities trading arm -- on the back of robust growth in investment banking fees collected during the quarter. Bond trading commissions also rose substantially. That division saw a 29% improvement in total revenue and an 81% jump in net profit.

But as of 3:15 p.m. EST Thursday, Bank of America was trading down by about 3.3%, a more steep decline than that of the major market indexes, which at that point were down by 0.7% to 1.1% on the day.