Goldman Sachs (GS 2.92%) reported third-quarter earnings on Wednesday morning that were both better than expected and reflected impressive year-over-year gains in net revenue for all four of its operating units.

The company earned $3.6 billion, or $9.68 per share, in the three months ended Sept. 30. That was up from $1.9 billion, or $4.79 per share, in the same period last year.

"Our ability to serve clients who are navigating a very uncertain environment drove strong performance across the franchise, building off a strong first half of the year," said chairman and CEO David Solomon in prepared remarks. "As our clients begin to emerge from the tough economy brought on by the pandemic, we are well positioned to help them recover and grow, particularly given market share gains we've achieved this year."

Looking down Wall Street at the sunrise.

Image source: Getty Images.

More than any other company, perhaps, Goldman Sachs' third-quarter results reflect the peculiar divergence in recent months between lower consumer spending and a higher appetite for stocks, especially shares of newly issued companies in the technology space.

The Federal Reserve's decision in March to drop the federal funds rate to 0% caused bond yields to plummet. Institutional investors responded by pouring money into equities, pushing the S&P 500 up 8% since the beginning of the year. Newly public companies have benefited the most, with the Renaissance IPO Index climbing 86% for the year.

Goldman's results reflect these trends. It earned $856 million in equity underwriting revenue in the third quarter — the unit's second-best performance ever. That was down from $1.1 billion in the second quarter of this year, but it was more than double the same figure last year, when Goldman earned $366 million from its equity underwriting business.

The investment bank's trading units are tracing a similar trajectory. All told, Goldman's global markets division generated $4.6 billion in net revenue in the three months ended Sept. 30. That was similarly down from $7.2 billion in the second quarter, but up from $3.5 billion in the year-ago quarter.

The two unqualified standouts in Goldman's performance last quarter were its asset and wealth management divisions, both of which reported net revenues that exceeded the prior and year-ago quarters.

The performance of Goldman's four operating units combined in the third quarter to produce its highest return on equity, the ultimate arbiter of bank profitability, since 2010.

There's no telling how long Goldman will have the wind at its back, but it is making the most of these unusual market dynamics.