Why do economic forecasters get things so wrong? It is the season for forecasts about what might happen in the coming year, but why should we believe any of them?

The wisest comment on this comes from the author Tim Harford, who wrote: “Economists have allowed themselves to walk into a trap where we say we can forecast, but no serious economist thinks we can.”

Indeed. I thought of this when looking at the market forecasts at the beginning of last year, when there was serious gloom about the world economy.

The most cited of all of them came from Royal Bank of Scotland in January, when Andrew Roberts, the bank’s research chief for European economics, hit the headlines for this message: “Sell everything except high-quality bonds. This is about return of capital, not return on capital. In a crowded hall, exit doors are small.” He thought that major stock markets might fall by 20 per cent and the oil price could go down to $16 (£12.80) a barrel.

Phillip Hammond announces new government measures designed to protect the economy pre-brexit

He was not alone. At that time Morgan Stanley warned of oil going to $20 a barrel, and Standard Chartered thought it might fall to $10 a barrel. By the summer the “sell everything” club had several huge US investors as members. These included Jeff Gundlach, chief executive of DoubleLine Capital, who said: “The stock markets should be down massively but investors seem to have been hypnotised that nothing can go wrong.”

Stan Druckenmiller, the legendary hedge-fund manager, warned investors in May to “get out of the stock market”. George Soros, the equally legendary investor, was reported by The Wall Street Journal to be making bearish investments in the expectation of markets going down. And Bill Gross, the bond investor, wrote in his monthly letter: “I don’t like bonds. I don’t like most stocks. I don’t like private equity.”

There was indeed a sour mood during the early part of the year, but look where we are now. Sterling has certainly gone down following the Brexit vote, but for the American investors quoted above the dollar has shot up, making their investments even more valuable in global terms.

As for markets, shares everywhere have boomed. The FT100 Index, which was below 6,000 when that RBS note went out, is now back above 7,000. The Brent oil price is $55 a barrel. The Dow Jones is at an all-time high, hovering just below 20,000. And the high-quality bonds we were urged to hold on to? Well, that was a half-right call, in that 10-year gilts yielded 1.8 per cent then and only 1.4 per cent now – as the price moves inversely to the yield you will have made money by holding. But ideally you should have sold in August when the yield dipped to 0.5 per cent.

What has happened? Why was there such widespread concern in the early part of the year and why such relative cheer now? Remember this switch has nothing to do with Brexit, though that has been another classic example of the Harford trap noted above, because so far at least all those dire predictions about the blow to the economy have been utterly wrong. Predictions that a Trump victory would be bad for financial markets seem equally wide of the mark.

The best explanation is a couple of bad things that people expected to occur during the year have not happened, and one good thing has.

The two bad things that didn’t happen were a collapse in demand from China and a further fall in the oil price and commodity prices. As it turned out, China cantered on and Opec got its act together and agreed production curbs. The result is much greater stability in the world economy. And the good thing that has happened has been that the US economy has continued to grow steadily, enabling the Federal Reserve to start getting interest rates back to normal. At the beginning of the year the world economy seemed fragile, supported by ultra-cheap money that was unsustainable. Now it seems more secure.