It was a quarter that left investment banking businesses, the once-vaunted profit engines of Wall Street, sputtering.

The trouble created by such factors as a European sovereign debt crisis, the BP oil spill, and extreme market movements became clear on Friday, when Bank of America Corp's investment banking business posted a drop in quarterly revenue of nearly 40 percent.

JPMorgan Chase & Co and Citigroup Inc did not suffer quite as much -- their comparable revenues were down 24 and 26 percent, respectively -- but none of the results augured well for Goldman Sachs Group Inc and Morgan Stanley , which are due to report earnings next week.

It's a bad quarter, said William Smith, chief executive officer of Smith Asset Management. When we experienced the flash crash, it put a lot of people on the sidelines (and) hurt investor confidence.

Smith, who does not currently own Goldman or Morgan Stanley shares, said he expects to be able to buy Goldman shares on any weakness after it reports earnings.

Markets were treacherous in the second quarter, and difficult to trade in. The flash crash on May 6 set off a month of dramatic stock market movements that left some banks reeling from losses on derivatives.

The crash, the oil spill, and fears about European debt unraveling also contributed to a spike in options prices. Banks, which typically sell options and hedge the positions by buying shares, lost money on both their options books and their hedges.

ANTICIPATING WEAKNESS

Lower credit losses helped Bank of America, JPMorgan and Citigroup -- the three largest U.S. banks -- to beat analysts' forecasts on the bottom line. But they struggled to maintain overall revenues, which in recent quarters have received a big boost from investment banking.

Shares of all three banks closed down on Friday. Bank of America was one of the worst-performing bank stocks, falling 9.16 percent to close at $13.98 in afternoon trading. Citigroup shares fell 6.25 percent to close at $3.90 and JPMorgan Chase fell 3.68 percent to close at $38.97.

Analysts had already started to cut their earnings estimates for Goldman and Morgan Stanley in recent weeks, but the results from the other major banks reinforced their fears.

On Friday, analyst Steve Stelmach of FBR Capital Markets cited JPMorgan's weaker-than-expected trading performance as he slashed his earnings estimate for Goldman to $1.36 from $2.75 a share.

To be sure, the abysmal results were far from being a total shock.

It was weak and it had been expected to be weak, said Tim Ghriskey, the chief investment officer of Solaris Asset Management. It's like people don't hear it until reality hits.

Morgan Stanley shares also closed down 3.32 percent at $24.74. But shares of Goldman Sachs closed slightly up at $146.21, a day after it agreed to pay $550 million to settle a U.S. Securities and Exchange Commission lawsuit.

Despite hoping for a low price after earnings, Smith said he expects Goldman to surprise investors with its results.

Out of everybody, they're always the ones able to pull a rabbit out of the hat, he said. It might be bad for Goldman, but not as bad as for everybody else.

(Reporting by Maria Aspan; Editing by Gary Hill)