Not surprisingly, the atmosphere at this year's World Economic Forum was grim.

Those who think that globalisation, technology, and the market economy will solve the world's problems seemed subdued. Most chastened of all were the bankers. Against the backdrop of the sub-prime crisis, the disasters at many financial institutions, and the weakening of the stock market, these "masters of the universe" seemed less omniscient than they did a short while ago. And it was not just the bankers who were in the Davos doghouse this year, but also their regulators - the central bankers.

Anyone who goes to international conferences is used to hearing Americans lecture everyone else about transparency. There was still some of that at Davos. I heard the usual suspects - including a former treasury secretary who had been particularly vociferous in such admonishments during the East Asia crisis - bang on about the need for transparency at sovereign wealth funds (though not at American or European hedge funds).

But this time, developing countries could not resist commenting on the hypocrisy of it all. There was even a touch of schadenfreude in the air about the problems the United States is having right now - though it was moderated, of course, by worries about the downturn's impact on their own economies.

Had the US really told others to bring in US banks to teach them about how to run their business? Had the US really boasted about its superior risk management systems, going so far as to develop a new regulatory system (called Basle II)? Basle II is dead - at least until memories of this disaster fade.

Bankers - and the rating agencies - believed in financial alchemy. They thought that financial innovations could somehow turn bad mortgages into good securities, meriting AAA ratings. But one lesson of modern finance theory is that, in well functioning financial markets, repackaging risks should not make much difference. If we know the price of cream and the price of skim milk, we can figure out the price of milk with 1 per cent cream, 2 per cent cream, or 4 per cent cream. There might be some money in repackaging, but not the billions that banks made by slicing and dicing sub-prime mortgages into packages whose value was much greater than their contents.

It seemed too good to be true - and it was. Worse, banks failed to understand the first principle of risk management: diversification only works when risks are not correlated, and macro-shocks affect the probability of default for all mortgages.

I argued at Davos that central bankers also got it wrong by misjudging the threat of a downturn and failing to provide sufficient regulation. They waited too long to take action. Because it normally takes a year or more for the full effects of monetary policy to be felt, central banks need to act pre-emptively, not reactively.

Worse, the US Federal Reserve and its previous chairman, Alan Greenspan, may have helped create the problem, encouraging households to take on risky variable-rate mortgages by reassuring those who worried about a housing bubble that there was at most a little "froth" in the market. Normally, a Davos audience would rally to the support of the central bankers. This time, a vote at the end of the session supported my view by a margin of three to one. Even the plea of one of central banker that "no one could have predicted the problems" moved few in the audience - perhaps because several people sitting there had, like me, explicitly warned about the impending problem in previous years. The only thing we got wrong was how bad banks' lending practices were, how non-transparent banks really were, and how inadequate their risk management systems were.

It was interesting to see the different cultural attitudes to the crisis on display. In Japan, the CEO of a major bank would have apologised to his employees and his country, and would have refused his pension and bonus so that those who suffered as a result of corporate failures could share the money. He would have resigned. In the US the only questions are whether a board will force a CEO to leave and, if so, how big his severance package will be. When I asked one CEO whether there was any discussion of returning their bonuses, the response was not just no, but an aggressive defence of the bonus system.

This is the third US crisis in the past 20 years, after the Savings & Loan crisis of 1989 and the Enron/WorldCom crisis in 2002. Deregulation has not worked. Unfettered markets may produce big bonuses for CEO's, but they do not lead, as if by an invisible hand, to societal well-being. Until we achieve a better balance between markets and government, the world will continue to pay a high price.

Joseph E Stiglitz won the Nobel Prize in 2001 for his work on the economics of information.