Spencer Platt/Getty Images

It still pays to be on Wall Street.

The financial industry in New York has slashed jobs by the thousands over the last two years. For those who remain, annual compensation in total is at near-record levels, according to a report released Tuesday by the New York State comptroller.

Since the financial crisis, Wall Street firms have wrestled with two competing market forces. Faced with a heavier regulatory burden, a lethargic economic recovery and the loss of once-big moneymakers like complex derivatives tied to mortgages, the banks have instead tried to cut their biggest expense: people. Yet there persists a view on Wall Street that profits can’t come simply by holding the line on costs — big pay is still needed to lure talent from other firms.

Toward that end, firms have sought to cut jobs and noncompensation expenses rather than compensation itself. Both Goldman Sachs and Bank of America have announced big noncompensation cost-cutting efforts over the past year, for example.

The result is that compensation over all continues to rise even as some shareholders press firms to cut costs further amid weak profit growth. (Nearly half of all revenue on Wall Street is earmarked for compensation; in 2009, Morgan Stanley, which was hit harder during the crisis than most of its rivals, found itself paying out a record 62 percent of its net revenue in compensation and benefits. That number has since come down.)

The report showed that total compensation on Wall Street last year rose 4 percent, to more than $60 billion. That was higher than any total except those in 2007 and 2008 — before the financial crisis fully took its toll on pay.

The average pay package of securities industry employees in New York State was $362,950, up 16.6 percent over the last two years.

“It’s good work if you can get it,” said Thomas P. DiNapoli, the comptroller.

The results are sure to raise eyebrows on Main Street and in Washington, where lavish pay packages have come under attack since the crisis.

Still, the report provides only a snapshot of Wall Street’s finances. The wage data largely covers 2011. With the third quarter in the books, Wall Street firms will soon begin figuring out their bonus pool and how to distribute it. For some Wall Street professionals, the year-end bonus can easily account for more than half their total compensation.

Yet expectations for this year appear to be high, according to another study out on Tuesday. Some 48 percent of 911 Wall Street employees surveyed by eFinancialCareers.com said they felt their bonuses this year would higher than in 2011. That was an increase from 2011, when 41 percent of survey respondents said they believed their annual bonus would increase.

There, the comptroller’s report was not encouraging, saying that a survey it took earlier in the year suggested that Wall Street’s total cash bonus pool for 2012 was likely to decline for the second consecutive year.

The comptroller’s report attested to the importance of financial services to New York City. Financial jobs accounted for nearly a quarter of all private sector wages paid in the city last year, even though they accounted for just a fraction, 5.3 percent, of the city’s private sector jobs.

Over all, the annual report depicted a cloudy outlook for the financial industry and its thousands of employees.

“The securities industry remains in transition and volatility in profits and employment show that we have not yet reached the new normal,” Mr. DiNapoli said.

After posting a “disappointing” $7.7 billion in earnings last year, Wall Street in the first half of 2012 earned $10.5 billion, he said. The industry “is on pace” to earn more than $15 billion by the end of the year.

But even with some signs of improvement, Wall Street is rapidly shedding jobs. The austerity efforts have claimed 1,200 positions so far this year, according to the report. Mr. DiNapoli estimated that the industry lost more than 20,000 jobs since late 2007.

“In the short run, as a way to keep profits up, the firms will drive down costs and that will mean contraction in the work force,” Mr. DiNapoli said.

Goldman Sachs had 32,300 on the payroll at the end of its second quarter in June, down 3,200 people from the year-ago period. Bank of America has cut 12,624 employees over the past year, leaving it with 275,460 people.

Banks have also taken aim at lavish cash bonuses. The comptroller in February estimated that cash bonuses declined 13.5 percent, to $19.7 billion.

As Wall Street reins in cash payouts to top executives, the banks have been encouraged to reward employees with more stock and other long-term compensation. Some people argue that such a move discourages outsize risk-taking and ties an employee’s interest to the long-term health of the bank.

While pay remains high across the board, senior executive pay has fallen since the financial crisis. In 2007, the year before the financial crisis, Goldman’s chief executive, Lloyd C. Blankfein, made $68.5 million. In 2011 he took home $12 million.

For an executive like Mr. Blankfein, $12 million may be a pay cut, but it is still a princely sum compared with other industries. Between 2009 and 2011, compensation in the securities industry grew at an average annual rate of 8.7 percent, outpacing 5.3 percent for the rest of the private sector.

“Whether you love or hate people on Wall Street, they are spending money that is driving our economy,” Mr. DiNapoli said.