Recent Posts

Thursday, March 25, 2021

Book Review: Agent-Based Models In Economics: A Toolkit

The book Agent-Based Models in Economics: A Toolkit (Amazon affiliate link) is a collection of articles edited by by Domenico Delli Gatti, Giorgio Fagiolo, Mauro Gallegati, Matteo Richiardi, and Alberto Russo. (I will refer to them as "the editors" in this article...) I picked up this book as it appears aimed at my new interest in agent-based models. 

Given the diversity of the articles within the text, I will not attempt to make this an academic book review, instead being closer to a book review on an online book store: who would be interested in buying this book? The book is somewhat more "literary" in style than I hoped for, but it might be of interest for those who enjoy economic theory controversies.

Kindle Edition -- Formatting Might Be a Concern

Screenshot from Kindle Edition (iPad app)
I bought the Kindle edition of the book, since it was considerably cheaper than the paperback, and I did not want to wait for delivery. I cannot say that I was hugely happy with the formatting. Although some of the component articles are mainly text, some make extensive use of equations.

The Kindle file was formatted as reflowable text. A reflowable text electronic book is effectively a set of web pages that are bound into a single file. Since equation formatting does not have native support (you can do simple ones with subscripts and symbols), the equations are inserted as images. 

In the screenshot to the left. I showed how this shows up on my iPad Kindle app. I changed the background colour so that the images stand out versus it; if the background is white, the boxes around the text are not visible.

The problem is that readers can change the text size so that it is comfortable to read. The equation images, however, do not rescale. In my preferred reading size on the iPad, the equations are small, making them nearly illegible. 

However, I did discover a work-around: there is a free app from Amazon that allows one to read the book on your computer. With the larger screen, you can adjust the font size so that it is similar to the text size. So if one is happy with reading the book on a computer screen, this is acceptable. It is also possible that different devices have better text-to-equation scale ratios. The publisher may have optimised for a particular device, and the iPad app was not looked at.

(The clean solution to this is for the publisher to use the "e-textbook" fixed page format -- roughly speaking, a PDF. A PDF is rendered based on the physical sizes on a (virtual) page, and so one can zoom in/out cleanly. However, fixed format e-books are not supported by all readers, and so publishers are not a fan of them. My book An Introduction to SFC Models With Python is a fixed format book, and I have no intention of repeating that process myself. However, for an academic publisher like the Cambridge University Press, I question their decision to not use the fixed page format for a book like this.)

Book Contents

The book contains 9 articles on various high-level topics that relate to the agent-based methodology. Topics include the following.
  • High level overview, and contrast to neoclassical methods.
  • A discussion of rationality, including a brief alternative summary of the history of macro aggregated models.
  • Agent learning.
  • Empirical validation.
  • Estimation.
The discussions are done at a high level, so the reader can get an overview of the subject. However, the actual models are not fully laid out. If you wanted a grab bag of mathematical specifications of agent-based economic models, this is not the text for you.

This structure is fine for a general reader who is interested in economic theoretical controversies, and is wondering what agent-based models brings to the debate. However, it is not acting as an introductory textbook to the methodology, which is what I personally needed.

Comments on the Discussion

One key difference between agent-based models and aggregated models is that they impose a notion of "local geography." Aggregated macro models might feature countries or even regions, but those countries/regions are essentially treated as a geographical point in space. Agent-based models impose a logical grid on the model, and agents are located in a grid location. This grid should not be viewed as a physical location in space, since some of them correspond to surfaces like a torus. (Unless of course, one lives on a doughnut, in which case this is perfectly fine.) Agents interact with other agents only within some "neighbourhood" of their own location. 

Another topic that comes up is the observation that neoclassical models rely heavily on centralisation of markets. Agent behaviour is coordinated as the result of them reacting to prices in central markets. This is what allows neoclassicals to hope that they can replace an entire sector of the economy of a small number of representative agents. Agent-based models that do not feature central markets allow far greater dispersion of behaviour.

This topic is currently of most importance to my own work on agent-based models. I want to build a hybrid macro model: individual firms, but with central markets and an aggregated household sector (and government). How does such a model relate to a stock-flow consistent model that works solely with aggregates? (No, I cannot answer that question at the time of writing. I am still working on finishing translating the "Monetary Monopoly Model" to an gent-based version. I could then look at how the resulting model relates to a purely aggregated version.)

Concluding Remarks

The book provides a conceptual overview of agent-based models, but one needs to dig elsewhere to get an overview of model specifications.

(c) Brian Romanchuk 2021


  1. I wrote a Python agent based model based upon a mainstream paper last year. It used the Mesa framework.

    Code and references here:

    The issues I ran across translating the paper into code are here:

    If you want somebody to check over you code, drop me a note. Happy to help if I can.


    1. Thanks. I looked at Mesa, but I’m developing a wackier framework that will better support realtime and client-server. (Yes, I want to build a hobby video game.) I can embed Mesa into my framework, and vice-versa, with just a little extra effort.

      For my purposes, I needed a “continuous time” event queue, which requires new code. I’m trying to implement the MMT “Monetary Monopoly Model”, although I have been distracted with some mathematics.

  2. This comment has been removed by a blog administrator.


Note: Posts are manually moderated, with a varying delay. Some disappear.

The comment section here is largely dead. My Substack or Twitter are better places to have a conversation.

Given that this is largely a backup way to reach me, I am going to reject posts that annoy me. Please post lengthy essays elsewhere.