For the first time since Jamie Dimon took the helm of JPMorgan Chase and Co. (JPM) the investment bank has posted an earnings loss, as the company wrote down $7.2 billion relating to the bank’s sundry regulatory violations. It was the first loss JPMorgan has posted in ten years.

The bank never posted a loss during the entire Great Recession, an impressive feat considering the turbulent economic climate every other major bank weathered. But after JPMorgan came out of the financial crisis a profitable market leader, they have racked up regulatory violation after violation, at the cost of massive amounts of both time and money.

Dimon admitted the quarterly performance was “very painful for the company.” Litigation has become the cost of doing business for JPMorgan, who have set aside some $23 billion for legal fees and settlements expected to be accrued over the next two years.

While the bank has been hit by fines ranging from $410 million for engaging in energy price-fixing to $920 million for the “London Whale” trading debacle, the biggest payout is still yet to come. A settlement is still pending and is rumored to approach $11 billion.

Interestingly enough, in early trading investors have shrugged off the loss. Ignoring the $7.2 billion writedown, and despite an 8 percent decline in revenues, JPMorgan actually slightly beat analyst earnings estimates. This suggests that if and when JPMorgan is able to settle with the various regulators on its tail, the bank could once again become wildly profitable.

For their third quarter 2013 earnings report, JPMorgan reported a net loss of $380 million, or -$0.17 per share, versus the net profit of $5.8 billion, or $1.40 per share, from the same period a year ago. Revenue for the quarter was $23.9 billion, as compared to $25.9 billion from the previous year. Analysts were expecting a net gain of $1.21 per share (excluding writedowns) on revenues of $24.1 billion.

JPMorgan’s stock rose slightly on the quixotic earnings “beat,” as the company’s shares upticked .55 percent to hit $52.81.