What agent-based modelling is
An agent-based model (ABM) represents a system as a population of autonomous agents, such as households, firms, banks or farmers, each following rules about what to do given what it observes. The agents interact with one another and with their environment, and aggregate outcomes such as prices, inequality or market crashes emerge from those interactions rather than being imposed (Macal, 2016). The idea of an agent as an autonomous, interacting decision-maker is shared with computer science (Wooldridge & Jennings, 1995).
This makes ABM attractive in economics when heterogeneity, networks, learning or out-of-equilibrium dynamics matter, and when agents depart from full rationality in the ways behavioural economics documents (Kahneman & Tversky, 1979). Social scientists have used the same approach to study phenomena from segregation to the spread of norms (Jackson et al., 2017). The trade-off is that results come from simulation rather than closed-form solutions, so the credibility of the model depends on careful design, calibration and testing.
From cellular automata to economics
Agent-based modelling grew out of work on cellular automata, grids of cells whose states change according to simple local rules. John von Neumann used them in the late 1940s and 1950s to study self-reproduction. John Conway's Game of Life, published in 1970, showed how complex patterns can arise from very simple rules. In the 1980s Tommaso Toffoli and Stephen Wolfram, the latter working at the Institute for Advanced Study and then the University of Illinois, studied cellular automata systematically. Cellular automata are still used in applied work, for example to model urban growth (Saganeiti et al., 2021).
Agent-based models differ from cellular automata because agents can move, hold memories and follow heterogeneous rules. Thomas Schelling's segregation model of 1971 is an early economic example. The Santa Fe Institute, founded in 1984, began work on the economy as a complex adaptive system in the late 1980s, and agent-based computational economics developed from the 1990s. Today ABM is widely used for financial markets, macroeconomic policy experiments, housing, energy and environmental economics, alongside, not instead of, equilibrium and econometric models.
Three kinds of model
Economists use agent-based models in three ways. Choosing among them is the first design decision in a thesis, because it determines what counts as validation.
| Approach | Purpose | Agents | How it is judged |
|---|---|---|---|
| Theoretical (deductive) | Explore the consequences of assumptions, often extending a known model | Few types, rules derived from theory | Internal consistency and insight into mechanisms |
| Exploratory (generative) | Show whether a set of plausible micro-rules can generate a macro pattern | Heterogeneous, boundedly rational | Plausibility of rules and ability to generate the target pattern |
| Empirically calibrated (phenomenological) | Reproduce observed statistical regularities and run policy experiments | Parameters estimated or calibrated from data | Fit to several stylised facts not used in calibration |
A doctoral thesis can combine these uses, for example by starting with a simple theoretical version to understand the mechanism and then adding data to calibrate it. What matters is to say which claim each version supports. A theoretical model can show that a mechanism is possible; only a calibrated and validated model can support statements about the size of an effect in a real economy.
Recent applications
Three applied studies from 2021 illustrate the method. They come from agricultural, water and transport economics rather than core macroeconomics, which reflects how widely the method is used in applied fields where farmers, firms or households make interdependent decisions.
| Study | Problem | Model | Tool | Contribution |
|---|---|---|---|---|
| Xie et al. (2021) | Potential for dry-season small-scale irrigation investment in sub-Saharan Africa | Agent-based model applied to Ethiopia under biophysical and economic constraints | Suitability analysis coupled with SWAT and SPAM data | Mapped where irrigation is feasible while limiting environmental impact |
| Ghoreishi et al. (2021) | Farmers' water conservation and basin water demand under drought | Agent-based agricultural water demand (ABAD) model, Bow River Basin, Canada | NetLogo | Showed rebound effects relevant to water policy |
| Serrano-Hernandez et al. (2021) | Urban e-grocery distribution in Pamplona, Spain | Agent-based simulation with horizontal cooperation scenarios | Not stated | Cooperation between distributors improved cost and service |
Each study shows a pattern worth copying: a clearly bounded problem, agents whose decisions matter for the outcome, and data used to set the environment (Xie et al., 2021; Ghoreishi et al., 2021; Serrano-Hernandez et al., 2021).
Calibration, validation and sensitivity analysis
Calibration means choosing parameter values so that the model is consistent with data. Some parameters can be taken from surveys or the literature (for example household size or discount rates); others are tuned so that the model reproduces selected aggregate statistics. Record which parameters were set in which way.
Validation asks whether the model is credible for its purpose. For an empirically calibrated model, test it against patterns that were not used in calibration, such as the shape of a firm-size distribution, volatility clustering in returns or the timing of adoption. Matching several independent patterns is stronger evidence than matching one. For exploratory models, show that the rules are plausible and that the result does not depend on arbitrary choices.
Because outcomes depend on many parameters and on randomness, run each scenario many times with different random seeds and report distributions, not single runs. Then use sensitivity analysis to show which parameters drive the results; global methods vary all parameters together rather than one at a time (Saltelli et al., 2008).
Tools, documentation and reproducibility
NetLogo is widely used for teaching and for models of moderate size, as in the water study above. Mesa (Python) and Repast (Java and Python) suit larger models and integration with data analysis, and some researchers write models directly in Python, Julia or C++ for speed. Choose a tool your supervisor or collaborators can read.
Document the model so that someone else could rebuild it. The ODD protocol (Overview, Design concepts, Details) is a widely used standard for describing agent-based models. Share code, parameter files and random seeds, and follow general rules for reproducible computational research (Sandve et al., 2013; Peng, 2011).
Designing the model step by step
- State the question. Write the outcome you want to explain or the policy you want to test, and why an agent-based approach is needed rather than an existing equilibrium or econometric model.
- Define agents and environment. List agent types, their attributes and the spatial or network structure through which they interact. Leave out anything that does not affect the question.
- Specify decision rules. Ground each rule in theory, behavioural evidence or survey data, and note where you have had to assume.
- Set the schedule. Decide the order in which agents act in each time step, because the order can change results.
- Implement and verify. Test that the code does what the description says, for example with simple cases whose outcome you can predict.
- Calibrate, validate and analyse. Follow the steps in the previous section, then run the experiments that answer your question.
| Element | What to report in the thesis |
|---|---|
| Purpose | Question, type of model and why ABM is appropriate |
| Agents and rules | Attributes, decision rules and their sources |
| Data and calibration | Data sources, calibrated parameters and target statistics |
| Validation | Patterns used for validation that were not used in calibration |
| Experiments | Scenarios, number of runs, random seeds and summary statistics |
| Sensitivity | Method and the parameters that matter most |
| Code | Language, version and where code and data are archived |
Worked example (illustrative)
A hypothetical PhD asks how mortgage lending limits affect house price cycles. The researcher builds an empirically calibrated model with household agents (who differ in income, wealth and expectations), banks and a housing market. Income and wealth distributions come from a household survey; the share of households forming expectations by extrapolating recent price growth is calibrated so that the model matches the observed volatility of house prices. Validation uses patterns not targeted in calibration: the relationship between credit growth and price growth, and the distribution of loan-to-income ratios. Each policy scenario is run 200 times, and a global sensitivity analysis (Saltelli et al., 2008) shows that results depend most on the expectations parameter, which the thesis discusses as a limitation. The model is described using ODD and the code is archived with the thesis.
Common mistakes
- Building a detailed model before stating the question it should answer.
- Reporting a single simulation run as the result.
- Calibrating and validating against the same statistics.
- Varying parameters one at a time and missing interactions.
- Leaving the model undocumented, so that examiners cannot check it.
- Claiming that ABM is superior to equilibrium models in general rather than for a specific question.
For related reading, see economic data analysis in South Africa and optimisation algorithms in research.
Key takeaways
- Agent-based models generate aggregate outcomes from interacting, heterogeneous agents (Macal, 2016; Jackson et al., 2017).
- Choose a theoretical, exploratory or empirically calibrated model to match your question, because each is validated differently.
- Calibrate and validate against different patterns, and report results across many runs.
- Use global sensitivity analysis to show which assumptions drive your conclusions (Saltelli et al., 2008).
- Document the model and share code so that it can be reproduced (Sandve et al., 2013; Peng, 2011).
