Recent Posts

Monday, May 17, 2021

Status Update On My Agent-Based Model Dabbling

I have had a bit more time to work on my Python agent-based model project. As I discussed earlier, I am migrating the discussion of my open source projects to a new Patreon. As I have noted repeatedly, a consulting project has slowed me down, so progress on that front has been slow. I just want to give a bit of a summary of how things are going, from the perspective of someone who is interested in the modelling, but not the coding bits.

(At this point, I am not entirely sure how much of this article appeared in earlier ones.)

Editorial Aside: Mailing List

I started researching the replacement for the mailing list. It wasn't clear to me which was the best option. I still have until July to find a replacement, and I expect that I will make a decision within two weeks.

However, given that the existing mailing list was swamped with what appear to be bogus accounts (as well as not wanting to run afoul of Canadian spam email regulations), I am not going to automatically transfer existing addresses. People will need to opt in to the new list -- however that is done. 

I will have a few posts announcing the switch...

Objective: Hybrid SFC/Agent-Based Model

My objective is to create a hybrid between a stock-flow consistent model and an agent-based model; a SFCAB Model as it were. To be perfectly clear, I have no attempted to see whether this has been done before. I intend to dig further into agent-based modelling techniques, but that will wait until I have more time to read. For now, I have some peculiar requirements which mean that I am interested in get at least a basic framework of my own.

The model will feature interactions between two types of entities.
  1. Agents that make decisions at an extremely high frequency -- can be thought of as being close to continuous time, although events will happen at discrete points in time (as is the case for equity market trading). They will generally interact through a "market" framework, although we could allow some entities to directly interact with "nearby" entities (as that term is understood in agent-based models). These will generally be business units of private firms. We can see what happens to the limiting behaviour as we increase the number of agents.
  2. Aggregated entities that stand in for a sector of the economy, or possibly sub-sectors. (Certain of these entities are closer to agents, such as the central bank.) Since they are aggregates, there is no notion of increasing their number to determine limiting behaviour. Generally speaking, the aggregates operate on a much slower frequency than the agents, although they may have their market orders broken up into small chunks.
This structure makes it possible to directly integrate high frequency (financial) market activity with slower-moving economic trends.

How Far Is My Modelling Along?

My plan is to create a version of what I call the Monetary Monopoly Model -- a core Modern Monetary Theory model I describe in my latest book -- Modern Monetary Theory and the Recovery. The planned model will demonstrate the operation of a Job Guarantee in an economy that consists of two regions that share a currency.

The underlying structure of the model is almost in place, but I reached the stage where I need to see how the market transactions are developing.

The boring way to do this would be to dump all the data into log files, and trace through to see whether transactions happen according to plan.

The fun way to do this is to create an agent that can interact with the simulation, and see how prices and data evolve. In fact, such a capability turns the software into something resembling a space trading video game. Since puttering around with home-made video games is one of my hobbies, this is exactly what I intend to do. 

(The reasoning is straightforward: I doubt that a book about the software would be worthwhile commercially. If I get an influx of Patreon clients, I would pay corresponding attention to the project. However, if I have a modest number of clients -- which seems likely -- it is important that the project is structured in a way that I am interested in developing it.)

Right now, the software does not do much. I hit one of the most difficult parts of the software structure just as this consulting project hit, but I am now starting to plug away again. For those readers with an interest in software, the issue is that I have a client-server architecture within the package, and I now need to clean up the protocol of passing information from the server to the client so that it can display it. Once that is done, I would then be able to poke around the model innards when it is running, allowing me to tune the behaviour of the agents.

Since I am juggling a few projects right now, no promises on a delivery date.

(c) Brian Romanchuk 2021


  1. "The planned model will demonstrate the operation of a Job Guarantee in an economy that consists of two regions that share a currency."

    Here is a link to my idea of two regions with different ontologies of money:

    If you followed my reasoning, I think you would find that the details of the JG program would drive the reactions.

  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.