Deutsche Bank saw profits slip 3 percent in the third quarter from a year ago, as higher costs for streamlining its business and from credit writeoffs offset better revenues from investment banking and trading stocks and bonds.

The bank said Tuesday that its net profit fell to €755 million ($974 million) from €777 million in the same quarter a year ago even though revenues rose 18 percent to €8.7 billion.

Revenues were up sharply at its investment banking operation due to improving market conditions and increasing activity by clients. Financial markets bounced back in Europe during the quarter due to steps taken by the European Central Bank.

The ECB has said it is willing to buy the bonds of indebted countries like Spain and Italy, which would help control their borrowing costs. That has helped shore up confidence in the financial system and reduced fears of a disastrous government default or the breakup of the shared euro currency itself.

Investment banking revenues surged 65 percent to €4.3 billion as income rose from trading stocks and bonds, and as more clients sought fee-producing advisory services.

Companies turn to an investment bank when they want to issue shares or bonds, and for advice on buying other companies. Those lucrative activities can rise and fall along with the level of fear or optimism in markets.

Several factors offset those better results. The bank booked €276 million in losses from its cost-reduction program, and €289 million from lawsuits it is facing. It didn't say what the lawsuits were about. The bank faces civil lawsuits in the United States over alleged manipulation of the London interbank offered rate, a key interest benchmark, by it and other major banks.

It also saw a 20 percent increase in writeoffs for bad loans and investments of €555 million. It said the increase was related to how the bank applied accounting rules that determine when companies must account for the fallen value of investments.

The bank's results beat the consensus estimate for net profit of €687 million among analysts surveyed by financial information provider FactSet, and also exceeded the revenues estimate of €7.85 billion.

Its shares rose 4.1 percent and traded at €34.69 in morning trading in Europe.

"In the third quarter, we delivered a strong operating result which was supported by an improvement in market conditions," co-CEOs Anshu Jain and Juergen Fistchen said. "In the near term, the macro environment remains uncertain, and we will maintain a cautious and risk-focused approach."

Jain and Fitschen, who took over from Josef Ackermann earlier this year, are trying to cut costs and shed risky loans and investments. Big banks are facing a tougher regulatory environment as the European Union and international agreements push them to reduce their amount of risky investments relative to the financial reserves they have to cover losses on those investments.