Wall Street is doing well.

That’s usually good news for the city budget. This year, though, it comes with bad news.

The industry’s first increase in profits in four years isn’t exactly flooding the city’s coffers with cash. So it may not be enough of a revenue boost to counteract the other fiscal force at work: Mayor de Blasio is fast increasing spending, particularly on city workers.

The previous three years were not good for the city’s investment banks. They paid tens of billions of dollars in fines stemming from fraud and abuse as they struggled to adjust to new regulations meant to prevent precisely that fraud and abuse.

In 2013, profits fell to below what they had been a full decade and a half earlier, and kept falling — from $23.9 billion in 2012 to $14.3 billion last year.

But this year, state Comptroller Tom DiNapoli said Friday, the industry should see an increase, if a slight one. (DiNapoli wisely didn’t venture a specific guess, but just said they’d be up.)

Great, then — more well-paid workers, higher bonuses and more taxes for New York City and the state. Despite the popular notion that rich people don’t pay taxes, bankers provide 18.5 percent of the state’s taxes, and 7 percent of the city’s. Without financiers’ high incomes, New York would not be able to spend more on public-school students than anywhere else in the country, as it does now.

Except right now, key parts of that equation aren’t happening. Wall Street isn’t adding people. As DiNapoli noted Friday, the industry now has “2,600 fewer jobs than there were in March.” That leaves it with 172,000 workers, still 8 percent fewer than before the financial crisis. Goldman Sachs has cut 443 jobs this year, Bloomberg reports.

And Wall Street isn’t adding to bonuses. DiNapoli said it looks like firms are continuing to put aside smaller amounts of money for compensation. Last year, the average bonus shrank 9 percent, to $146,200, and may shrink slightly yet again. Day-to-day salaries have fallen, too.

Nor is Wall Street spending more money on lawyers, parties or other outside expenses.

All of this may be contributing to an odd phenomenon. Even as the city’s economy continues to expand, tax revenues have fallen this year, by a little less than 1 percent, The Wall Street Journal reported last week.

Taxes are falling because people are making less money. As city Comptroller Scott Stringer notes, personal-income-tax revenues fell 5.7 percent in the spring and early summer of the year, “influenced by a slight decline in private-sector earnings.” It was the first such fall in seven years.

Indeed, though the city added 13,400 jobs during the second quarter, it lost 500 “high-wage” jobs — jobs that pay an average of $187,000 a year. That group includes lawyers, accountants, tech professionals and other people who do work for Wall Street firms — and thus depend on Wall Street even though they don’t work directly there.

A small decline in tax revenue isn’t exactly a crisis; things could turn around. But if they don’t, de Blasio has made it much harder for the city to weather a downturn.

Consider: In 2014, when de Blasio took office, the city was spending about $24.5 billion in salaries and wages for its employees each year. Now, the city is spending $25.7 billion.

But in three years’ time, as the full impact of the mayor’s retroactive raises for city workers kicks in, we’ll be paying $29.6 billion. That’s a nearly 21 percent increase over six years — far outpacing any expected inflation.

Ironically, de Blasio has an example here: Mayor Mike Bloomberg. In Bloomberg’s own first six years in office, the city increased its spending on salaries and wages by 28 percent. The wage hikes were largely due to the mayor’s huge hike in teachers’ salaries.

That gave Bloomberg a lot less room for error when pension and health-care costs soared and the 2008 recession hit — and was a factor in Bloomberg largely freezing salaries and wages during his final term.

De Blasio ran for office criticizing this wage freeze. But if he gets a second term, he may well close it out being a miserly mayor, too.

Nicole Gelinas is a contributing editor to the Manhattan Institute’s City Journal.