Morgan Stanley reported higher-than-expected second-quarter profit on Wednesday despite weak industry trends.

The New York bank said adjusted earnings were $1.4 billion, or 80 cents a share, compared with a loss of $138 million, or $1.36 a share, a year earlier.

Analysts on average expected earnings of 46 cents a share, according to Thomson Reuters I/B/E/S.

The bank's return on equity from continuing operations was 12.2 percent, higher than rival Goldman Sachs Group Inc's adjusted 9.5 percent for the quarter.

The higher returns came even though Morgan Stanley took about the same risk as Goldman, by one measure: its trading value-at-risk was $139 million during the quarter, compared with $136 million for Goldman.

Value at risk indicates the firm's biggest possible loss in a single day for 95 percent of the trading days in the quarter.

Goldman reported big drops in sales and trading revenue, particularly in fixed income, citing weaker results in areas including corporate bonds, government debt, currencies, and related derivatives.

Morgan Stanley said it saw more customer business in those areas, implying that its hiring of hundreds of traders over the last year has paid off.

John Mack and James Gorman are beginning to pull this thing together, said Mike Holland, founder of Holland & Co in New York, which oversees more than $4 billion of assets. Mack is Morgan Stanley's chairman, and Gorman is its chief executive. Morgan Stanley shares were up 3.7 percent to $26.15 in premarket trading.

(Reporting by Steve Eder; editing by John Wallace)