UBS outdid rivals thanks to strong investment banking revenues and shrinking client outflows, while Deutsche Bank held ground after a drop in loan loss provisions.

Driven by strong equities and currency revenues, UBS's improved investment banking performance stood out against weak results at several U.S. rivals in the face of sovereign debt concerns, suggesting Chief Executive Oswald Gruebel's tough restructuring strategy is working.

Clients drained a total of about 5 billion francs at the Swiss bank's wealth and asset management divisions, the lowest quarterly withdrawal UBS has experienced since it started to bleed assets at the start of 2008, increasing the chance UBS will stop the asset bleeding by year end.

The results are rather good. The rebuilding of the business is working successfully, said Helvea analyst Peter Thorne as UBS shares were indicated to open up 5 percent.

We may start to see inflows at the end of this year, beginning of next.

UBS turned in a net profit of 2 billion Swiss francs ($1.90 billion), its third quarterly profit in a row after a string of losses following the financial crisis and a tax row. It was well above forecasts for 1.34 billion francs.

Germany's top lender Deutsche posted second-quarter pretax profit in line with expectations, helped by lower loan loss provisions amid weaker industry trends in investment banking.

Its corporate banking and securities division, run by 47-year old Anshu Jain, posted 779 million euros in pretax profit. These accounted for the lion's share of 1.52 billion euros ($1.96 billion) in group pretax earnings.

Deutsche performed less strongly than in the first quarter, but 16 percent stronger than during the year-earlier period, mirroring a trend among U.S. peers like Goldman Sachs and Morgan Stanley .

Deutsche Bank shares were indicated 1.2 percent lower in premarket trade, on concerns over the bank's outlook, and on news the bank's trading income, traditionally a strong point, was weak.

Deutsche Bank reiterated it expects to reach its 2011 target of 10 billion euros from its core businesses but added a note of caution.

While some of the environmental variables are in line with or ahead of our assumptions, others have not yet reached the expected levels, particularly with respect to the normalization of interest rates, the bank said in its quarterly report.

On Thursday, Credit Suisse posted second-quarter profit of 1.6 billion francs, helped by tax and accounting gains.

(Writing by Lisa Jucca, Additional reporting by Katie Reid in Zurich; Editing by Louise Heavens)