JPMorgan said Friday that the loss from the bank’s chief investment office’s errant trades has totaled $5.8 billion so far this year.