New York CNN Business  — 

Goldman Sachs is clearly still the top dog on Wall Street. The investment banking powerhouse reported earnings and revenue Monday morning for the second quarter that easily topped analysts’ forecasts.

Goldman Sachs (GS) posted a profit of $2.9 billion, or $7.73 a share, during the three months ending in June. Analysts were expecting earnings of $6.61 a share. The bank also generated revenue of $11.9 billion. While that was down 23% from a year ago, it still surpassed consensus estimates of $10.7 billion.

Shares of Goldman Sachs, one of the 30 stocks in the Dow, rose 2% in late afternoon trading Monday. The results were not enough to support the broader market though. The Dow and other financial stocks were flat to down slightly.

Goldman Sachs thrived despite the fact that stocks plummeted during the first half of 2022. The environment for banks was particularly challenging.

Rivals JPMorgan Chase (JPM) and Morgan Stanley (MS) both reported earnings last week that missed forecasts. Bank of America (BAC) posted earnings and revenue that also failed to meet expectations on Monday. The investment banking side of their businesses were largely responsible for the disappointing results.

But Goldman Sachs was helped by a boost in its massive bond trading unit. Revenue for fixed income trading surged as yields rose thanks to interest rate hikes from the Federal Reserve.

Goldman Sachs also said that its consumer and wealth management unit, which includes the digital bank Marcus, posted record revenue of nearly $2.2 billion in the quarter, up 25% from the same period last year.

“Despite increased volatility and uncertainty, I remain confident in our ability to navigate the environment,” said Goldman Sachs CEO David Solomon in the bank’s press release.

Consumer businesses are strong despite recession fears

The consumer divisions of the biggest banks continue to perform well, despite all the worries about inflation and a possible recession.

Solomon noted during a conference call with analysts that “we don’t see significant indications of credit deterioration” in its consumer business, even though “it’s certainly an environment where people are more cautious about risk.”

Bank of America also reported healthy results from its consumer unit. BofA CEO Brian Moynihan told analysts during a conference call Monday that the bank is “mindful of the debate about a future recession, and we have prepared the company across the last decade-plus through responsible growth to be prepared for that.”

“But as we see our current customer base, we are not seeing them slow down in terms of their activities,” Moynihan added.

Banks are also in much healthier financial shape now than they were during the 2008 Global Financial Crisis and Great Recession. Top US financial firms all passed the Fed’s most recent stress tests, which measure how well banks will be able to weather any future economic and market adversity.

Many big banks raised their dividends following the stress test results. Goldman Sachs boosted its quarterly payout by 25%.

Despite that, shares of Goldman Sachs are still down more than 20% this year. And the broader market’s struggles has been bad news for Goldman Sachs employees. The bank said Monday that its compensation and benefits expenses, the so-called bonus pool, was down more than 30% from a year ago.

Goldman’s Chief Financial Officer Denis Coleman also said on the conference call with analysts that the bank is planning to slow the pace of new hires due to the “challenging operating environment.”