Goldman Sachs' headquarters. Image source: iStock/Thinkstock.

October was a good month for big bank stocks. The KBW Bank Index, which tracks shares of two dozen blue-chip bank stocks, climbed 5.7% through the month, handily outperforming the S&P 500, which fell 1.7% over the same stretch.

But some banks fared better than others, with one in particular separating itself from the pack: Goldman Sachs (GS 0.14%). As you can see in the chart below, shares of the investment bank rose 10.4% in October.

GS Chart

GS data by YCharts.

Goldman Sachs' performance last month was fueled by a better-than-expected third-quarter earnings report, which came out on Oct. 18. The bank beat expectations on both the top and bottom lines.

It earned $4.88 a share in the three months ended Sept. 30 on revenue of $8.17 billion. Analysts had predicted that its earnings would come in at $3.82 a share on $7.42 billion worth of revenue. In other words, Goldman Sachs didn't just narrowly beat expectations. It blew by them.

It's worth pointing out as well that Goldman's earnings and revenue were comfortably above the same quarter in 2015, when it earned $2.90 per share on revenue of $6.86 billion.

Goldman Sachs benefited in particular from an improvement in trading revenue. Net revenue from its fixed income, currency, and commodity unit soared 34% in the quarter relative to the year-ago period.

Additionally, as the bank pointed out in its third-quarter earnings release, it's currently ranked first in worldwide announced and completed mergers and acquisitions for the year-to-date, which boosts its advisory income. And it saw a $14 billion net inflow in long-term assets under supervision.

"We saw solid performance across the franchise that helped counter typical seasonal weakness," said Chairman and CEO Lloyd Blankfein. "We continue to manage our balance sheet conservatively and are benefiting from the breadth of our offerings to clients."

Since reporting earnings, shares of Goldman Sachs have climbed 5.3% and are now flirting with positive territory for the year.

It goes without saying, but it's hard to predict what the immediate future has in store for bank stocks. On the one hand, if the Federal Reserve were to raise interest rates later this year, as many analysts and commentators expect, that could provide an immediate boost to banks' profits, as they earn more when interest rates are higher.

At the same time, however, the continued uncertainty surrounding the United Kingdom's pending exit from the European Union could roil global financial markets and depress trading income at banks like Goldman Sachs that have a significant presence in the capital markets.

These uncertainties aside, Goldman Sachs' shares trade for right around book value -- 1.01 times book value, specifically, according to Yahoo! Finance. Once conditions fully and finally improve for the financial sector as well as the economy, this will seem like an incredibly reasonable price for shares of one of the most admired companies in the financial services industry.