Boosted by an accounting gain related to the declining value of its debt, embattled Morgan Stanley (MS) revealed a 46% leap in third-quarter revenue and said it swung to a healthy profit on Wednesday.

The New York-based investment bank said it earned $2.2 billion, or $1.15 a share, last quarter, compared with a profit of $131 million, or a loss of 7 cents a share, a year earlier.

When a $3.4 billion debt valuation gain is excluding, it earned 2 cents a share last quarter. A number of other big banks have taken similar charges, known as Debt Valuation Adjustments, that can occur when their debt loses value compared with Treasuries.

Morgan Stanley said its revenue climbed 46% year-over-year to $9.9 billion. That rise includes $3.4 billion in gains related to DVA and other factors.

Analysts had called for EPS of 30 cents on revenue of $7.42 billion.

“Morgan Stanley effectively navigated turbulent markets while consolidating our market share gains with Institutional clients and demonstrating resilience across the Global Wealth Management business,” CEO James Gorman said in a statement.

Morgan Stanley spent much of the third quarter fending off rumors about its exposure to troubled French banks that hold much of Greece’s toxic sovereign debt.

Ruth Porat, Morgan’s chief financial officer, told Dow Jones Newswires on Wednesday the company’s exposure to Europe debt was $5.7 billion at the end of the quarter. When hedges are included, its net exposure was just $2.1 billion and its net exposure to France was “close to zero.”

Morgan’s results stand in contrast with those from rival Goldman Sachs (GS), which posted just its second quarterly loss since going public a dozen years ago and weaker revenue than Morgan for the second quarter in a row.

Morgan Stanley said its global wealth management unit raked in $15.5 billion in net new assets and $3.3 billion in revenue last quarter, compared with $3.1 billion in revenue the year before.

Institutional securities posted revenue of $6.4 billion, up from $2.9 billion the year before. The company’s sales and trading net revenue hit $5.4 billion amid solid results in interest rate products and commodities. However, asset management revenue shrank by 73% from the year-earlier period to $215 million. The unit also swung to a pretax loss of $117 million.

Shares of Morgan Stanley rose 1.86% to $16.94 ahead of Wednesday’s open, putting them on pace to extend a four-week gain of about 10%. Still, the bank's stock has declined nearly 40% year-to-date.

Follow Matt Egan on Twitter @MattMEgan5