Goldman Sachs and Morgan Stanley are winning back the trading business of hedge fund clients that they lost to European rivals during the financial crisis, as new capital rules spur banks like Deutsche Bank to scale down their businesses.

The two U.S. banks together now have about 37 percent of the market for trading with hedge funds and financing positions, known as "prime brokerage," up about 6 percentage points from the end of last year, according to research firm Preqin.

The market share gains are fueling stock trading profits at JPMorgan Chase & Co. as well as at Goldman and Morgan Stanley, and could be a bright spot when the companies post results later this month.

Prime brokerage is one of the few areas on Wall Street where revenue and prices are rising, even though competition is receding, executives in the business and analysts told Reuters.

"With the foreign banks backing away, it's become a greener pasture for some of the U.S. prime businesses," said Larry Tabb, founder of financial markets advisory firm Tabb Group.

It's a business which the U.S. banks are marketing aggressively. Steve Boyd, founder of hedge fund Armistice Capital, originally used just Zurich-based UBS AG as a prime broker when he started the fund in 2012. Last year, a Morgan Stanley representative told him the bank wanted his business.

"We weren't even looking for a second prime yet," Boyd said. "They told us they were interested in investing in a relationship with us, and didn't just want to work with us when it was highly profitable for them." Armistice ended up giving some of its business to Morgan Stanley.

European banks are falling behind because of new global rules, known as Basel III, designed to make banks safer. Those rules limit the amount of debt that banks can take on to fund their assets, and specify the minimum amount of equity, or capital, that banks must use.

Prime brokerage for stocks, bonds, and related derivatives demands high amounts of capital, by one measure, forcing Europeans banks that are close to the lower limits of capital to scale down their businesses. Preqin data show that since 2013, Deutsche Bank's market share has fallen by a percentage point to 7 percent, with the losses happening mainly in 2014.

Credit Suisse's new chief executive, Tidjane Thiam, is planning to slash its prime brokerage business, according to a Swiss newspaper report in September.