Jump to content

  • Log In with Google      Sign In   
  • Create Account

Agent-based economic modelling

Posted by polyfrag, 18 July 2014 · 899 views

I don't know whether I'm more interested in economic modelling or making games. I tried to start on an article of my economic model.


In recent years, agent-based economic modeling has been getting more attention in popular journals.
In an August 2009 opinion article in Nature journal titled, "The economy needs agent-based modelling" says, "In today's high-tech age, one naturally assumes that US President Barak Obama's economic team and its international counterparts are using sophisticated quantitative computer models to guide us out of the current economic crisis. They are not."
"The best models they have are of two types, both with fatal flaws. Type on is econometric: empirical statistical models that are fit to past data. These successfully forecast a few quarters ahead as long as things stay more or less the same, but fail in the face of great change. Type two goes by the name of 'dynamic stochastic general equilibrium'. These models assume a perfect world, and by their very nature rule out crises of the type we are experiencing now."
"[...] There is a better way: agent-based models. An agent-based model is a computerized simulation of a number of decision-makers (agents) and institutions, which interact through prescribed rules. The agents can be as diverse as needed - from consumers to policy-makers and Wall Street professionals - and the institutional structure can include everything from banks to the government. Such models do not rely on the assumption that the economy will move towards a predetermined equilibrium state,
as other models do. Instead, at any given time, each agent acts according to its current situation, the state of the world around it, and the rules governing its behaviour. An individual consumer, for example, might decide whether to save or spend based on the rate of inflation, his or her current optimism about the future, and behavioural rules deduced from psychology experiments. The computer keeps track of the many agent interactions, to see what happens over time. Agent-based simulations can handle
a far wider range of nonlinear behaviour than conventional equilibrium models. Policy-makers can thus simulate an artificial economy under different polcy scenarios and quantitatively explore their consequences."

A July 22nd, 2010 article in The Economist titled "Agents of change: conventional economic models failed to foresee the financial crisis. Could agent-based modelling do better?" it reads, "Agent-based modelling does not assume that the economy can achieve a settled equilibrium. [...] ABMs, in contrast, make no assumptions about the existence of efficient markets or general equilibrium. The markets that they generate are more like a turbulent river or the weather system, subject to constant storms and seizures of all sizes. Big fluctuations and even crashes are an inherent feature. That is because ABMs contain feedback mechanisms that can amplify small effects, such as the herding and panic that generate bubbles and crashes. In mathematical terms the models are “non-linear”, meaning that effects need not be proportional to their causes."

And a January 19th, 2013 article in The Economist titled "New model army: Efforts are under way to improve macroeconomic models" reads, “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 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”.

Agent-based modelling has only become possible thanks to computers, and that is why I believe there is room for innovation and why we may see agent-based models replace our current models in the future. Is it possible for a simulated economy to achieve balance without the intervention of social forces? That is one of the efforts being carried out by this author. The author proposes a certain non-equilibrium agent-based model that does not rely on any complex "behaviour" of agents, which he sees as a potential area of failure of agent-based models. This agent-based model, not relying on supply and demand curves, instead focuses on what those curves arise out of, which is agents trying to maximize utility at the least cost. This can serve as a microfoundation for economics, and can be likened to the relation between quantum physics and chemistry. As said, the agents do not require any psychological behaviour. Instead, the agents act in the most rational and logical way in their own interests.

In the case of the agents representing the households or common people, referred to as 'labourers', there are three interests (but these can be easily expanded), which are housing, food, and electricity. Rather than focusing on the wide assortment of consumer products and services available, the model makes a generalization. The labourers make a choice between any of the available outlets based on a score, which is inversely proportional to the price at that outlet and the distance from the labourer's current location. This, the author believes, is all that's necessary to create the complex emergent behaviour of markets. This rule is also applied to the search for work, where the score is proportional to the pay over the distance. The behaviour of the firms is more complex though, as they must adjust prices, wages, production targets, and embark on new business ventures, which requires a more thorough, but deterministic, evaluation of the state of the simulation world. The firms are expected to gouge prices and do everything within their self-interest. If the time spent travelling to a place of work or to a shop can be expressed in terms of money or food, then the 'score' can be turned into a maximization problem and will indeed give the most rational, logical behaviour for labourers.

The simulation takes place in real-time and all agents and property are situated on a 2-dimensional grid. I believe the aspect of spatiality is essential to an economic model as a determinant in the propensity of different situated entities to do business with each other. A person, given two equally good restaurants, will prefer to go to the one that is a block away rather than half-way across the city. This does not always hold true, but we can definitely say some distant restaurants, say in another city, are totally out of the question when it comes to making a decision. This principle is fundamental and is in effect everywhere in an economy as transportation, fuel costs, and time factor into the efficiency of economic transactions.

The labourers have a cycle with three phases: working, resting, and shopping. They have a certain number of labour points that they can spend on work to get money. Labour is an ingredient in all economic processes and is needed to turn a certain set of raw inputs into an output using capital owned by firms. After the labour is used up, the workers must spend a proportionate amount of time resting at housing to regenerate their labour points. They must also consume food at a certain rate in order to survive and perhaps reproduce. The spending by the labourers and the wages paid to them for work create a closed loop of money flow. Physical resources like minerals, coal, farm products, and wholesale fuel must be transported by trucks to where they are processed and refined into end-products. This involves labour and paying wages too. In addition, transportation consumes retail fuel, giving more dimension to the spatial aspect of the model.

In the future I hope to work banks, states, different currencies and foreign exchange, and private housing and transportation into my model, with taxes and loans and credit cards. Labourers will use some logical heuristic to determine when it's worth buying a home or a car, and this will have tangible effects on the simulation.

The AI of the firms relies on several iterations of a 'demand tree' data structure. The demand tree traces all the required capital and resources necessary to sustain the population of labourers. The first iteration is general and shared between the firms, and only indicates what 'buildings' or capital are necessary to meet a production requirement. The second iteration involves finding economic opportunities for competition with existing businesses using an inverse utility function. For each demander (which may be a labourer or another building in the case of inter-industry trade), a utility score is assigned to the preferred supplier(s). Given this score, a matching or better score is required for a competing supplier to be preferred. The score depends on the price and distance, and entering some value for either of these, the maximum tolerable value for the other can be found. For example, given a revenue target, a maximum distance can be obtained necessary for the required price level, that would still result in the supplier being preferred by a particular demander over its competitor. Or, given a certain location, the maximum allowable price can be obtained that would result in the supplier being preferred over its competitor. Intersecting the maximum radii of all the demanders, areas or pockets of profitable opportunities can be obtained for starting new businesses. Further iterations of the demand tree may be specific to firms and may involve branching and construction of several demand trees to explore and compare different possible decisions.


In considering whether I was really thinking of the inverse demand function when I was talking of an inverse utility, I came to an interesting thought.

The demand function graphs the quantity that will be bought at a given price. My utility function graphs the score of a given supplier at given price (and perhaps distance). Now, given that a score is lower, consumers are more likely to buy from a different supplier. There's no way to find out what shape the demand curve will be exactly, but it makes sense in my simulation that other suppliers or substitutes will be preferred and a demand function can be constructed out of this information.

This made me think I struck at something that supply and demand graphs arise out of.

May 2016 »

12 3 4567

Recent Entries