Wild swings in stock markets across the globe weighed on the banking sector Monday, with a growing number of investors rushing to put their money somewhere safe.

Every large financial institution reported declining income from investment banking during second quarter because of unstable markets.

Driving many investors away is a deteriorating situation in Europe.

Spain’s borrowing costs soared again Monday raising fears that it’s government will require an international bailout. A fund has already been established to save the country’s banks, which have been hobbled by a real estate collapse, and on Monday, the central bank said the Spanish economy contracted 0.4 percent during the second quarter.

The euro hit a two-year low against the U.S. dollar. Stock markets fell sharply, with the key German stock index plunging 3.2 percent, and France and Britain recording almost 3 percent declines.

In the U.S., the Dow Jones industrial average fell 165 points, or 1.3 percent. Earlier in the day, the Dow was down as much as 239 points.

Banks are often hit the hardest when markets grow volatile because much of their revenue comes from advising global corporations and conducting big trades for large money managers.

With so much uncertainty about the economy in the upcoming year, those corporations are more apt to steer clear of big acquisitions and less likely to issue debt or stock to finance strategic plans.

Also, large pension and hedge funds are not keen on making big trading decisions because the odds of a big loss grow when markets are choppy.

Revenues are already under pressure because of new regulations that limit how much money can be collected from debit card and credit card fees.

On Monday, companies taking the biggest hit were Goldman Sachs and Morgan Stanley, both of which depend on investment banking for most of their income and revenue. In the second quarter, Morgan Stanley’s revenue dropped 24 percent, while Goldman’s fell 9 percent compared to the same period last year.

Morgan Stanley stock on Monday slid 43 cents, or 3.4 percent, to $12.35. Goldman fell $2.83, or 3 percent, to $91.33.

Bank of America gave up 12 cents to hit $6.96.

JPMorgan was the only large bank whose stock rose: up 20 cents, or 0.6 percent, to $34.10. JPMorgan’s stock rose on recent regulatory filings that showed CEO Jamie Dimon and his wife and a limited liability company tied to them bought about $17 million worth of company shares last week.