The International Monetary Fund's dealings with Brazil in the past two years constitute a textbook failure in monetary management. As a result of monetary policy errors, Brazil faces a steep and unnecessary recession.
At one level, the story is straightforward: Brazil defended an overvalued currency until it finally snapped. The greater mystery, and greater concern for the future, is the complicity of the US government and the IMF in this blunder.
As in so many policy failures, the Brazil debacle began with a great success. In 1994, Fernando Henrique Cardoso, then finance minister and now president, led a team of reformers in designing and implementing an ingenious programme of monetary stabilisation in which a pegged exchange rate played a crucial part.
The Real, was phased in between March and July 1994 with a nearly constant value against the dollar. As predicted, wage and price inflation began to slow markedly as the exchange rate stabilised.
But as in many other "exchange rate based" stabilisations, the slowdown in wage and price inflation slightly lagged behind. While the new monetary unit was nearly stable after April 1994, wages and prices approximately doubled between the second quarter of 1994 and the end of 1995. The result was an elegant and essentially costless stabilisation, so effective as to deliver the 1994 presidential elections to Mr Cardoso.
But the legacy was an over-valued exchange rate. The next step should have been clear. It was time to move away from the pegged rate, and to introduce a much more flexible exchange rate system. This is the path successfully taken by Israel after its 1985 stabilisation, and by Poland after 1990.
Some governments, however, fall in the love with the exchange rate peg since an overvalued currency generally means cheap consumer goods and high real wages in urban areas. Thus, Mexico delayed a needed exchange rate change in 1993-94 in large part because the government feared the political consequences in the 1994 election year.
The consequences, of course, were dreadful in 1995, following a December 1994 devaluation when Mexico had exhausted its reserves in a futile defence of the currency.
Brazil (and Thailand for that matter) had the Mexico debacle clearly in view in 1995-96, and so too did the IMF. What happened therefore is even more remarkable.
Brazil delayed needed exchange rate changes, presumably with a view towards Mr Cardoso's forthcoming re-election campaign.
In the autumn of 1997, when the Asia crisis hit, the Real was heavily attacked - understandably and predictably in view of Brazil's currency overvaluation, its significant budget deficit (then around 4 per cent of gross domestic product), and its large stock of short-term internal and external debt.
At that point, an urgent re-assessment of monetary and exchange rate policy was due. And yet the IMF ardently defended the Brazilian decision in October 1997 to put up interest rates to 50 per cent per year precisely in order to hold the currency.
This decision was fateful. It cemented the end of Brazilian economic growth, and built in a fiscal time bomb. When the misguided defence of the currency began, the deficit was about 4 per cent of GDP. A fiscal adjustment, supposedly of 2 per cent of GDP was announced, and praised by the IMF.
But instead of reducing the deficit to 2 per cent of GDP, the 1998 budget deficit in fact jumped to about 8 per cent of GDP, in large part the result of the self-induced economic slowdown (which reduced tax collections) and the rapid build-up of interest payments on public debt.
Any careful observer in 1998 could recognise the Mexico debacle clearly. When Russia fell into the same currency trap in mid-year - for the same reason: an exchange-based stabilisation programme held too long with IMF encouragement - Brazil was the subject of intense speculative attack once again.
So here was Brazil in October 1998, now with zero economic growth, a looming recession, a hugely overvalued exchange rate, a rapidly rising internal debt, a clear view of Russia's collapse, and the support of the IMF to defend the currency. Of course, a major part of the story (as in Mexico in 1994) was that Mr Cardoso's re-election was just around the corner.
The IMF, the US government and Brazil worked out a fatuous $41bn stabilisation programme predicated on a continuation of the pegged exchange rate regime. Once again, the IMF leadership disparaged "academic observers" who suggested the Brazilian currency was substantially overvalued.
The IMF does not, presumably, have a death wish. So why has it been a party to such damaging and unsuccessful policies?
There are, I think, four reasons. First, the IMF and the US Treasury have listened far too much to Wall Street importunings since the mid-1990s. US investors wanted to get their money out of Russia and Brazil without devaluation losses.
Second, the IMF believes it can outsmart the market, when in fact the market is outsmarting the IMF. The IMF (and US) wanted to support Mr Cardoso's re-election.
Third, as an anti-inflation zealot, the IMF cooly accepts deep recessions if it thinks that the output collapse will save a few percentage points on the price level.
Last, the IMF remains impervious to criticism. The critics can carp, but the IMF and the Treasury hold the bucks.
True to form, after two years of receiving disastrous advice from Washington, where did the new Brazilian central bank governor go for ideas the day after the currency collapse? Why of course, to the IMF and US Treasury.