CHARLOTTE, N.C. (AP) — Morgan Stanley saw its fourth-quarter profits surge 48% from a year earlier, as the Wall Street bank benefited from the market’s upward swing and investors jubilation for tech stocks and IPOs late last year.

The New York-based firm posted a profit $3.39 billion, or $1.81 a share, up from $2.31 billion, or $1.30 a share, in the same period a year earlier. The results were significantly better than the $1.30-per-share profit that analysts had expected, according to FactSet.

Like its primary competitor Goldman Sachs, who also saw a massive profit increase, Morgan Stanley saw a surge of revenue in its core investment banking and trading operations.

Investment banking revenues were up 46% from a year earlier, mostly due to higher equity underwriting fees. Morgan Stanley has a large business taking companies public, and several large tech firms went public in the last three months of the year. That was a boon for the firm’s underwriting business.

Trading revenue rose 32%. The stock market steadily moved higher the second half of 2020, which resulted in the stock market hitting several highs along the way. Bond trading revenues were also higher.

Morgan Stanley’s wealth management arm, which the company grew over the last decade to help the firm find steadier sources of profits instead of the boom-bust cycle of markets, also had a strong quarter. Net revenues in the firm were up 24% from a year earlier.