THE models that dismal scientists use to represent the way the economy works are sometimes found wanting. The Depression of the 1930s and the “stagflation” of the 1970s both forced rethinks. The financial crisis has sparked another.

The crisis showed that the standard macroeconomic models used by central bankers and other policymakers, which go by the catchy name of “dynamic stochastic general equilibrium” (DSGE) models, neither represent the financial system accurately nor allow for the booms and busts observed in the real world. A number of academics are trying to fix these failings.

Their first task is to put banks into the models. Today’s mainstream macro models contain a small number of “representative agents”, such as a household, a non-financial business and the government, but no banks. They were omitted because macroeconomists thought of them as a simple “veil” between savers and borrowers, rather than profit-seeking firms that make loans opportunistically and may themselves affect the economy.

This perspective has changed, to put it mildly. Hyun Song Shin of Princeton University has shown that banks’ internal risk models make them take more and more risk as asset prices rise, for instance. Yale’s John Geanakoplos has long argued that small changes in the willingness of creditors to lend against a given asset can have large effects on that asset’s price. Easy lending terms allow speculators with little cash to bid up prices far above their fundamental value. If lenders become more conservative, these marginal buyers are forced out of the market, causing prices to tumble.

Realistically representing the financial sector would help solve the other big problem with mainstream macro models: that they are inherently stable unless disturbed from the outside. This feature is helpful when studying how an economy in “equilibrium” responds to things like a spike in the price of petrol, but it limits economists’ understanding of why economies expand and contract in the absence of such external shocks. Highly leveraged financial firms with portfolios of risky assets are bound to upend an economy every so often. Having banks in models would generate shocks from within the system.

The world’s big central banks are interested in these new ideas, although staff economists are reluctant to abandon existing “industry-standard” models. If any central bank is likely to experiment, however, it is the European Central Bank, thanks to its “two-pillar approach” to assessing the risks of price stability. The ECB pays as much attention to “monetary analysis”, which includes things like bank lending and money creation, as to “economic analysis”, which is more concerned with things like inflation and joblessness.

Improving DSGE models is the obvious way to take the lessons of the crisis on board. But others exist too. “Agent-based modelling” tries to depict the transactions that might occur in an actual economy. These models are populated by millions of agents that gradually alter the economy as they interact with each other. The idea was developed in the 1990s when biologists wanted to study the behaviour of ant colonies and the flocking of birds. But modelling an entire economy did not become practical until recently because of the sheer number of calculations needed.

The evolutionary structure of agent-based models allows economists to study how bubbles and crises occur over time. For example, an increase in bank lending means more spending and therefore higher returns on existing investment, which in turn encourages further lending. But too much lending can prompt the central bank to raise rates if inflation starts to accelerate. Higher borrowing costs could lead to a wave of defaults and even to a crisis if too much debt was taken on during the boom.

The EURACE project, an initiative by a consortium of European research bodies, has produced a sophisticated agent-based model of the EU’s economy that scholars have used to model everything from labour-market liberalisation to the effects of quantitative easing. In Australia Steve Keen, an economist, and Russell Standish, a computational scientist, are developing a software package that would allow anyone to create and play with models of the economy that incorporate some of these new ideas. Called “Minsky”—after Hyman Minsky, an American economist celebrated for his work on boom-and-bust financial cycles—it places the banking system at the centre of the economy.

A long road lies ahead, however. “Nobody has got something so convincing that the mainstream has to put up its hands and surrender,” says Paul Ormerod, a British economist. No model yet produces the frequent small recessions, punctuated by rare depressions, seen in reality. But “ultimately,” Mr Shin says, “macro is an empirical subject.” It cannot forever remain “impervious to the facts”.