Scott Eells/Bloomberg News

JPMorgan Chase on Friday said that losses on its botched trade had reached $5.8 billion so far this year. Despite those losses, the bank reported a second-quarter profit of $5 billion, down 9 percent.

The losses were in positions in credit derivatives, made by employees in London who worked in the bank’s chief investment office. The bank said it has lost $4.4 billion within that office in the second quarter, up from the $2 billion loss it initially reported in May.

The company also said it would restate its first-quarter earnings because it was no longer confident that the company’s traders had fairly valued positions within the office that handled the controversial trades.

JPMorgan Chase said it earned $1.21 a share in the second quarter of 2012, down from $1.27 a share a year earlier but beating estimates. In a Thomson Reuters poll, analysts expected JPMorgan to show a per-share profit of 70 cents.

Revenue fell to $22.9 billion, down 16 percent from $27.4 billion in the same quarter a year ago. Net income also fell, to $4.96 billion, from $5.4 billion a year ago. The trading loss reduced the company’s second-quarter profit by 69 cents on an after-tax basis.

In early morning trading, shares of JPMorgan rose 4 percent to about $35.37 a share, but the company has seen its market value plummet since it first announced trading losses on May 10.

Less than an hour before reporting second-quarter earnings, JPMorgan said that it would be forced to restate its first-quarter earnings because of concerns that traders within the bank misstated positions in an effort to reduce losses on a soured credit derivatives bet. After the restatement, JPMorgan’s first-quarter net income will drop by $459 million.

Jamie Dimon, the bank’s outspoken chief executive, has repeatedly told investors and Congress that the bank would remain solidly profitable despite the trading blunder.

“Importantly, all of our client-driven businesses had solid performance,” Mr. Dimon said in a statement.

JPMorgan still has provided no clarity about how much of the bungled trade remains. Mr. Dimon said in the statement that the chief investment office “will no longer trade a synthetic credit portfolio.”

When asked by an analyst during the question-and-answer period, Mr. Dimon said that the riskiness of the trade has been reduced, but did not give any further estimates about the size of the remaining bet. However, he noted that, at worst, the soured credit bet could gather further losses of up to $1.6 billion in the third quarter.

Throughout the call, Mr. Dimon told analysts that the company has strengthened its risks controls to stave off further losses.

He added that the unit will refocus on its “core mandate of conservatively investing excess deposits to earn a fair return.”

Revenue for the investment bank was $6.8 billion in the second quarter, down from $7.3 billion a year earlier. JPMorgan was buoyed by its retail financial services. The unit reported net income of $2.3 billion, compared with $383 million last year.

JPMorgan also slashed compensation within its investment bank by 22 percent, to $2.01 billion. In the same period last year, the investment bank had set aside $2.6 billion to reward its traders and other personnel.

Mike Cavanagh, who led the investigation into the trading losses, outlined a series of flaws that contributed to the debacle.

He reiterated much of what Mr. Dimon has said in the past about the trade being “poorly implemented.” But, what’s more, Mr. Cavanagh noted that the chief investment office’s trades grew in complexity and outpaced the skills and ability of the managers within the unit.

As widely anticipated, JPMorgan announced it would immediately take back compensation from three executives in London.

Mr. Dimon said that Ina Drew, who oversaw the chief investment office and resigned in the wake of the trading losses, has agreed to give up “a significant portion of her compensation.” Mr. Dimon did not reveal just how much compensation would be turned over.

After the call, Jason Goldberg, a banking analyst with Barclays, circulated a research note, emphasizing the company was still attractive.