A blowout performance in trading and underwriting lifted Goldman Sachs' revenues in the second quarter as it reported flat earnings compared with the year-ago period.

Profits came in at $2.2 billion, translating into $6.26 per share, much better than the $3.78 expected by analysts.

Revenues surged 41 percent to $13.3 billion.

Goldman's markets division benefited from volatility amid the upheaval caused by the coronavirus shutdowns and aggressive stimulus measures by central banks. The equity and fixed income, currency and commodities trading both notched multi-year records.

The investment bank also scored record quarterly net revenue in both equity and debt underwriting as its corporate clients sought to raise funds to ensure adequate liquidity.

Goldman set aside $1.6 billion for bad wholesale and consumer loans in the wake of the downturn due to COVID-19.

Shares of Goldman Sachs jumped after better-than-expected second-quarter profits
Shares of Goldman Sachs jumped after better-than-expected second-quarter profits GETTY IMAGES NORTH AMERICA / SPENCER PLATT

That marks a sharp increase from the year-ago level, but is still much lower than the reserves taken by JPMorgan Chase and other large banks on Tuesday.

Those banks have much larger retail banking operations and are vulnerable to losses in case of defaults on credit cards, car loans and other consumer items.

Shares jumped 4.0 percent to $222.77 in pre-market trading.

jmb/jm