Nothing out of Washington is more vilified today than the Troubled Asset Relief Program. Approved by a bipartisan majority of Congress in October 2008, TARP now draws bipartisan scorn.

Both Democrats and Republicans criticize it as a deficit-swelling bailout for Wall Street fat cats and the very same speculators who brought on the recession. TARP is now the dirtiest four-letter word in politics.

But here’s what the candidates and their proxies won’t tell you about TARP: It worked.

And it didn’t cost that much.

Of course, you can’t prove a negative. As Herb Allison, the Treasury official who supervised TARP, noted in an interview last week, we can’t look back like George Bailey in “It’s a Wonderful Life” and see what would have happened if the bailout bill had never existed.

Obviously, things got pretty bad with the bailout. However, if we recall the fear and uncertainty of fall 2008, with giant corporations collapsing in rapid-fire fashion amid a very-real fear that the entire financial sector would be sucked in, it’s not hard to imagine that without government intervention the economy would have fallen into a 1930s-style depression.

Now most of us, unless you’re a saint, take a secret (maybe not-so-secret) delight in seeing the rich and powerful humbled. And, on very sound principles, we don’t want to see greed and recklessness rewarded, or at best pardoned. Critics imagine that without TARP we would have enjoyed the justice of seeing investment bankers have their yachts seized and their penthouses thrown into foreclosure.

The problem is, the way our economy works, the fat cats would have taken us down with them. Letting the financial giants fail would have been like a murder-suicide pact. Even more people would have been thrown out of work and our housing values and retirement funds would have sunk even lower.

I don’t know if working class folks in 1929 took glee in seeing Wall Street traders lose their fortunes and throw themselves out of windows, but if they did, that moment of schadenfreude was probably forgotten after 10 years of depression.

For the record, TARP did not cost taxpayers the initially billed total of $700 billion. It was downscaled to $475 billion, and since most of the money spent ($259 billion) went into equity investments in troubled firms, taxpayers got most of their initial outlay back when stock prices rebounded.

As TARP ends its 2-year-old life, the Treasury pegs the final cost of the whole shooting match at just $50 billion, and it could be less if the government gets a good price for its stakes in AIG and General Motors. Yes, $50 billion isn’t chump change, but in an era when we measure the national debt in trillions, it’s not a killer either. In fact, spending $50 billion to avoid a depression sure looks like a bargain.

The one real failing of TARP is that it created what economists call a “moral hazard,” an incentive to engage in risky or immoral behavior. The TARP bailout set an important precedent for government intervention that will encourage more speculation and more disastrous risky engagement. Hastily designed, TARP didn’t set adequate conditions on how rescued firms could spend their money (for example, not on offensive, obscene executive bonuses and compensation) and wasn’t followed up by regulation to make sure that no company is “too big to fail.”

It’s easier to make those judgments now than it was in 2008. But in 2008 we didn’t have the luxury of allowing the economy to take its course, or just letting the free market punish the speculators, as candidates in today’s anti-incumbent atmosphere tell us. Sorry, folks, but for all of TARP’s pitfalls, approving the bailout was the right decision.