Posts tagged “python”


A simple model of boom and bust
How private sector spending behaviours drive the economy and government budget

In the last two posts we developed simple models of how government money circulates in the economy. In this post, we'll experiment with some of the behaviours encoded in these models in order to elucidate some of the ways in which the government and private sector interact with one another.

In the first model we assumed that the private sector saved a constant fraction of their income. This resulted in a stable aggregate income level and ever-increasing saved wealth. It also meant that the government - which is the monetary authority - had to constantly add money into the economy to counteract this "leakage" of money into savings. As such, the government had a permanent budget deficit and the size of the government "debt" was ever increasing through time, mirroring the private savings.

In the second model we added the ability of the private sector to spend out of their saved wealth. This resulted in larger aggregate incomes and a stabilised level of saved wealth, interpreted to represent the private sector's wealth target. By implication, the government ended up with a balanced budget position and a stable level of debt.

Here, we're going to retain the final form of the model and simply adjust some of the input parameters - specifically, the propensity to spend out of income (\(\alpha_Y\)). First we'll decrease the propensity to spend out of income and then we'll increase it again. This effectively represents a variation in the spending and saving behaviours of the population. We could also adjust the propensity to spend out of savings (\(\alpha_H\)) but we'll stick to just varying \(\alpha_Y\) for the sake of simplicity.

Read More ›

A model economy with government money and private wealth target
A self-limiting private sector and a stabilizing economy

This post will describe another complete - but simple - model economy. It follows directly from the previous model and introduces one fairly simple innovation. In the last model the private sector spent a certain proportion of it's disposable income, saving the rest. In this model the private sector spend out of both income and saved wealth. The introduction of spending out of wealth in the only difference. This model is the starting point for the stock-flow consistent models described in Monetary Economics by Wynne Godley & Marc Lavoie (model "SIM").

Read More ›

A simple economy with government money
A simple but rigorous accounting of economic flows and sectoral balances through time

This post describes a complete, if very simple, economic model. We'll use the insights and mathematical formulations developed previously (e.g. here, here, and here) but these will be anchored within a wider accounting and modelling framework which helps us to organise our model components and ensure that the model is coherent.

Read More ›

Modelling the fiscal multiplier
Some additional considerations for modelling building

This is the third post in a series of posts looking at the fiscal multiplier. Previously, we have examined how the circular flow of money interacts with government spending and taxation (as well as private saving) by considering a mathematical structure called a geometric series. This interpretation of the fiscal multiplier is based around the concept of "spending rounds" which represent successive events in which income received previously is spent onwards, creating new income which is spent in the next round, and so on. Each spending round involves a successively smaller amount of circulating money because a fraction of all income is collected in tax (or saved). Eventually, all of the money has been withdrawn from circulation via taxation (and saving) and the spending stops. In the interim period, the circulation of the ever-reducing money stock produces a total, cumulative amount of income.

This approach is an intuitive way of thinking about sequences of spending. It enables us to conceive of how the money initially introduced by government spending is passed around the economy and what the implications of taxation and saving are. But whilst it arguably does a good job of describing how individual acts of spending follow the receipt of income, it should be recognised that in real economies collective spending does not precede collective income in discrete, ordered stages. Spending and the receipt of incomes arise via an incredibly complex network of millions of overlapping transactions occuring continuously.

The concept of the spending round also leads to questions such as how long it takes for a single spending round to occur, or the number of rounds that should be considered. It seems reasonable, for example, that the number of spending rounds included in any analysis would depend on the time period under consideration. But it is not really clear how spending rounds relate to absolute time. However, it turns out that these concerns can be adequately side-stepped by using a coherent accounting framework. This post attempts to tighten up our understanding of the fiscal multiplier and presents an alternative mathematical derivation which is more conducive to inclusion in more complex models.

Read More ›

Government money and saving
How private sector saving affects the fiscal multiplier and the government's budget

In the last post we looked at they way in which government spending and taxation interacts with the circular flow of money. In particular, we found that, in an economy with no saving, money introduced by the government is repeatedly spent creating additional income beyond that created by the initial government spending. Since the government collects an income tax on each transaction, the money introduced by the government spending is gradually withdrawn as it is re-spent. This "leakage" of money out of circulation places a limit on the total amount of spending and income that can ultimately arise. The eventual total level of aggregate income was shown to be a multiple, \(\frac {1}{\theta}\), of the initial government spend (where \(\theta\) is the tax rate). Here we'll consider what changes in this story when the population decide to save some of their income.

Read More ›

The circular flow of government money
Government spending, taxation and the fiscal multiplier

The term fiscal policy describes the spending and taxation decisions taken by government and is used to differentiate these policies from other economic policies of government such as the setting of interest rates (monetary policy). The impact of the circular flow of money on incomes is complicated by government spending and taxation and the effect is encapsulated in a concept called the fiscal multiplier which is the focus of this post.

Read More ›

Exogenous and endogenous variables
What does the modeller control and what does the model control?

In the previous monetary economics models we set up the scenario we wanted to model, with equations, some numbers for each of the parameters, and some starting ("initial") conditions. Once we set the models up we simply left them to run their course on the basis of the conditions we'd chosen. In this post we'll model a scenario where conditions change during the course of the model run. In doing so we'll draw a distinction between exogenous and endogenous variables.

Read More ›

The Paradox of Thrift
Why saving isn't always a virtue

In the last model we simply watched money circulate around our economy. Because the same amount of money was spent in each time period, income was constant and there was nothing in the model to change this status quo. In this model, we'll allow our citizens an additional freedom. Instead of spending every pound they earn, they will have two options for how to use their income: they can save some part of it, and spend the rest.

Read More ›

Spending, income and the circular flow of money
The simplest economic model conceivable

This is the first in what I hope to be a series of posts on modelling the economy. My intention is to explore economic modelling using a bit of theory, a bit of code, and some attempt to understand the results intuitively. I'll use the Python programming language to do this and describe and share all of the code. I was motivated to do this by reading Monetary Economics by Wynne Godley and Marc Lavoie, which describes increasingly complex models of the monetary economy in great detail. I am actually only about halfway through the book and decided to consolidate what I had learned so far. This post, and probably the next few, actually steps back from the starting point of Godley & Lavoie and describes a much simpler model in an attempt to isolate and identify some of the fundamental components and processes which contribute to the behaviour of the economy. This post shows that:

  • Income and money are separate concepts. Money is a stock, income is a flow (measured per unit of time)
  • Income is identically equal to spending, since these flows form two sides of every transaction
  • Total income over some time period is generated by a given stock of money circulating at a certain rate (termed the "velocity of money")
  • In an economy with a fixed money supply and wherein all income is spent, total income is constant over time
Read More ›

What is a sustainable government deficit?
Some maths and code to understand how growth and deficits affect government debt.

A government's budget is in deficit when its expenditure exceeds its tax revenue. Since governments tend to meet this shortfall through a process described as borrowing, deficits add to a government's debt. The UK government is in an almost continual state of budget deficit, with roughly 85% of the post-WWII period being characterised by deficits. This means that UK government debt is continually increasing.

Is this necessarily bad? Is there a sense in which increasing debt is sustainable? Well, if the size of the UK economy is also increasing then the size of the debt relative to the economy may not necessarily be increasing. It is this measure that is usually taken to be more important than the absolute size of the debt.

So here I'll try to figure out how a budget deficit interacts with economic growth to produce an impact on government debt. First I'll develop some simple mathematical descriptions of each of the components (economic growth, debt, etc.) and then produce some simple example scenarios in Python. We'll assume a constant rate of economic growth and a constant rate of deficit spending.

Read More ›