Morgan Stanley reported a better-than-expected quarterly profit on Thursday, as its investment banking business benefited from record levels of capital market activity that helped offset a slump in fixed income underwriting.

Trading revenue at Wall Street banks was a sour spot in the second quarter, facing tough comparisons to the year-ago period when the COVID-19 pandemic first hit, causing wild volatility in the markets that provided opportunities for banks.

Equity trading for Morgan Stanley fell slightly from the prior quarter but was up overall from a year ago. Bond trading revenue fell to almost half of what it was a year earlier.

Net revenue of its institutional securities division, which houses the bank's largest reporting lines - sales and trading and investment banking - fell nearly 14% to $7.09 billion in the quarter.

Morgan Stanley shares were down 1.4% in pre-market trade.

Rival investment bank Goldman Sachs Group Inc reported earlier in the week its global markets business, which houses its trading desks, saw a 32% decline in revenue, while JPMorgan Chase & Co, the largest U.S. bank, also suffered from the well-flagged slowdown from last year's record-breaking trading results. [L4N2OP27H]

Morgan Stanley also joined its rivals in enjoying gains from a surge in deal-making activity in the first half of the year that smashed all-time records, with over 28,000 deals totaling volumes of over $2.82 trillion being announced between January and June, according to data from Refinitiv.

Investment banking revenue rose 16% at Morgan Stanley to $2.38 billion, largely driven by gains from advising on deals and equity underwriting.

The bank, which advised on 216 deals in the first six months of the year, ranked third in the global M&A league tables during the quarter, behind Goldman Sachs and JPMorgan, according to Refinitiv.

The investment banking boost pushed Morgan Stanley's net income applicable to common shareholders to $3.4 billion in the second quarter ended June 30 from $3.05 billion a year earlier.

On a per-share basis, however, the bank's profit fell to $1.85, while still beating analysts' average estimates of $1.65 per share, according to IBES data from Refinitiv.

Net revenue rose to $14.8 billion from $13.9 billion.

Return on tangible common equity excluding integration related expenses came in at 19% in the quarter, well above the bank's two-year target of between 14% and 16% set in January. The metric measures how well a bank is using its capital to produce profit.

Even with the trading slowdown, Morgan Stanley's results cap a strong quarter for big U.S. banks, after pandemic induced loan losses failed to materialize and the U.S. economy began roaring back to life.

Morgan Stanley, which lacks a big consumer lending unit, reported a sharp drop in provisions for credit losses to $73 million from $239 million.