sfctools – A toolbox for stock-flow consistent, agent-based models

A new Python package has been released. The package is an open-source toolbox and touches both stock-flow consistent and agent-based modeling aspects. It also contains a graphical user interface.

Repository: https://gitlab.com/dlr-ve/esy/sfctools/framework

Installation via Pypi: https://pypi.org/project/sfctools/

Documentation: https://sfctools-framework.readthedocs.io/en/latest/

Paper: https://joss.theoj.org/papers/10.21105/joss.04980

Author: Thomas Baldauf, German Aerospace Center

A Prototype Regional Stock-Flow Consistent Model

Our new Zezza&Zezza paper “A Prototype Regional Stock-Flow Consistent Model” has come out as a Levy Institute Working Paper

We set up a three-region SFC model with labor mobility, to explore the implications of regional imbalances. Loosely calibrating the model on Italian North-South data, the model shows that the dependency of a poorer Southern region from imports will imply labor migration, as well as transfers of ownership of Southern real and financial assets to the other region. The model shows that, absent targeted policies, there is no automatic tendency to convergence in real income across regions.
Eviews code available here: https://gennaro.zezza.it/software/eviews/2022levywp.prg

Authors:
Francesco Zezza, Sapienza Università di Roma, Italy, and Levy Economics Institute of Bard College
Gennaro Zezza, Università degli Studi di Cassino e del Lazio Meridionale, Italy, and Levy Economics Institute of Bard College

Abstract
Starting from the seminal works of Wynne Godley (1999; Godley and Lavoie 2005, 2007a, 2007b), the literature adopting stock-flow consistent (SFC) models for two or more countries has been flourishing, showing that consistently taking into account real and financial markets of two open economies will generate different results with respect to more traditional open economy models. However, few contributions, if any, have modeled two regions in the same country, and our paper aims at filling this gap. When considering a regional context, most of the adjustment mechanisms at work in open economy models—such as exchange rate movements, or changes in interest on public debt—are simply not present, as they are in control of “external” authorities. So, what are the adjustment mechanisms at work?

To answer this question, we adapt the framework suggested in Godley and Lavoie (2007a) to consider two regions that share the same monetary, fiscal, and exchange rate policies. We loosely calibrate our model to Italian data, where the South (Mezzogiorno) has both a lower level of real income per capita and a lower growth rate than the North. We also introduce a fragmented labor market, as discouraged workers in the South will move North in hopes of finding commuting jobs.

Our model replicates some key features of the Italian economy and sheds light on the interactions between financial and real markets in regional economies with “current account” imbalances.

Monetary economics: R code

I have received from Hamid Raza, working with Stephen Kinsella in Limerick, a package containing models from Godley & Lavoie Monetary economics, chapters 3 to 9.
They have been published in the model section of the website.
(I have not checked the code yet…)

I deeply thank Hamid, since R is a free software, and the availability of R code will be of great help to anyone who is not willing to purchase a software licence.

SFC models in Python

Here is a letter from Kenn Tamara, who developed the models in Godley-Lavoie using Python:

I was reading “Monetary Economics” by Godley and Lavoie and came across the sfc-models.net website. I have taken your eViews models and reimplemented them using Python (running the experiments and generating the figures).

Everything is open-source and is written with a package that I developed to help specify and solve the models. The models are implemented as iPython notebooks for easier viewing and can be found at:
https://github.com/kennt/monetary-economics

Information on the pysolve package used to specify and solve the models can be found at:
https://github.com/kennt/pylinsolve

(A little warning, the code for pysolve is still under development and there isn’t that much documentation yet)

I hope that the python implementation is useful and would like to contribute it to sfc-models.net.

Thank you,
Kenn Takara

Interactive SFC models

I recently discovered that Kevin W. Capehart has written a piece of code in Mathematica from one of my Eviews files for the Godley – Lavoie Monetary economics book, and turned it into a CDF, to illustrate the paradox of thrift

To run the simulation you need to install the free Wolfram reader, and activate it.

This little tool is potentially very useful in exploring stock-flow models, which are tipically non linear, and therefore difficult to solve analitically. Creating a nice interface which allows the user to check model responses to different values of parameters and exogenous variables could help find the range of parameter values for which the model is producing stable (or unstable etc) solutions.