Unrealized losses on U.S. banks' bond portfolios are at an all-time high of nearly $400 billion, according to the data.

While banks may not need to sell and take these losses, the implosion of a mid-sized U.S. lender earlier this year highlighted the risks of bank bond portfolios.