Time for that second home in the Hamptons.

The average banker bonus in 2017 is poised to get fatter for the second straight year, as hopes for deregulation have led to a flurry of trading and underwriting on Wall Street, according to New York state Comptroller Thomas P. DiNapoli.

The upbeat forecasts, which anticipate bonuses will rise 3.8 percent to $143,462, are based on a blazing first half, during which industry profits jumped 33 percent to $12.3 billion, according to government figures.

“After a very successful first six months, Wall Street profits are on track to exceed last year’s level, barring a major fourth-quarter setback,” DiNapoli said in a statement.

That’s despite a mixed year for Goldman Sachs, whose bond-trading revenues plunged 40 percent during the first quarter. Such stumbles have been more than offset, analysts say, by revenues that have surged industrywide as the stock market hits all-time highs.

The bonus projections outpace the 1 percent rise seen in 2016, but checks mailed out next spring will still fall far short of the all-time high of $180,420 in 2006, at the height of the rally that preceded the financial crisis.

Nevertheless, Wall Street’s traders and dealmakers are on track for their biggest bonuses since 2014, according to the comptroller’s annual report.

A boom in trading is largely responsible for the surge in profits, bringing in $7.4 billion in revenue through June, a 40 percent jump from last year, according to the comptroller’s office.

Securities underwriting — a crucial part of investment banking — brought in $11.3 billion, a 23 percent rise in revenue, the report said. Together, these two businesses brought in $4.2 billion, a 29 percent increase from the same period last year.

While Wall Street is hoping for the Trump administration to cut regulation and slash corporate taxes, DiNapoli’s office cautioned against removing protections that could cause economic instability in the case of a market crash.

“When Wall Street does well, state and city tax collections benefit,” DiNapoli said. “Nevertheless, attempts to boost profits by rolling back financial regulations and consumer protections could promote excessive risk-taking and volatility and put everyday Americans and the broader economy in harm’s way.”