Twenty of the world's leading banks spent nearly $339 billion over the last five years on costs related to financial misconduct, according to a British research group's annual study.

The figure is $5 billion higher than the previous report's total. That means 10 years after the start of the global financial crisis—followed by years of compliance reforms—the cost of bank misconduct continues to rise.

The five-year study and report are done each year by the Conduct Costs Project, part of the CCP Research Foundation CIC in Great Britain.

Chris Stears, the foundation's research director, explained in his introduction to the report that "trust in, and the trustworthiness of, the banks must surely correlate to (and be conditional on) banks' conduct costs." 

This year's report covers 2012 through 2016. The costs include any penalties, fines and known litigation expenses, including settlements, due to a bank's misbehavior. They also include legal reserves, which the report labels "provisions," made as of Dec. 31 of each year.

The report lists the top 20 global banks in terms of biggest misconduct costs. And once again Bank of America Corp. topped the list with $58.7 billion in costs over the five years.

The good news for BofA is this year's number was a $12.7 billion drop from last year's total figure. That's the third year in a row that the bank's total conduct costs have dropped.

Jerome Dubrowski, senior vice president for Corporate Communications at BofA, pointed out on Friday that the bank's litigation costs alone have steadily fallen from a high of $16.4 billion in 2014 to a low of $1.2 billion both in 2015 and again in 2016. The litigation costs are on pace to be even lower this year.

"Our litigation expense has declined significantly since 2014 so I would note that this [report] appears to be backward looking and not indicative of the past few years," Dubrowski added.

In second place, with $39.7 billion in costs, was JPMorgan Chase & Co. For the banking giant, the figure was a $2 million increase over last year.

Rounding out the top five were Morgan Stanley, Royal Bank of Scotland and Lloyds Banking Group in the U.K. Other U.S. banks in the top 10 were Citigroup Inc. at No. 6 and Wells Fargo & Co. at No. 10.

Roger McCormick, managing director of the CCP Research Foundation and director of the Conduct Costs Project, lamented in his introduction that "so little has been done to implement a market-wide 'standards' agenda in retail banking."

McCormick also raised the question as to "When, if ever, the level of conduct costs will start to decrease." Not yet, the report shows.

Stears acknowledged that even when the decrease begins, there will always be some conduct costs. He concluded: "The question is at what average level will these costs settle? And, moreover, is that level 'acceptable' to the banks, their shareholders, the public?"