NEW YORK — The financial markets are holding up better than expected on Friday in the wake of JP Morgan Chase’s disclosure that it had a massive trade go bad, which would result in a loss of as much as $2 billion.

The disclosure, made by JP Morgan’s CEO, James Dimon – who termed the losses “egregious”– after the close on Thursday, brought back memories of bank bailouts and the 2008 financial crisis that led to the steepest post-war recession. This time, however, market analysts said they believed the damage would be contained and would not spread to the entire financial system. The widely watched Dow Jones Industrial Average was off only about 50 points after 30 minutes of trading but JP Morgan stock was off about 9 percent.

“The embarrassment factor is more significant than the economic factor,” says Fred Dickson, market strategist at D.A. Davidson & Co. in Lake Oswego, Ore. “The landscape is different than 2008 when all the global banks were massively overleveraged and under reserved.”

Four years ago as the housing market collapsed, the investment bank Lehman Brothers failed, which resulted in a cascading economic crisis. Mr. Dickson says few people realized the importance of Lehman in funding corporate America. By contrast, he says, the JP Morgan trading losses are self-contained to a trading department.

“This is not the blowup of an entire product that affects the entire economic system,” he explains. “The loss is not systemic.”

Nevertheless, other analysts say the JP Morgan disclosure is unsettling. “It’s three years after the financial crisis and Dodd-Frank [banking reform legislation] is not fully implemented, but to think a major financial institution does not have the internal controls to head off the losses before they become so big is a problem of concern,” says Pete Davis of Davis Capital Investments, which advises Wall Street firms on Washington legislation.

Mr. Dimon, in a hastily called conference call with securities analysts on Thursday, said the losses stemmed from huge bets the bank made that the economic recovery would continue to be strong. JP Morgan had invested heavily in corporate bonds but then suddenly lost money when the value of those bonds fell as the economy slowed.

“It points to flaws in the risk management in that bank,” says Mr. Dickson.

What made Dimon’s disclosure especially embarrassing for the bank is that he had argued that regulators should give the banks more leeway to hedge their positions. Under the Dodd-Frank regulations, which aim to limit the damage to the economy from a large failure in the banking system, banks must shed their proprietary stock and bond trading departments by July 2013.

Despite the unexpected trading losses, Dimon said the bank was still profitable with after tax earnings of about $4 billion. In early trading, JP Morgan stock was down $3.35 a share to $37.40, or about 8 percent. The Dow Jones Industrial Average was up 32 points as of 10:45 a.m.