ACCORDING to economic textbooks, the currencies of economies with large current-account deficits should depreciate relative to those of countries with surpluses. This will stimulate their exports and curb imports, thereby helping to slim the trade gaps. America has the world's biggest current-account deficit and the dollar has dutifully been falling since 2002. Oddly, however, the currencies of many other countries with large deficits had enjoyed big gains until recently. Now, at last, currency markets have started to see sense.

Britain, Australia, New Zealand and Iceland all have large current-account deficits (along with many other American-style excesses, such as housing and credit booms). Yet over several years until mid-2007, their currencies perversely rose relative to those of economies, such as Japan and Switzerland, with big surpluses. For example, despite a current-account surplus of 4.9% of GDP last year, one of the biggest of any developed economy, Japan's trade-weighted exchange rate sank by 13% from the end of 2002 to mid-2007. New Zealand, where the deficit reached 8% of GDP (bigger than America's deficit of 6% of GDP at its peak), saw its currency gain 28% over the same period.

This paradox is the result of the “carry trade”, a popular currency strategy that partly explains why trade flows are now dwarfed by cross-border capital flows. In a world of low interest rates, international investors were hungry for yield, and so piled into currencies that offered higher interest rates, namely those of Britain, Australia, New Zealand and Iceland, as well as many emerging markets. Those higher interest rates paid by countries with large external deficits were supposed to compensate investors for the risk of currency depreciation. But as investors borrowed in low-interest currencies, such as the yen, to invest in high-yielding ones, this made the latter currencies stronger. That, in turn, prolonged global imbalances by making it easier for profligate countries to finance their current-account deficits.

But since the eruption of global financial turmoil last year and the dwindling appetite for risk, carry trades have started to unwind and it has become harder to finance deficits. As a result, current-account imbalances are once again exerting a powerful influence over currencies. The chart shows that the weakest currencies this year have been in countries with deficits, from Britain to South Africa. In contrast, the yen and the Swiss franc have perked up. The same chart a year or so ago would have shown virtually the opposite relationship.

Increased concern about current-account deficits is also causing investors to discriminate much more between emerging markets. A popular argument in recent years has been that developing economies are less risky because, unlike a decade ago, they are no longer dependent on foreign capital. It is true that emerging economies are forecast to have a combined current-account surplus of more than $800 billion this year, but this is more than accounted for by China, Russia and the Gulf oil exporters. In fact over half of the 25 biggest emerging economies now have deficits. South Korea is running a deficit after a decade of surpluses. Brazil has also moved back into the red, despite record high prices for its commodity exports. Others such as India, South Africa and Turkey have had external deficits for many years.

Sticking to our “mercantilist” guns

In an article last November, The Economist ranked 15 of the biggest emerging economies according to their economic riskiness. Based on the size of external and budget deficits, inflation rates and the pace of growth in bank lending, India, Turkey and Hungary were deemed to be most vulnerable. The ranking attracted a lot of flak in India. An article in the Times of India accused The Economist of “mercantilist thinking at its worst” by treating a current-account surplus as good, a deficit bad. Agreed, a current-account deficit is not necessarily bad: an economy may be borrowing from abroad to finance investment that will lift future growth. Nevertheless, a large deficit does mean that an economy and its currency may struggle if foreign-capital inflows suddenly dry up.

And this is what has happened. This year foreign capital has gone into reverse at the same time as India's current-account deficit has widened sharply. Sharmila Whelan, an economist at CLSA, a brokerage firm, forecasts that India's current-account deficit will rise to almost 4% of GDP in the current fiscal year, and to 5.5% next year. Not only is the trade deficit soaring, largely as a result of higher oil prices; the overseas earnings of Indian IT services companies (two-fifths of which come from the financial sector) are likely to shrink this year.

The nature of the capital inflows financing a deficit also matters. Foreign direct investment (FDI) is less volatile than speculative capital inflows. If we assume that net FDI continues at last year's pace, then it would more than finance the expected current-account deficits in Brazil and Mexico this year. In contrast, net FDI might finance less than one-third of India's deficit and only one-sixth of South Africa's, implying that their currencies are more at risk. The rupee has fallen by almost 10% against the dollar since late last year. Ms Whelan forecasts that it will drop by another 9% by March 2009.

Central banks in the developing world are now worried that falling currencies will exacerbate inflationary pressures. A year ago most emerging economies were intervening heavily to hold their currencies down; now many in Asia, including India, South Korea, Vietnam and Thailand, are having to sell dollars to prop their exchange rates up. The prime exception is China, where hot money continues to pour in and where the current account has a massive surplus.

The longer that international investors remain risk-averse, the more attention they are likely to pay to current-account imbalances. A few currencies seem to have been overlooked: those of Australia, Poland and Hungary have so far held up surprisingly well, despite their gaping external deficits. All three now look overvalued. They could be the next dominoes to fall.