Goldman Sachs just reported fourth-quarter earnings that beat on the top and bottom lines.

The firm reported earnings per share of $5.08 on revenue of $8.17 billion for the quarter.

Analysts were expecting adjusted earnings per share of $4.80 on revenue of $7.76 billion, according to Bloomberg. It was initially unclear whether the earnings Goldman reported were adjusted.

Full-year earnings per share for 2016 were $16.29.

The beat was driven by a big performance in the fixed income, currencies and commoditions division. Revenues in that business were up 78% from the previous year.

"Higher than expected revenues in FICC, I&L (equity gains) and Investment Management (incentive fees) more than offset lower than anticipated revenues in equity trading and investment banking (DCM better than expected, M&A and ECM worse)," Barclays analyst Jason M. Goldberg said in a note.

"After a challenging first half, the firm performed well for the remainder of the year as the operating environment improved," CEO Lloyd Blankfein said in a statement.

"We continued to manage our expenses carefully and we enter the new year with industry leading positions across our businesses, as well as strong capital and liquidity."

Here's the break-down by business:

Total trading revenues beat expectations, coming in at $3.60 billion ($3.45 billion expected). That's up 25% from the prior-year quarter but down 4% from the third quarter of 2016.

    Fixed income, currency, and commodities revenues also beat, at $2.00 billion ($1.75 billion expected) - up 78% from the prior-year quarter.
      That reflected higher revenues across all major businesses, the firm said, especially in credit products and interest rate products. It was also thanks to improved market conditions, the firm said, "including rising interest rates and tighter credit spreads."

    Equities revenues missed, coming in at $1.59 billion ($1.61 billion expected). That's down 9% from the year-ago quarter, which the firm said reflected lower revenues in client execution due to "significantly" lower revenues in cash products.

      Securities services revenues were lower because of lower average customer balances, the firm said, while commissions and fees were slightly lower as well. The firm said it had higher revenues in derivatives. "Although global equity prices generally increased during the quarter, Equities operated in an environment characterized by continued low client activity levels," the firm said.

Investment banking revenues came in at $1.49 billion ($1.47 billion expected). That's down 4% from the year-ago quarter and 3% lower than the third quarter.

    Financial advisory revenues were $709 million, down 19% from the year-ago quarter, which the firm attributed to an industry-wide decrease in transactions. Underwriting revenues were $777 million, up 16% from the from the prior-year quarter. The firm said that reflected stronger revenues in debt underwriting due to strong performance in leveraged finance and asset-backed activity. Equity underwriting revenues were lower because of a decrease in IPO volumes across the industry, the firm said. The firm said the transaction backlog had increased compared to the third quarter of 2016.

In the same quarter last year, Goldman Sachs beat expectations, if you exclude a big one-off settlement. It reported diluted earnings per share of $1.27 ($3.62 expected) on revenue of $7.27 billion ($7.11 billion expected), after paying a mortgage-backed securities-related settlement that reduced diluted earnings by $3.41 per share. Adjusted earnings per share were $4.68.

In the third quarter, Goldman Sachs had a big beat, reporting diluted EPS of $4.88 ($3.88 expected) on revenue of $8.17 billion ($7.41 billion expected).

Bank of America, JPMorgan, Wells Fargo, and Morgan Stanley have already reported fourth-quarter earnings. Citigroup is set to report around 8:00 a.m. ET Wednesday.