Most of the losses , the bank said , were tied to the decline in value of complex debt instruments called collateralized debt obligations , whose value has diminished in recent months as credit markets have been hit by a collapse in the subprime mortgage market .