FORTUNE — Goldman Sachs’ profits in the last three months of 2013 fell 19% from a year earlier to $2.3 billion, but the earnings were much better than analysts had expected.
“We believe that we are well positioned to generate solid returns as the economy continues to heal and provide considerable upside for our shareholders as conditions materially improve,” Goldman’s CEO Lloyd Blankfein said in a press release announcing the earnings.
Goldman (GS) appeared to be able to capitalize on the improving U.S. economy and a buoyant stock market. Deals such as Twitter’s (TWTR) fourth-quarter IPO, on which Goldman was the lead banker, drove fees from stock underwriting up 105% from a year ago to $622 million.
Goldman trading business rebounded after stumbling in the third quarter. And Goldman’s own equity investments, some of which are in private companies, generated an additional $1.4 billion in gains in the quarter.
Shares of Goldman were up slightly in pre-market trading.
In all, Goldman’s earnings came in at $4.60 per share — nearly 10% better than the $4.24 analysts had expected. Revenue was down 5% from a year ago to $8.7 billion, but, like earnings, was far better than expected.
MORE: Yes, Goldman is really a great place to work
For the year, Goldman earned just over $8 billion, up 8% from $7.5 billion in 2012. Part of the earnings bump was due to Goldman cutting its overall compensation in 2013. Compensation expenses, which include benefits, salaries, and bonuses, were $12.6 billion last year. With 32,900 employees, that works out to an average of $383,374 each. That’s obviously a lot of money, but it was down from $399,506 per employee in 2012.
Investors have been eager to see signs that Goldman can once again be the profit powerhouse it once was before the financial crisis. Since then, regulations that seek to limit the amount and type of trading large banks can do, along with fewer deals, have curtailed Goldman’s profitability. In the fourth quarter, the investment bank said its return on equity rose to nearly 13%. That’s well down from pre-2008, when the firm’s ROE often topped 20%.
Still, the fourth quarter seemed to somewhat quiet questions about whether Goldman had lost its touch in its trading business. The firm’s revenue from so-called fixed income, commodities, and currency trading was up 38% from the third quarter. But it was still down 15% from a year ago.
A good portion of Goldman’s profits continue to come from the unit that invests the firm’s own money. Goldman says much of these so-called principal transactions will still be allowed after the Volcker Rule, which was finalized in December. Revenue from those investments generated nearly $7 billion of the firm’s $34 billion in total revenue. Gains from principal transactions were up nearly 20% from a year ago. But trading revenue is still way down as a portion of the bank’s total revenue from where it used to be.
Goldman’s results are the latest sign that the end of 2013 was mostly a good period for the nation’s banks. JPMorgan Chase (JPM), Wells Fargo (WFC), and Bank of America (BAC) have all reported better-than-expected earnings for the fourth quarter. Citigroup (C) appears to be the anomaly. It announced revenue and earnings that were lower than expectations on Thursday and its stock fell as a result.