The hard times are over! That sound? Champagne corks hitting the ceiling on Wall Street. For the second year in a row, profits in the New York securities industry rose, and with them the average bonus paid to industry employees in the city climbed 17% in 2017.

At $184,220, the average bonus for Wall Street workers was the highest since 2006, based on estimates from New York’s state comptroller. It’s the second highest amount in records going back to 1988 (not adjusted for inflation).

Comptroller Thomas P. DiNapoli says this is good for New York, as it can take in more in taxes. His office estimates that the securities industry accounted for 18%, or about $13.5 billion, of state tax collections in the 2016-2017 fiscal year.

The total bonus pool for 2017 was $31.4 billion, compared to $26.9 billion the previous year, the comptroller’s office said. Financial market volatility, higher interest rates, more debt issuance, and a rollback of financial regulation are helping banks and securities companies increase their profits.

While bonuses may have returned to the pre-crisis levels, the size of the industry hasn’t yet. Employment in New York’s securities industry is 6% smaller than before 2007, while the private sector in the rest of the city has grown by 23%, the state official said.

The comptroller’s report shows the huge disparity in pay going to Wall Street employees. “The industry accounted for less than 5 percent of the private sector jobs in the city in 2016, but it generated more than one-fifth of all private sector wages paid in the city,” the statement said. The average salary (including bonuses) on Wall Street was $375,200 in 2016, five times higher than in the rest of the private sector at $74,800. Across the US, the median household income in was $59,039 in 2016, the highest on record.