Deutsche Bank posted a sharp rise in second-quarter net profit to 466 million euros ($547 million) on Thursday, benefiting from lower legal costs for past misdeeds that outweighed a dip in debt trading.

Germany's flagship lender beat the expectations of analysts, who had forecast net income of 273 million euros after just 20 million euros in the second quarter of last year, according to a Reuters poll.

Nonetheless, Chief Executive John Cryan said group's profitability fell short of its longer-term goals.

"Revenues were not as universally strong as we would have liked, in large measure because of muted client activity in many of the capital markets," he said in a statement.

Revenues at Deutsche Bank's cash-cow bond-trading division were down 12 per cent in the quarter as decreased market volatility led to lower client activity in trading interest rate products and foreign exchange (FIC), while sales were down 28 per cent in equity trading.

Total revenues were down 10 per cent at 6.6 billion euros in the quarter, and Deutsche said it expects revenues of its operating businesses to be lower in 2017 than last year.