What happened

Shares of the investment bank Goldman Sachs (GS -0.20%) traded nearly 4% higher as of 10:29 a.m. ET today after the company reported earnings results for the second quarter of the year.

So what

Goldman reported earnings per share of $7.73 on total revenue of $11.86 billion, both numbers that beat analyst estimates in the quarter.

Goldman saw investment banking revenue plummet more than 40% from the second quarter of 2021, which isn't exactly a surprise considering issuances such as initial public offerings have been practically nonexistent this year.

However, Goldman's global markets division took advantage of the volatility and generated nearly $6.5 billion of revenue in the quarter, which is up 32% year over year.

"We delivered solid results in the second quarter as clients turned to us for our expertise and execution in these challenging markets," Goldman CEO David Solomon said in a statement.

He added, "Despite increased volatility and uncertainty, I remain confident in our ability to navigate the environment, dynamically manage our resources and drive long-term, accretive returns for shareholders."

Now what

Given other banks' results last week, the drop in investment banking revenue was expected and it was good to see Goldman easily beat estimates given the backdrop.

Goldman's return on tangible equity in the quarter of 11.4% is below the bank's medium-term target of 15% or higher, but the bank continues to build out its consumer and wealth management division to diversify earnings.

It could still be a tough investment banking environment for the rest of the year, but trading at less than nine times forward earnings, the stock still looks appealing.