Wall Street’s latest tax dodge.

They give you corrupt stock recommendations. They’re forced to pay a $1.4 billion fine. Then they write it off their taxes.

Nearly three years after the Dow peaked, the bills for the excesses of the ‘90s bull market are coming due. Last December, 10 Wall Street firms tentatively agreed to a settlement with state and federal regulators under which they would pay $1.4 billion to resolve conflict-of-interest charges relating to stock recommendations and research.

The settlement looked like a real punishment for Wall Street, where wallet size is the only measure of a man. But taxpayers may be footing a chunk of the bill. Last week, Republican Sens. Charles Grassley and John McCain and Democrat Sen. Max Baucus informed newly appointed Securities and Exchange Chairman William Donaldson that they were “very concerned about press reports that these settlements are being structured to maximize the amount of the payments that are tax deductible.” If the $1.4 billion in fines and penalties are tax-deductible—and given a federal tax rate of 35 percent—the real cost to the firms would be something less than $1 billion.

Can Merrill Lynch and Goldman Sachs really write off funds paid to settle charges that they engaged in corrupt practices? Probably, though it’s not as scummy as it sounds.

As a general rule, the federal tax code allows companies to deduct all ordinary and legitimate business expenses from their taxable income. They subtract expenses such as salaries, rent, advertising, etc., from their books before they pay the IRS. But the code explicitly bans taking deductions for fines or similar penalties paid to a government entity for the violation of any law. So the treble damages levied on antitrust violators can’t be deducted. Nor can a fine for polluting a river, or exporting illegal technologies, or evading taxes.

But accountants wouldn’t be in business if there weren’t at least one exception to every rule in the labyrinthine tax code. If a fine is not simply punitive but is also a remedial measure to compensate a customer for expenses incurred as a result of a legal violation, then it can be deductible. After all, most companies can argue with a straight face that making wronged customers whole is an ordinary and necessary business expense.

For this reason, when companies settle disputes with authorities, they frequently try to structure their penalties as compensation to individuals—say, $10 for each purchaser of a defective grill.

The Wall Street research settlement hasn’t been finalized. Still, at first blush, is seems that a large chunk of the proposed settlement could be tax-deductible because most of the penalties can be construed as either regular business expenses or customer compensation. The proposed settlement is broken down into three areas. (Click here to see who is paying what.) There’s $85 million to fund investor education efforts, $450 million to fund independent stock research, and $900 million in “retrospective relief” (i.e., restitution), divided equally between the states and federal government. The first two components—educating investors and providing independent research to customers—certainly sound like ordinary business expenses. And under the Sarbanes-Oxley Act, the feds will give their half of the $900 million in retrospective relief to wronged investors. Since that compensation, too, could be tax-deductible, that’s nearly a billion in prospective deductions.

The money that goes to the states for retrospective relief may be deductible in some states but not others. In New York, for example, any fine collected by the attorney general must be deposited in the state’s general treasury, just as other fines are. It would be hard for firms to write off those expenses.

It’s not certain whether the Wall Street firms will get to take the deductions, but you can bet they will try. (And you can bet they will be cagey about it. Consider Merrill Lynch’s record. In May 2002, several months before other Wall Street firms saw the light, Merrill Lynch agreed to pay $100 million to settle Eliot Spitzer’s charges that Internet analyst Henry Blodget and other Merrill employees gulled investors into buying shoddy merchandise. Today, a Merrill Lynch spokesperson told me that it paid the fine in September 2002 but would not comment on whether it was—or was not—deducting the sum from its taxable income. In fact, he dared me to try to figure it out from language in the company’s earnings release. I couldn’t.)

If the payments are tax-deductible, the taxpayers will, in effect, foot the bill for a portion of the $1.4 billion settlement. But it’s not like the companies will be pulling a fast one on the regulators. While they screamed that the cost of the settlement had the potential to bankrupt them, Wall Street executives certainly calculated the possible tax implications of any settlement long before a tentative agreement was reached. At the same time, Spitzer and his colleagues aren’t particularly concerned about the tax implications. Like all good lawyers, they wanted to come away with the largest possible gross number for their plaintiffs. As New York University law professor Daniel Shaviro put it, “The regulators wanted the payment to be big, and the firms wanted it to be tax deductible.” They both got what they wanted.