Goldman Sachs, like rival U.S. banks, benefits from President Donald Trump's tax cuts in December, which fattened the firm's bottom line.

Goldman Sachs Group Inc. (GS - Get Report)  , in former CEO Lloyd Blankfein's final quarter as head of the Wall Street firm, said third-quarter profit rose 19% thanks to President Donald Trump's tax cuts last December.

Net income was $2.524 billion, the New York-based bank said Tuesday, Oct. 16. Earnings per share were $6.28, beating the average analyst estimate of $5.38 in a FactSet survey.

Goldman Sachs had such an abysmal trading performance last year that some analysts began calling for Blankfein to step aside to make way for the next generation of leaders. The Wall Street firm announced in July that Blankfein would step down at the end of September and be replaced by David Solomon, a former investment-banking executive.

"We delivered solid results in the third quarter driven by contributions from across our diversified client franchise," Solomon said in the statement.   

Like rival U.S. banks, Goldman Sachs is getting a windfall from the Trump tax cuts. Although the tax cuts, which took effect last December, have drastically widened the U.S. government's budget deficit, ballooning the national debt past $21.5 trillion, the legislation has enriched banks' shareholders and employees.

Goldman set aside $554 million for taxes in the third quarter, down 35% from a year earlier. 

Revenue in the firm's juggernaut trading division were mixed, with gains in stock-related fees offset by a decline in bonds, commodities and currencies. 

Stock-trading revenue rose by 8%to $1.79 billion, according to the statement. Fees in the bonds unit tumbled by 10% from the prior year's period to $1.31 billion. 

Goldman Sachs is a holding in Jim Cramer's Action Alerts PLUS member club. Want to be alerted before Jim Cramer buys or sells GS? Learn more now.