Morgan Stanley (MS) revealed on Friday it swung to a stronger-than-anticipated profit in the third quarter as the investment bank generated a 50% surge in revenue amid robust equities trading.

The earnings beat impressed Wall Street, which bid Morgan Stanley more than 3% higher in premarket trading.

The bank said it earned $906 million, or 45 cents a share, last quarter, compared with a loss of $1.02 billion, or 55 cents a share, a year earlier. The red ink in the year-earlier period was sparked by charges related to the value of the company’s debt.

Excluding the debt-valuation changes, Morgan earned 50 cents a share in the third quarter, easily beating the Street’s view of 40 cents.

Revenue soared 50% to $7.93 billion. On an adjusted basis, revenue was up 7.4% to $8.1 billion, besting calls from analysts for $7.70 billion.

“Our strategy to combine a world class investment bank with the stability of the largest U.S. wealth management franchise and strong investment management is enabling us to deliver exceptional advice and execution for our clients as well as stronger returns for our shareholders,” Morgan Stanley CEO James Gorman said in a statement.

The upbeat results stand in contrast with rival Goldman Sachs (GS), which saw its shares drop on Thursday after revealing a 20% slide in revenue that widely trailed forecasts.

Like Goldman and other big banks, Morgan Stanley felt the negative effects of a slowdown in fixed-income trading. The company’s revenue from fixed income, currency and commodities tumbled 44% last quarter to $835 million.

However, Morgan offset slumping bond trading by growing equities trading revenue, which soared 31% to $1.7 billion.

While Goldman reported plunging expenses on Thursday, Morgan Stanley said its non-compensation expenses dipped to $2.6 billion last quarter from $2.8 billion the year before. Compensation expenses were unchanged at $4 billion.

Shares of New York-based Morgan Stanley rallied 3.35% to $29.90 in premarket trading on Friday. The rally sets the bank up to build on its impressive 51% surge so far this year.

Follow Matt Egan on Twitter @MattMEgan5