Goldman Sachs reported first-quarter results that beat analysts' forecasts thanks to a pickup in stock and bond underwriting.

The bank said it earned $2.2 billion in the first quarter, up 5% from a year ago. The earnings were equivalent to $4.29 per share, while analysts had expected $3.90 per share.

Revenue was $10.1 billion, up 1% from a year ago. That also beat analysts' forecast of $9.7 billion.

Goldman's chief executive Lloyd Blankfein described the results as "generally solid."

He also said the potential for economic instability had "constrained" companies and investors and that the bank would remain focused on controlling costs

The US investment bank underwrote more stock and bond offerings, although revenue from advising companies on mergers and acquisitions fell slightly.

Revenue from investing and lending was up overall, thanks in part to Goldman's sale of some of its stake in the Industrial and Commercial Bank of China.

Revenue from the unit that trades on behalf of customers - usually institutions such as pensions, mutual funds and hedge funds - fell. Revenue from the unit that manages money for clients rose.