Here’s a little Washington tale only an accountant could love — or a new Treasury secretary about to run up against the debt ceiling.

The story begins in 2008 when the Bush Treasury declared that Fannie Mae and Freddie Mac, the giant housing finance companies owned by shareholders but implicitly backed by the government, were insolvent.  As part of a bailout, the government has injected about $188 billion into the companies, taking in exchange “preferred” stock that, much like a bond, requires the companies to pay a 10 percent annual dividend.

Take a load off, Fannie (Bloomberg)

As the housing crisis deepened, losses at Fan and Fred continued to mount. In the world of corporate accounting, however, such losses actually have some potential value: If the companies were ever to return to financial health, they could be used to offset future profits in calculating the companies’ taxes.  To auditors, however, the prospect of future profits seemed pretty remote, so they insisted that the companies write down the value of these “deferred tax assets” to zero. That $90 billion write-down showed up as a one-time hit on their annual financial results in 2008.

Over the past year, however, Fan and Fred have enjoyed a remarkable turnaround, thanks to an improving housing market and the fact they are now financing and refinancing virtually every mortgage in the country, with a higher profit margin on each loan than at any time in their history. As a result, the two companies last year had a combined profit of $28 billion, their highest ever.

Business is so good, in fact, that the companies and their auditors have decided that those deferred tax assets might not be worthless after all. When the companies announce their first quarter results next week, Wonkblog has learned that the companies are likely to unwind some of those earlier write-downs of “deferred tax assets,” resulting in a one-time boost to earnings of as much as $60 billion. Under the law governing the takeover of Fan and Fred, the entire amount must be paid forthwith in a special dividend to the Treasury. Even by the standards of the federal budget, $60 billion is serious money.

Fannie Mae first disclosed it was contemplating the accounting move back in March, when it issued its annual report, and it has been the subject of speculation among analysts ever since. Both firms have consulted their government regulator, the Federal Housing Finance Agency, and the chief accountant’s office of the Securities and Exchange Commission, about the issue. Spokespersons for both companies declined to comment, citing the “quiet period” rules prior to quarterly earnings announcements.

The interesting hitch in this accounting tale is that Fan and Fred don’t actually have the money to pay the dividend.  Remember, we’re talking here about an accounting adjustment, not an actual surge in cash flow. So to make the payments, Fan and Fred will have to borrow the money, which it can readily do at something just above the government’s low borrowing rate.

And that’s where the delicious irony comes in. For although Fan and Fred are now effectively creatures of the federal government, their financial accounts are still separate. As a result, any dividend payment would have the effect of increasing Fan and Fred’s debt while reducing, by the same amount, the annual deficit of the government that now owns them.

As you might expect, there are big political implications to this left pocket-right pocket charade: A $60 billion dividend payment would postpone the day when the Treasury will bump up against the government’s borrowing limit, the debt ceiling, and be unable to pay all its bills. That’s the next budget showdown with President Obama that congressional Republicans have been hankering for. With the Fan/Fred dividend and the general pickup in tax revenue, some analysts are estimating that might not come now until October.

In effect, then, what we have is a set of off-balance-sheet entities (Fan and Fred) using clever accounting to re-create an asset that it can turn into cash and use to pay a bid dividend to an owner/sponsor (the Treasury) anxious to pump up its financial results.

Haven’t we seen this movie before?  Of course, it’s Enron—only this time it’s the government that’s doing it.

Who says accountancy has to be boring?