Wall street sign in New York with American flags and New York Stock Exchange background.

Investment bank Goldman Sachs saw its profits nearly quintuple in the first quarter, driven by a massive surge of revenue from its core investment banking and trading operations.

The jump in profits is similar to that seen at JPMorgan Chase, which also reported its results on Wednesday, although unlike JPMorgan, Goldman’s results did not benefit from a release from its loan-loss reserves of any significant amount.

The New York-based company had a profit of $6.71 billion, or $18.80 a share, compared to a profit of $1.12 billion, or $3.11 a share, in the same period a year earlier. The results were much better than the $10.20-per-share profit that analysts had forecast, according to FactSet.

Goldman’s results reflect the health of the stock and bond markets compared to a year earlier. Markets across the world plunged sharply in March 2020 as investors realized how much economic and human damage the coronavirus pandemic could cause. The S&P 500 index dropped 12.5% just in the month of March last year.

But as the economy has recovered and millions of vaccines have been administered, so has Goldman’s profits. The stock and bond market had relatively healthy volatility in the first quarter, which allowed the bank’s traders to profit from the moves. Several companies went public and the volatile trading of certain stocks like GameStop, AMC Entertainment and others allowed Goldman’s traders to take advantage.

In investment banking, Goldman had revenues of $3.57 billion, more than double the revenues of $1.74 billion in the year-ago quarter. Trading revenues rose 60% from a year earlier as well.

Goldman only had a small $70 million benefit to its results from it releasing money from its loan-loss reserves. Goldman doesn’t have a significant consumer finance division, or sell mortgages, as compared to its Wall Street counterparts. The bank is only sitting on $4.24 billion in loan-loss reserves, whereas JPMorgan has $26 billion in reserves.

Goldman’s return on equity, a measurement used by investment banks on how well they are using their underlying assets, was 31% in the quarter. That’s the best quarterly performance for Goldman since 2009. Typically banks like Goldman aim for a return on equity above 10%.

JPMorgan Chase saw its first-quarter profit jump nearly five fold from a year earlier, as the improving economy allowed the bank to free up roughly $5 billion that it had stored away to guard against loan defaults in the early weeks of the pandemic.

The nation’s largest bank by assets said Wednesday that it earned $14.3 billion, or $4.50 per share, in the year’s first three months. That’s compared to a profit of $2.87 billion, or 78 cents per share, in the same period a year earlier.

Excluding the loan loss releases, the bank earned $3.31 per share. The results were significantly better than the forecast from analysts, who were looking for JPMorgan to report a profit of $3.10 per share, according to FactSet.

A significant chunk of JPMorgan’s profit gain came from its ability to release $5.2 billion from its loan-loss reserves in the latest quarter. Banks such as JPMorgan set aside billions to cover potentially bad loans during the early months of the coronavirus pandemic. With the economic picture improving, and trillions of dollars of government stimulus being injected into the U.S. economy, those loans are no longer considered at risk of failing and banks have become confident they can return these loans to the “good” side of their balance sheets.

“With all of the stimulus spending, potential infrastructure spending, continued quantitative easing, strong consumer and business balance sheets and euphoria around the potential end of the pandemic, we believe that the economy has the potential to have extremely robust, multi-year growth,” said Jamie Dimon, the bank’s CEO and chairman, in a statement.

JPMorgan released roughly $2.9 billion from its reserves in the fourth quarter. The company still has $26 billion stored away in its loan-loss reserves, which Dimon said is a “appropriate and prudent” amount for the bank currently.

JPMorgan also had a surge in revenue and profits in its investment banking division, which helped its overall bottom line. The investment banking division had revenues of $14.6 billion in the quarter, up from $10 billion a year earlier. The bank saw significant gains in revenues from its trading desks, reflecting the healthy volatility last quarter in both the bond market and stock market.

While the consumer banking division did report a big profit gain for the quarter, most of that was tied to the release of loan-loss reserves. Revenue in the division fell 6%, largely due to falling interest rates, which will be a medium-to-long term headwind on the bank’s results.

“It is now increasingly clear that the bank over-reserved (for losses in the early part of the pandemic), and that money is now flowing back into its earnings, concealing some of the weakness in consumer banking. But overall this was a great quarter for JPMorgan,” said Octavio Marenzi, CEO of consulting firm Opimas LLC, in an email.

Total revenue across the entire bank was $33.12 billion, up from $29.01 billion a year earlier.