Those wagers ended up costing the bank more than $6.2 billion before taxes, and subsequent probes into how the losses happened revealed that the bank's outspoken chief executive officer, Jamie Dimon, had a dysfunctional relationship with regulators.
But the London whale trades were just one of many missteps that has drawn regulatory scrutiny. The largest U.S. bank has disclosed more than a dozen probes globally in recent filings, including an investigation from the U.S. Department of Justice in California that preliminarily concluded that JPMorgan violated securities laws in selling subprime mortgage bonds.
U.S. Department of Justice lawyers from other areas of the country and state authorities have been investigating JPMorgan's liability for mortgage securities sold by two other companies it acquired during the financial crisis, Bear Stearns and Washington Mutual.
(Read more: JPMorgan may settle with group of agencies)
The talks to reach a global settlement on the mortgage issues heated up this week after U.S. Department of Justice officials in California told the bank that it was preparing to file a lawsuit.
The New York prosecutor's office is participating in the talks because it is part of a working group formed by President Barack Obama in January 2012 to investigate misconduct in mortgage securities that contributed to the financial crisis.
For the bank, the biggest in the United States by assets, the sums being discussed are painful but manageable. The company reported net income of $21.3 billion last year and analysts have estimated that profits this year will be higher. At the end of June, the bank's net worth, as measured by the accounting value of its assets minus liabilities, was about $209 billion.
Taking a toll
JPMorgan generates so much excess capital from its operations that its board, with approval of regulators, authorized spending $6 billion to buy back stock in the 12 months through next March. That buyback was conditioned on the bank improving the way it calculates its capital needs.
Still, the investigations have taken a toll. Before the London Whale debacle, regulators had given the bank approval to buy back stock at twice the current rate.
The bank has spent about $5 billion a year on legal costs the past two years, largely because of the London Whale debacle and because of mishandling of mortgage loans and mortgage securities.
After two government regulators in January issued public orders that the bank improve its risk and operational controls, as well as its anti-money laundering and Bank Secrecy Act processes, CEO Dimon said the bank had postponed projects that would have built its business so that it could put its house in order.
(Read more: Analysts on JPMorgan Chase troubles: So what?)
JPMorgan has added 4,000 staff to its control groups since 2012—three quarters of them this year—and increased spending on those efforts by about $1 billion. The bank's control group includes risk, compliance, legal, finance, technology, oversight and control, and audit functions. Dimon pointed out the efforts in a memo to employees last week in which he warned that the company was about to face more bad publicity.
The bank's chief financial officer said earlier this month that many types of loans on its books are performing better, but mounting legal costs will prevent those gains from boosting profits.
JPMorgan shares were up 2.7 percent at the close of New York Stock Exchange trading on Wednesday.