CHARLOTTE, North Carolina (AP) — Goldman Sachs said Wednesday that its profits jumped sharply in the third quarter, helped by a strong performance by its trading desks and less need to set aside funds to cover potentially bad loans.

The New York-based investment bank said it earned $3.62 billion, or $9.68 a share, up from a profit of $1.88 billion, or $4.83 a share, in the same period a year earlier. The results beat analysts’ expectations, according to FactSet, and were nearly double from a year earlier.

Like its competitors, Goldman Sachs set aside far fewer dollars to cover potentially bad loans. The bank put aside $278 million in the quarter, a fraction of the $1.59 billion it set aside in the second quarter. Goldman Sachs has a much smaller consumer lending division compared to JPMorgan Chase or Bank of America, but it is exposed to potentially bad loans through its corporate lending program and its Marcus personal loan program.

But the main driver of Goldman’s results was, not surprisingly, its trading division. Wall Street rebounded after the stock market fell sharply in the first weeks of the pandemic. Volumes were high enough to keep traders earning commissions. However September was a rougher month for markets, and it dampened profits compared to the second quarter.

Net revenue in Goldman’s global markets division was $4.55 billion, up 29 percent from a year earlier. The bank’s revenues from its currencies, commodities and fixed income trading operations were up 49% from a year earlier. Stock market revenues were up a more modest 10% from a year earlier.

Goldman’s asset management division, which benefits from investing wealthy clients’ money as well as the firm’s own investments, also had a strong quarter. Net revenues were $2.77 billion, up 71% from a year earlier.