Half an hour before the closing bell on the final day of trading, shares in JPMorgan Chase (JPM 2.51%) are up 2% for the week on reassuring words from the Fed on quantitative easing, and despite reports of a near-record regulatory fine in the works. But it could have been a better week than that.

What the FERC?
On Wednesday and Thursday of this week, Federal Reserve Chairman Ben Bernanke testified before both the House and Senate on the state of the U.S. economy and the central bank's policy response.

In short, Bernanke stuck to his guns when it came to plans to taper quantitative easing later this year, but stressed -- for the umpteenth time -- that the Fed would only do so as long as the economy was strong enough to handle it. And he made it very clear he didn't believe that was the case right now.

Then, yesterday, news broke that JPMorgan was in talks with the Federal Energy Regulatory Commission to settle allegations that it manipulated energy markets in California and Michigan. One billion dollars is one number that's been bandied about to settle the charges, though the fine is more likely to be half that.

Foolish bottom line
A $500-million-dollar fine is better than a $1 billion fine, but that's still a lot of money, and would still be one of the largest fines ever levied against a bank by a regulator. Can JPMorgan handle a hit like that to its balance sheet?

Of course it could. As of the end of the second quarter, the superbank has more than $29 billion in cash on its balance sheet. And the bank just reported record net income of $6.5 billion for the same quarter. But it shouldn't have to handle a hit like this, and neither should shareholders.

Jamie Dimon is too good a CEO and too obsessive-compulsive about risk for this kind of thing to happen. After the London Whale, Dimon put JPMorgan through the equivalent of the Spanish Inquisition, cleaning house and revamping management at many levels. Apparently, he needs to get the rack back out of storage.

JPMorgan will likely end up paying a fine, and not admitting any guilt. That's the way things like this typically go. But that doesn't make it alright: Playing fast and loose with the rules only makes the bank look bad, and big payouts hurt the bottom line.

But most players in the market got a boost this week from Ben Bernanke's soothing words: that QE is still in effect, and the Fed won't abandon the economy at a time of still great need. So one could say that, while the federal government helped JPMorgan shareholders on the one hand this week through the actions of the Fed, it hurt shareholders on the other hand by the actions of the FERC.

In truth, we all know that, when it comes to the regulatory action, JPMorgan has only itself to blame.