Tom DiNapoli is New York’s least likely billionaire. As state comptroller and sole trustee of the state pension funds, he holds sway over a public fortune — some $150 billion in retirement investments.

Which is why it’s disappointing to see him use that money to grandstand on guns.

Last week, DiNapoli announced that in the wake of the Sandy Hook shooting, the state retirement fund will no longer buy stock in companies that manufacture firearms.

He also says he’s freezing investments in the gun-maker Ruger and notes that the fund sold its stock in Smith & Wesson four days after the massacre.

That should set off alarm bells. The fund cashed out right as Smith & Wesson stock bottomed out at $7.82 a share. Since then, the stock has zoomed up 15 percent in value. Ruger’s profits and gun sales nationally have also been soaring since the murders.

This isn’t to say that New York should dump its cash into guns and ammo. But it’s DiNapoli’s job to maximize fund returns — not to use its cash to score political points.

What makes this even more egregious is that the gun investments are tiny — the Ruger stock is worth just $2 million, .001 percent of the fund’s value — and DiNapoli’s office rarely makes stock-trading announcements about figures this small.

DiNapoli’s spokesman says the state has dumped stocks before, from Sudan and Iran in 2008 and 2009. So eager is the comptroller to make his political point that he’s conflated legal gun-makers with Sudan’s genocidal regime.

Maybe the firearms industry will prove a bad investment going forward, and the pension fund will be better off without it. The point is that taxpayers and state workers deserve these cases to be decided on the merits, and in line with the fiduciary obligations of those responsible.

One good way to remove the temptation to politicize would be for comptrollers not to issue press releases announcing stock-trading decisions.