The German bank is undergoing a major restructuring, which it began a year ago after a string of annual losses.
Executives and analysts said it is starting to pay off, although uncertainties linked to COVID-19 meant a hefty increase in funds set aside to protect against potential loan losses.
The bank's shares opened 3.3% higher in Frankfurt before easing to trade up 1.6%. So far this year, the stock has gained 17% and recovered from a record low in March.
"It looks like Deutsche Bank is back from the brink of death," Octavio Marenzi, CEO of consultancy Opimas, said.
Revenues for the year are expected to be "essentially flat" rather than "slightly lower," as previously flagged, Deutsche Bank said.
In the second quarter, investment bank revenues rose 46%, including a 39% rise in the important fixed income and currencies business.
Deutsche Banke finance chief James von Moltke told reporters on a call the bank is "working toward" its goal of a pre-tax profit this year.
Already last week, the bank said its results would be slightly better than analysts had expected, and the net loss attributable to shareholders of 77 million euros ($90.30 million) in the quarter was narrower than the 3.3 billion euro loss a year earlier.
Given the economic impact of the COVID-19 pandemic, it increased provisions for credit losses to 761 million euros, up from 161 million a year ago.
The bank last year said it would reduce headcount by 18,000 people, nearly one in five jobs, and exit unprofitable businesses.
"The fruits of all our labor are already starting to show," CEO Christian Sewing said in a memo to staff.
But executives have said it will be difficult to repeat the first half performance in the second half and analysts still expect a full-year loss, although they say the restructuring is strengthening the company.
"Restructuring measures have made it more resilient to weather the disruptive effects of the coronavirus pandemic," Michael Rohr, an analyst with Moody's, said.
U.S. investment banks, including JPMorgan Chase and Goldman Sachs, also reported sharp fixed-income trading gains, benefiting from swings in financial markets generated by the coronavirus crisis.
($1 = 0.8527 euros)
(Reporting by Tom Sims, Patricia Uhlig, Hans Seidenstuecker and Arno Schuetze; Editing by Michelle Martin, Shri Navaratnam and Barbara Lewis)