Following Citigroup’s (C) second-quarter beat, J.P. Morgan Chase (JPM) and Goldman Sachs (GS) reported earnings that surpassed Wall Street forecasts on Tuesday amid strength in investment banking.

The banks have managed to stay ahead of expectations despite weaker performances by their trading units. Volatility has declined during a period of calmer markets, and trading revenue has suffered as a result. Goldman Sachs is weighing additional job cuts to its fixed-income staff, a consideration that the firm acknowledged on Tuesday.

In the second quarter, the drop-off in trading revenue wasn’t as bad as feared.

J.P. Morgan said its markets revenue, which includes fixed-income trading and equities trading, dropped 14% year-over-year to $4.65 billion. In May, the nation’s top bank projected a 20% decline for the latest period.

Fixed-income revenue slipped 15% amid low levels of volatility and lower client activity, J.P. Morgan noted. Equities trading generated $1.2 billion in revenue, down 10% compared to the same period a year earlier.

For Goldman Sachs, trading revenue for fixed income, currencies and commodities fell 10% to $2.22 billion. The company cited weakness in currencies and commodities, a trend that offset improved revenue from trading securities tied to mortgages.

Goldman Sachs’ equities business logged trading revenue of $1.61 billion, a 9% decline when excluding a reinsurance business that was sold last year.

In a note sent to clients, RBC Capital Markets said Goldman’s beat on fixed-income trading revenue marked the “first quarter for some time that it has exceeded expectations and this has been a focus for the market.” The analysts also noted that investing and lending revenue was significantly above forecasts, while equities were in line.

But even though trading revenue was stronger than many feared, “it’s still not a robust environment for trading,” SunTrust Robinson Humphrey analyst Eric Wasserstrom said on Countdown to the Closing Bell.

During a conference call with analysts, Goldman Sachs Chief Financial Officer Harvey Schwartz said market volumes and volatility levels appear to be “bottoming a bit.” Marianne Lake, J.P. Morgan’s CFO, suggested the trading environment for the second half of year will continue to be characterized by low volatility and client activity.

The firms also got a boost from investment banking fees in the latest quarter, with deal-making on the rise and companies jumping into the IPO market. J.P. Morgan recorded a 4% improvement in equity underwriting revenue, while advisory revenue climbed 31%. Debt underwriting revenue was down 6% for the bank.

Investment banking at Goldman accounted for $1.78 billion in revenue, a 15% increase. Stock underwriting was up 47%, and debt underwriting rose 5%.

Citigroup, which reported earnings on Monday, bucked the upward trend. It posted a 10% decline in advisory revenue for the second quarter.

Also appearing on Countdown to the Closing Bell, Keefe, Bruyette & Woods analyst Chris Mutascio said the sustainability of investment banking remains a question mark.

Meanwhile, lower home refinancing activity has created a headwind for banks. J.P. Morgan saw a 66% decline in mortgage originations to $16.8 billion, although the figure was about even with the first quarter.

Overall, J.P. Morgan booked a profit of $6 billion, or $1.46 a share, down from the year-ago period’s $6.5 billion, or $1.60 a share. Revenue ticked 3% lower to $24.45 billion. Analysts were looking for a per-share profit of $1.29 and revenue of $23.76 billion.

Goldman Sachs reported earnings of $2.04 billion, or $4.10 a share. The results were up 5.5% over the prior year, while analysts expected a decline. Revenue rose 6% to $9.13 billion, beating a consensus estimate of $7.97 billion.

Shares of J.P. Morgan rallied 3.7% to $58.38 in recent trading. Goldman Sachs was up 1.3% at $169.12.

Follow Matthew Rocco on Twitter @MatthewRocco