The world's largest brokerage firm, Morgan Stanley, increased trading revenue in the second quarter to close the gap on losses, the company reported Thursday before the opening bell.

Morgan Stanley (NSYE: MS) reported a second quarter per-share loss that was smaller than analysts estimated, effectively beating the consensus, even though the company still showed a loss for the quarter in earnings.

Morgan Stanley lost 38 cents a share, compared to a profit of $1.09 one year ago for the same period. Morgan Stanley is based in New York.

The company's net income was $1.19 billion, compared to income of $1.96 billion for the same period one year ago.

Morgan Stanley took a $1.7 billion one-time charge related to its conversion of Mitsubishi UFJ Financial Group Inc.'s preferred stake which negated earnings for the period.

The good news for Morgan Stanley in the quarterly report is that trading revenue rose 14 percent from the first quarter. Morgan Stanley is the only large U.S. bank thus far to report an increase in trading revenue for the quarter.

"While global markets remained challenging this quarter, the firm delivered higher year-over-year revenues across our three major business segments," said CEO James Gorman in a statement. "With (an) additional capital cushion and the clear momentum across our main businesses, we are well positioned to help our clients navigate the constantly changing markets and create additional value for our shareholders."

Morgan Stanley reported a net loss of $558 million for the quarter. Analysts had expected a loss almost double that amount.

The company's stock is trading at $21.72 after the market close Wednesday, near a 52-week low of $20.18.