NOT long ago China was a leading culprit in global economic imbalances. Whether blame was ascribed to its undervalued yuan or its frugal people, the problem seemed clear. China was selling a lot abroad and buying too little back. One data-point summed this up: its currentaccount surplus reached 10% of GDP in 2007, well above the level that is generally seen as reasonable. Far less attention has been paid to its steady decline since then. In the first quarter of 2018 China ran a current-account deficit, its first since joining the World Trade Organisation in 2001. Just as its massive surpluses of yore had big consequences for the global economy, so does this swing in the opposite direction. China still exports many more goods than it imports, to the tune of nearly $500bn annually. But its share of global exports appears to have peaked. At the same time its trade deficit in services is getting bigger, largely thanks to all its tourists venturing abroad (see chart).

At bottom, a current-account balance is the difference between a country’s investment and savings. When China had a big surplus, its savings, at 50% of GDP, far outstripped even its colossal investment. Data on savings are patchy in China. But it is known that investment has declined as a share of GDP. The implication is that the rate of savings has almost certainly declined more sharply, reflecting a big increase in consumption. Its economy is, in other words, better balanced than just a short while ago.

China’s current-account deficit in the first quarter was exaggerated, since exports tend to be subdued at the start of the year. It is likely to return to a surplus in the coming months. But Ding Shuang of Standard Chartered, an emerging-markets bank, forecasts that the surplus will be just 1% of GDP this year and 0.5% next year. The trade ruckus with America could reinforce the downward trend. To placate President Donald Trump, China will try to import more from America and pay more for foreign intellectual property (IP), Mr Ding says.

One probable outcome is that the exchange rate will become more volatile. In recent years capital outflows have pressed down on the yuan, but the current-account surplus has countered that effect. In the future China will have a thinner cushion. Depending on quarterly trade swings, the yuan will be as likely to fall as to rise.

If China’s current-account deficits become more frequent, it will have to run down its foreign assets or borrow more from abroad to pay for its consumption. Should its external liabilities—that is, money it owes the rest of the world—increase rapidly, that might signal greater financial vulnerability. But as long as the increase is moderate, it could actually help China by boosting the yuan’s global profile.

To fund its deficit, China might choose to sell more bonds to foreign investors. And in paying more for goods and services than it earns, it could supply its currency abroad. By itself this would not be enough to make the yuan go global. Investors would need more faith in China’s institutions. But technically, the conditions would be ripe for the yuan’s emergence as a more credible rival to the dollar. America might find itself pining for the days when the Chinese currency was undervalued.