Profits roared back at the investment bank Morgan Stanley in the fourth quarter, reversing a loss in the same period a year ago, when its results were weighed down by a costly legal settlement.

Earnings increased sharply across the bank’s business lines. Morgan Stanley underwrote more stock and bond offerings and brought in more fees from advising companies on mergers and other deals. Financial advisers in the wealth management unit, who work with individual investors, generated more revenue per worker.