Trump could initiate a trade war with China over its support for North Korea. This would be major shock to the world economy.

Full marks for timing, Mr President. Last week marked the 10th anniversary of the start of the biggest financial crisis since the Great Depression, making it an appropriate moment for Donald Trump to threaten North Korea with obliteration.

One of the few achievements Trump can point to in his first six months in office is that shares on Wall Street have been steadily rising since his election victory last October. The “fire and fury” remark and the inevitable counter blast from Kim Jong-un gave the markets pause for thought. But not much more than that.

All things considered, the financial markets took the Kim and Trump show in their stride. Sure, there was a sell-off in shares and the customary flight to safe haven assets such as gold and the Swiss franc in times of heightened tension. But nothing to touch the panic of a decade ago, when the markets suddenly froze up and banks refused to lend to each other.

This is part of a recent pattern. Markets have become relaxed about geopolitical risk and with good reason. Wall Street started rising from the moment Iraq was invaded in 2003. There was barely any response to Russia’s annexation of the Crimea in 2014.

The assumption underlying the muted response is that there will be no war between the US and North Korea, nuclear or otherwise, and that the smart investment play is to buy into any dips.

The markets are part right. It still looks unlikely that Trump will sanction a pre-emptive strike. Kim knows that, which is why he would be dumb to up the ante by aiming some missiles into the sea off Guam first.

But the financial markets – and the broader global econo

my – could still turn nasty in an repeat of what happened 10 years ago even without a shooting war. Over the past decade, markets have shrugged off geo-political risk but have proved much more vulnerable to economic and financial risk. And there’s plenty to worry about in that respect.

For a start, the world has never really recovered from the last crisis. Growth rates have been weak and have only been possible because years of low interest rates and quantitative easing have encouraged consumers and businesses to rack up large amounts of debt. As the economist Steve Keen notes in his new book Can we avoid another financial crisis (Polity), many countries have become what he calls debt junkies.

“They face the junkie’s dilemma, a choice between going ‘cold turkey’ now, or continuing to shoot up on credit and experience a bigger bust later.”

Keen says the countries to watch out for have two characteristics: they already have high levels of personal debt and have relied substantially on credit as a source of demand in the past five years. Australia, Canada, South Korea, Sweden and Norway are all on his list of candidates to be future debt zombies. But so is China.

In the 25 years leading up to the financial crisis, China developed a hugely successful growth model. There was a mass exodus of people from rural districts to work in newly built factories that – courtesy of low wages and an under-valued currency – were able to flood the west with cheap exports.

But the model relied on consumers in western countries – such as the US – taking on more debt to buy these exports. When the financial crisis of a decade ago ended in a deep recession, demand for Chinese goods suddenly dried up.

With the risk that factory closures and mass unemployment would breed political unrest, the Chinese government replaced the burst western credit bubble with a credit bubble of its own. They ordered banks to lend freely to property developers and backed this up with a massive public infrastructure programme. The banks have $35tn of assets on their balance sheets – a fourfold increase since 2008. China’s private debt as a proportion of the country’s annual economic output (GDP) has increased from 120% to 210% over the same period.

The lesson of 2007 is that all bubbles burst eventually. Alan Greenspan solved the problem of the bursting of the dotcom bubble by creating an even bigger bubble in the US housing market, and the Chinese authorities have done something similar.

Indeed, the structure of the Chinese financial system, with its large shadow banking system and special investment vehicles that take assets off balance sheets, looks eerily like the financial systems in the US and the UK in the years leading up to the crisis.

When China’s Ponzi scheme comes crashing down – as it inevitably will – contagion to the rest of the global financial system will be limited by the fact that the banks are largely state owned and capital controls are still in place. Beijing will do what the west did in 2008 and bail out banks in danger of collapse. Even so, the economic shock to the rest of the world will be immense. Since 2008, China’s credit-driven expansion has accounted for more than half global growth.

One obvious trigger for the pricking of the Chinese credit bubble would be US trade sanctions. When he was a candidate for the White House, Trump pledged to get extremely tough with Beijing, threatening tariffs of up to 40% on Chinese imports into the US.

He has subsequently toned down the rhetoric in the hope that Xi Jinping, China’s president, would pressure Kim over North Korea’s nuclear programme. China’s decision to back harsher UN economic sanctions against Pyongyang suggests there was some merit in this approach.

But Beijing’s insistence last week it would sit on the sidelines in the event of a war between the US and North Korea shows that there are limits to how far China is prepared to go, and this may not be far enough for Trump.

If it becomes clear that China cannot rein Kim in, the US has an array of economic weapons at its disposal. It has made clear that it will slap tariffs on cheap Chinese steel and aluminum, and will punish intellectual property piracy. The US could also brand China a currency manipulator, something Trump ruled out during in his love-in with Xi when they met in Florida in April. Such a move would pave the way for further sanctions and inevitable retaliation from China.

Until recently, it has been hard to see where the next financial crisis comes from. Now it is blindingly clear. Trump is talked down from attacking North Korea but decides that somebody has to pay for his climbdown. China, seen to have shown insufficient support, is the obvious candidate. Economic sanctions are imposed, a trade war erupts and China’s credit bubble bursts. The financial markets have yet to wake up to this possibility. It is probably about time they did.