"This has shaken our company to the core," CEO Jamie Dimon said.
The bank said managers tied to the bad trade had been dismissed without severance pay and that it planned to revoke two years' worth of pay from each of those executives.
JPMorgan said it had lost $4.4 billion because of the trade from April through June, and its chief financial officer said the bank had lost an additional $1.4 billion in the first three months of the year.
Dimon's original estimate of the loss from the bad trade, disclosed in a surprise conference call with Wall Street analysts in May, was $2 billion.
On Friday, Dimon said he believed the loss was mostly contained. In the worst case, if financial markets deterioriate severely, the bank could lose an additional $1.7 billion, he said. That would bring the total loss to $7.5 billion.
Investors appeared relieved that the mess was mostly behind the bank. They sent JPMorgan's stock price up $1.50, or more than 4 percent, to $35.54. That made it the best-performing stock in the Dow Jones industrial average.
The bank said an internal investigation, including emails and voice messages, had called into question the values that traders placed on certain bets, and that the traders may have been seeking to mask losses.
A spokesman for the Securities and Exchange Commission declined comment. The Justice Department did not immediately respond to requests for comment.
Dimon told Congress last month that the trade was meant to hedge risk at the company and protect it in case "things got really bad" in the global economy. Instead, the trade has backfired and damaged the bank's reputation.
Speaking broadly about the trading loss on Friday, Dimon told analysts: "We don't take it lightly." He added: "We're not making light of this error, but we do think it's an isolated event."
The bank said that it was reducing its net income for the first quarter by $459 million because it had discovered information that "raises questions about the integrity" of values placed on certain trades.
Dimon said the bank had closed the trading division responsible for the bad trade and moved the remainder of the trading position under its investment banking division.
Overall, JPMorgan said it earned $5 billion, or $1.21 per share, for the second quarter, which covers April through June and includes the bank's disclosure of the trading loss on May 10.
Analysts surveyed by FactSet, a provider of financial data, had expected JPMorgan to earn 76 cents per share.
Investors were also cheered to hear that the bank might resume its plan to buy back its own stock. Dimon said the bank was in discussions with the Federal Reserve and would submit a plan in hopes of buying back stock starting late this year.
The big gain on Friday still left the bank's stock about $5 shy of its closing price of $40.74 on May 10, the day Dimon surprised reporters and stock analysts by holding a conference call to disclose the loss.
The company suspended an earlier plan to buy back $15 billion of its stock after reporting the trading loss.
Just three months ago, JPMorgan was viewed as the top American bank, guided by Dimon's steady hand. Since the disclosure of the trading loss, however, that reputation has been eroded.
Dimon, who originally dismissed concerns about the bank's trading as a "tempest in a teapot," appeared before Congress twice to apologize and explain himself, and several government agencies have launched investigations.
Under close questioning from lawmakers in June about his own role in setting up the investment division responsible for the mess, Dimon declared: "We made a mistake. I'm absolutely responsible. The buck stops with me."
The trading loss has raised concerns that the biggest banks still pose risks to the U.S. financial system, less than four years after the financial crisis erupted in the fall of 2008.
JPMorgan stock has lost about 15 percent of its market value since the loss came to light.
Dimon said Friday that Ina Drew, the bank's former chief investment officer, who left after the loss came to light, had volunteered to return as much of her pay as was allowed under the so-called clawback provision in her contract.
That amount was unclear, but Drew made more than $30 million combined in 2010 and 2011, according to an Associated Press analysis of regulatory filings.
In addition, the bank said it would revoke two years' worth of pay for three other senior managers in the division of the bank where the trade occurred. It would be the first time JPMorgan exercised such a procedure.
Those three senior managers have the bank, and four others are expected to leave soon. The Wall Street Journal reported Friday that the trader known as the "London whale," for the size of the bets he placed, was among those who had left.
AP Business Writer Daniel Wagner contributed to this report from Washington.