ANALYSING a country’s debt sustainability sounds dry and nerdy. But the analysis the IMF prepared for Greece in late June spells out the truly tragic consequences of the Greek electorate’s decision in January to vote in a populist government led by Alexis Tsipras, the prime minister and leader of the radical-left Syriza party. Greece has gone from a position where both its economy and its underlying debt position were on the mend, to one where it will need bucketfuls of further rescue finance from official creditors together with more debt relief, the IMF shows. Worse, these calculations were made before Mr Tsipras’s reckless decision to call a referendum on the terms of a further bail-out (and to campaign for rejecting it). That has inflicted yet more damage on the economy by closing down both the country's banks and its negotiations with creditors, and caused Greece to become the first developed country to default on the IMF (though the Fund more blandly calls this going into arrears). Even if voters on Sunday vote against Mr Tsipras and support the now withdrawn bail-out proposals made by the creditors, the cost of clearing up the mess caused by the Syriza-dominated government has clearly risen dramatically.

Some commentators are now arguing that the Greek economy is simply an economic misfit that is unable to cope with being in the euro area. Certainly the magnitude of the Greek downturn, a fall of 27.4% in GDP from the peak in the spring of 2007 to the trough in late 2013, dwarfs that of any other country. (Portugal, for example, suffered a decline of 9.6% between early 2008 and the start of 2013.) Yet a recovery did get under way in 2014, and in the third quarter of that year Greece was one of the strongest-growing economies in the euro area. The performance of exports, which had been dismal for most of the past five years (in part because of a global slump in the shipping industry, an exporting mainstay), improved a lot. Exports grew in real terms by 9% last year, helped by a buoyant tourist season.

The recovery that might have been Greece’s public finances were also on the mend, as a once yawning deficit on the primary budget (ie, before interest payments) swung into surplus. Indeed, little more than a year ago, Greece was able to return to the private markets, borrowing €3 billion ($3.3 billion at today’s exchange rate) in five-year bonds at a yield of just under 5%. That was an extraordinary comeback for a country that had presided over the biggest default in history, and the fourth most severe restructuring of public debt among middle-to-high-income countries since 1975. Greece was able to raise a further €1.5 billion in three-year bonds in July 2014, and later that year swapped roughly the same amount in short-term Treasury bills into longer-term debt. Moreover, as the IMF’s debt-sustainability analysis (DSA) spells out, the Greek debt outlook was improving sharply. At the time of its last review of the bail-out programme in May 2014, the Fund envisaged debt falling from 175% of GDP in 2013 to 128% in 2020 and 117% in 2022, assuming programme's budgetary measures, reforms and privatisations were carried out as specified. These figures were still too high for the IMF, which had insisted in late 2012 that debt be brought down to 124% in 2020 and “substantially below” 110% in 2022. However, since that review in the spring of 2014, interest rates had fallen, improving the debt picture in 2022 by 9 percentage points of GDP. Taking into account other factors (such as the fact that €11 billion of the original allocation of around €50 billion to recapitalise the banks was never used), Greek debt would have fallen to 117% of GDP in 2020 and 104% in 2022, implying no further need for debt relief. But the needle on the barometer showing fair fiscal weather ahead has swung abruptly to storm conditions. Even before the past week’s extraordinary events, the misguided policies and antagonistic tactics of the Syriza-led government were taking their toll, as deposits drained from the banking system and uncertainty blighted everything. The promising recovery was snuffed out and the economy slipped back into recession in the final quarter of 2014 (when fears about a possible election were already affecting confidence) and the first quarter of 2015. That downturn will now become much more severe. Considering these already adverse developments—again, even before the rupture of the past week—the IMF estimated that Greece would need a further bail-out of €52 billion between October 2015 and the end of 2018. At least €36 billion would have to be new money from euro-zone countries. This financing would be needed because Greece would be unable to access private markets to pay interest and redeem debt coming due over that period while primary surpluses and privatisation proceeds would be lower than previously planned and the backlog of unpaid bills and tax refunds, estimated at €7 billion, would have to be cleared. This financing requirement would be on top of €12 billion needed in the intervening period, which could have been met from existing bail-out money if a deal had been concluded at the end of June. Moreover, European lenders would have to offer even more tacit debt relief by doubling already very long maturities on euro-zone loans, if debt was to be sustainable.

All this before the wreckage of the past week. Seldom has the cost of political incompetence and brinkmanship been spelt out so vividly. Even if the Greeks vote for sanity in the referendum and endorse the creditors’ proposals in what will be seen as a vote for staying in the euro area, they have paid a heavy price for the impatience that brought Syriza to power.