What keeps the chancellor awake at night?

Chancellor of the Exchequer Philip Hammond in Downing Street Image copyright EPA

If you're the chancellor of the exchequer, worrying about where the next financial crisis might come from, what might be keeping you awake at night?

Andy Wess used to run a chain of tyre shops, breakdown vans and an import-export business in Lancashire, but then came the credit crunch.

"Personally, I lost everything," he told me. "I had no house, that's gone. It was so bad, I got to the stage I was praying I wouldn't wake up in the morning."

Although the credit crunch felt like a sudden tsunami, actually it took a year for the crisis to come to a head. Governments, central banks and chancellors had the time to coordinate policies, bail out banks and print money - and still it was a disaster for Andy Wess and millions like him.

But since then, the world's financial markets have become ever more complicated, sophisticated and fast.

'Flash crash' risk

Humans have been replaced by computers and ultra-fast networks that are altering the way the markets work.

Image caption Andy Wess says he "lost everything" after being caught up in the 2008 credit crunch

"This is the speed race that they're all now locked in," says Scott Patterson, a reporter for the Wall Street Journal.

"I've met physicists whose entire job is to shave off one millisecond from their firm's trading. That's a 1,000th of a second." To put that in context, it takes 400 milliseconds to blink your eye.

Everything from shares and currencies to oil and precious metals are traded ever faster by computers designed to spot and exploit the smallest differences and movements in price.

The computers are also programmed to make decisions themselves, about when to buy or sell, meaning a problem could quickly spread from one market to another.

This could, in turn, spark a "flash crash", with stock markets, and possibly currencies, plummeting as computers unleash a spiral of rapid automated selling.

It sounds like the start of a Terminator movie, the machines destroying whole economies in seconds as humans desperately try to take back control.

Suddenly the chancellor wakes up screaming, in a cold sweat.

But then he remembers the banks are far stronger than they were 10 years ago, and he relaxes back into the pillows and falls asleep again.

But the trouble is the next nightmare may not be about banks but other institutions entirely. And to find them, I went for a drive with Andy Wess in his new Mazda 6.

Dangerous bubble?

Like millions of other people these days, he doesn't own the car. "It's a contract purchase," he told me. "Each month I pay for the use of it, and then at the end of the contract I have the option to pay it off and keep the car, or just hand it back."

But the companies lending the money for these deals aren't banks: they're car companies or other financial institutions lending money. Like credit card providers or payday loans companies, they are called shadow banks.

They look like a bank, lend like a bank but are not regulated like a bank, and Andy and millions like him use them all the time.

The concern is, though, that by pumping credit into the economy, especially from riskier lenders to riskier customers, they could create a dangerous credit bubble.

The level of risk associated with shadow banks might keep the chancellor awake at night.

And he doesn't just have to worry about those in the UK. They are also big in America and especially China.

Image copyright Getty Images
Image caption Should the amount of debt in the Chinese economy be a cause for concern?

And the state of the Chinese economy is one that concerns Tamim Bayoumi, the author of Unfinished Business, a book about the origins of the financial crisis.

"I do think it is a major concern in China," he says. "The financial system in China is going through rapid changes and has had a very rapid increase in credit, which is a classic sign of a bubble."

And bubbles - as we all know - eventually burst.

But new ultra-fast trading systems and shadow banks aren't the only problems.

The Financial Conduct Authority is the UK watchdog, and its head, Andrew Bailey, is worried about a cyber-attack on the world's financial system.

Nightmare scenario

"The risk of attack from hostile parties [and] the risk of getting into financial systems… have increased," he says.

Tamim Bayoumi agrees. "If you could, for example, mess up payments between institutions so all of a sudden I don't know whether you owe me money or not, you can imagine the consequences," he says.

"The entire financial system could grind to a halt very, very fast."

Image copyright Getty Images
Image caption Banks and other financial institutions constantly face the threat of cyber-attack

So what is the ultimate nightmare scenario that might be keeping the chancellor awake at night?

It could start in China with a dramatic slowdown in growth, collapsing property values and a shadow banking system that implodes.

Within seconds, the new high-frequency trading systems begin a serious sell-off and investors find their shares and savings have collapsed in value before they can do anything about selling them.

And then at the worst possible moment, a state-sponsored cyber-attack stops billions and billions of pounds worth of bank transfers and financial transactions.

Faith in the world's financial system collapses overnight.

It's not just that everything is interconnected, but that those connections work at ever increasing speeds: the next credit crunch might not take years, months, weeks, days or even hours to develop.

It could happen quicker than the blink of an eye.

Jonty Bloom's report What Keeps the Chancellor Awake? is on In Business on BBC Radio 4 at 20:30 on Thursday 30 November, You can listen online afterwards via BBC iPlayer or download the programme podcast.

More on this story