BOTH POLITICAL parties have begun, after the fact, to extol the virtues of the fiscal stalemate they achieved this year, as if it were all they ever wanted and reflects well on them. In fact it was a good result, but not for reasons that should make them proud. Stalemate was preferable because in the end the default position of using the budget surplus to pay down debt was better than the defective agenda of either party.

The Republican agenda would have done real harm. As so often in his career, the president once again found himself blessed in his adversaries. Their program consisted mainly of financing an irresponsible tax cut out of an illusory surplus in other than Social Security funds. For the surplus to materialize, Congress would have had to cut the budget of most of the government by more than a fifth in real terms, a harmful step that the Republicans no more than the Democrats were prepared to take, as their subsequent votes on the year's appropriations bills attest.

The heavily backloaded tax cut, whose full cost was obscured, would have disproportionately benefited the richest people in the country while forcing the government back into the destructive pattern of borrow-and-spend from which it is only now emerging. The government's long-term and not-so-long- term financial prospects are bleak; projected revenues are nowhere near enough to cover the foreseeable costs not just of the baby boomers' impending retirement but of the rest of the government, including national defense. For the worst of political reasons, the showy tax cut that the president rightly vetoed would have compounded that problem.

Outside the budgetary realm, the Republican agenda consisted mainly of saying no to such basics as campaign finance reform, gun control and/or meaningful regulation of managed care. Having joined Democrats in voting to raise their own pay, the Republicans balked at an increase in the minimum wage unless accompanied by tax cuts, once again for the better-off.

The president, meanwhile, began the year by calling, on behalf of the Democrats, for efforts to strengthen the future finances of Social Security and Medicare. "Save Social Security first," he said; then perhaps cut taxes. But other than paying down debt so that future politicians could more easily borrow to cover the eventual costs of the boomers' retirement, he made no proposals--would not himself endorse either benefit cuts or particular sources of revenue. He professed to be rolling up his sleeves to tackle long-term problems which he then avoided. His Social Security plan turned out to do no more than defer the day of reckoning, while his Medicare plan, to add a needed and popular but costly prescription drug benefit, would make that program's financial prospects worse.

The victories he claimed in signing the final appropriations bill yesterday were mostly minor; the spending increases that the Republicans simultaneously deplored and sought part-credit for supporting were likewise mainly on the margin. The two big budget break-outs of the year--an ill-advised military pension increase which will add to the crowding of the defense budget in the future and another dollop of "emergency" farm aid--were almost obscenely bipartisan. The spending total was made to seem less on paper than it actually was by a series of gimmicks that will haunt the parties next year when they once again try to fund the rest of government without tapping Social Security.

This was a year in which they mainly pretended to legislate, then passed the appropriations bills and went home. The debt automatically goes down as a result, and that's what we have to be thankful for.