(Reuters) - Investment banks Morgan Stanley and Goldman Sachs Group Inc posted better-than-expected quarterly earnings on Thursday, helped by gains in merger advisory and stock underwriting. The results underscored how businesses viewed as stodgy before the financial crisis are becoming critical drivers of earnings growth for investment banks now.

Goldman's fixed-income trading revenue plunged during the first quarter, both for trades it did for customers and investments on its own account. But the bank's investment management and its stock underwriting and merger advisory businesses logged big gains.

Morgan Stanley managed to boost revenue in its bond trading business, after posting a particularly weak first quarter in 2013. But excluding gains or losses from changes in the value of the bank's debt, the company's trading revenue fell during the quarter, while revenue from wealth management, investment management, stock and bond underwriting, and merger advisory all rose. Goldman shares were up 1.35 percent at $158.34 in morning trading, while shares of Morgan Stanley were up 4.2 percent at $31.15.

Morgan Stanley and Goldman Sachs are the last of the major Wall Street banks to report first quarter results, and most rivals' earnings have shown similar strength in businesses like underwriting and merger advisory. But for Goldman Sachs, trading is such a big part of its business that higher revenue in areas like merger advisory has less of an impact on the bottom line than for its rival Morgan Stanley. Goldman Sachs still gets more than 60 percent of its total revenue from trading including its investing and lending activities, while for Morgan Stanley that figure is less than 40 percent, and sometimes closer to half that percentage.

Since the financial crisis, Morgan Stanley Chief Executive James Gorman has been emphasizing businesses like wealth management and merger advisory, which tend to generate more stable earnings and require less capital. Gorman's predecessor John Mack agreed in 2009 to buy Citigroup's Smith Barney retail brokerage business over time, a deal that closed in the middle of 2013.

That deal was designed to make Morgan Stanley a safer company after it nearly collapsed during the financial crisis. Morgan Stanley posted net income applicable to common shareholders of $1.45 billion, or 74 cents per share, compared with $936 million, or 48 cents per share, a year earlier. Analysts on average expected the bank to post earnings of 59 cents a share, according to ThomsonReuters I/B/E/S. It was not immediately clear how the estimates compare to the actual results, but several analysts said the bank beat consensus.

Goldman Sachs' CEO Lloyd Blankfein, on the other hand, has made fewer strategic changes at the bank since the crisis. In the first quarter, the bank posted an 11 percent decline in earnings to common shareholders, to $1.95 billion, or $4.02 a share, from $2.19 billion, or $4.29 a share, in the same quarter last year. Analysts on average had expected earnings of $3.45 per share, according to Thomson Reuters I/B/E/S. That decline came largely from its revenue in institutional client trading, which fell 13 percent to $4.45 billion, and investing and lending for its own account, which fell 26 percent to $1.53 billion.