Spending, income and the circular flow of money

The simplest economic model conceivable

Posted on 04 June 2016 by Andrew Berkeley

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

Whole economies are (obviously, very) complex. They involve the aggregate economic decisions and actions of individuals, businesses, banks and governments. They include concepts such as money, prices (or inflation), government spending and taxation, public and/or private debt together with interest rates, as well as trade with other economies. Each of these may be of interest in their own right but their effect on overall income levels (and therefore living standards) might also be of primary interest. Ultimately, a sufficiently detailed model might seek to represent each of these concepts (and more). But understanding such complexity is easiest when it is broken down into simpler units. Therefore, we'd better pick a simple starting point and try to build up the complexity incrementally.

A very simple economy

So, what is the simplest model of a monetary economy that can be conceived? What definitely needs to be represented, and what could potentially be left out? Here, we'll attempt to omit as much as possible. We'll assume no government, businesses or banks exist. We'll also assume that nobody is interested in saving or trading with external economies. Instead all that happens is that citizens trade with each other. And we'll assume that there is a fixed amount of money in existence. What can we learn from such an economy?

Okay, so we have some money. We don't know where it came from. Perhaps the money is gold or some other precious metal. Someone discovered it at some point and made it into coins. In any case, it doesn't matter for our purposes. We simply assume it exists and is distributed across the population in some fashion.

What happens with this money? Well, in this scenario, we're going for something incredibly simple. We're going to assume that people simply spend all of their income by buying things from their peers. In contrast to other possible ways of using money (that will be introduced in later models), we can call this form of spending consumption. So all our citizens use their money for is consuming goods and services.

We can formalise this by using some algebra. Let's identify consumption with the label \(C\), and income as \(Y\). Now we can make a mathematical statement about consumption in our economy:

\[C = Y \hspace{1cm} (1)\]

This is our first consumption function - a mathematical expression describing the spending behaviour of our citizens. This expression could be more complicated if we wanted to describe more sophisticated behaviour, but for now they simply spend whatever their income is, and therefore consumption is exactly equal to income. Equation (1) could be thought of as describing the spending behaviour of an individual (average) citizen. But the intention is really to represent the aggregate spending decisions of everybody together. Total consumption in the economy is equal to total income in the economy.

We can't really proceed with equation (1) on its own as it has two unknown quantities, \(C\) and \(Y\). We need one more equation to fully specify our economy. In general we need the same number of equations as unknown quantities, and in particular we need to know something about income (\(Y\)) if equation (1) is to be of any use. This is where we need to use a bit of thought. Lets imagine that we spend £10 on something. We can immediately make at least one logical deduction about the wider effect of that spending on the economy: someone else just gained an income of £10. This is true by virtue of the simple and obvious fact that spending is a two-way street, involving a buyer and seller, a spender and an earner. No transaction involves one person alone. In general, whenever there is an act of spending, we know that an equal amount of income has been generated in the economy, for someone, somewhere. And when many separate transactions occur over the whole economy, the total amount of income will be equal to the total amount spent.

We've already defined algebraic terms for spending (\(C\)) and income (\(Y\)), so let's write down what we've just logically derived:

\[Y = C \hspace{1cm} (2)\]

Total income is equal to total spending. The total income of an economy is more or less synomymous with the Gross Domestic Product (GDP).

There. We now have two equations and two unknowns, so our economy is completely specified. There's a certain symmetry to these equations (to understate it considerably), and it might be straighforward to see what will (or rather, what won't) happen in this simple economy without resorting to a computer simulation. But we'll do it anyway as it will form the basis for the more interesting models that will follow.

A model in Python

We want to create a model that represents the evolution of our economy through time. We'll step through time, simulate any flows of money which are impied by our rules above, and see where it takes us. We're going to deal with with discrete timesteps and so we need to define how spending occurs across time periods. Given the justification given above we'll say that income is earned concurrently with spending, i.e. in the same timestep - when spending occurs, income is earned. Mathematically, we can state this by writing difference equations which use subscripts to denote the time period under consideration \(t\):

\[Y_t = C_t\]

So the income in, say, the 5th time period, \(Y_5\), would be, according to the equation above, equal to the spending in that same time period, \(C_5\). Next we'll say that citizens in our economy spend their income in the next time step, that is, after their income is earned in the current time step. Therefore, we can relate spending in one time period is equal to the income earned in the previous one:

\[C_t = Y_{t-1}\]

The spending in the 5th time period, \(C_5\), would be equal to the income earned in the 4th time period, \(Y_4\).

So now we have difference equations which relate spending and income and time. The only other thing we need in this model is to state what spending occurs in the first time step. Without this, the model would never get going, since spending is dependent on the income of a previous time step. This type of information is usually termed an initial condition. Let's go with 100, so:

\[C_0 = 100\]

and therefore, by accounting identity:

\[Y_0 = 100\]

Okay, we've got our equations and out initial condition. Let's code something. We're going to use the Python libraries numpy and matplotlib, so we import them first. numpy might be a little overkill for our purposes here but we'll get used to it now as it might be useful in more complex models. matplotlib will allow us to produce graphs of our model solution.

In [1]:
import matplotlib.pyplot as plt
import numpy as np
%matplotlib inline  

Next, we'll define the number of timesteps we want to propagate our model through. Let's go for 100. These are arbitrary anyway. We'll use a variable called \(N\).

In [2]:
N = 100

\(Y\) and \(C\) are determined by the model as it evolves through time (they are endogenous variables). Since we don't know the values of these variables for every time period yet, we just need to set up some containers to hold their values as we solve the model at each time step. We'll use arrays, which are basically just lists of numbers that we can add to and read later. So for both \(Y\) and \(C\) we want an array of size \(N\). This way we'll record their values through time and afterwards we can inspect the history of the economy as it evolved. We can use the .zeros() function from the numpy library to create arrays of this size populated - for now - by zeros.

In [3]:
C = np.zeros(N) # consumption
Y = np.zeros(N) # income

And to satisfy our initial condition, we just need to set the first value for both consumption and income to 100. The values in arrays can be set (or read) by using square brackets and the number of the position we're interested in. Python arrays are "zero-indexed", so the first value has a position, or "index", of 0.

In [4]:
C[0] = 100
Y[0] = 100

We can use the print function to inspect these variables and check they are doing what we think. For example,

In [5]:
[ 100.    0.    0.    0.    0.    0.    0.    0.    0.    0.    0.    0.
    0.    0.    0.    0.    0.    0.    0.    0.    0.    0.    0.    0.
    0.    0.    0.    0.    0.    0.    0.    0.    0.    0.    0.    0.
    0.    0.    0.    0.    0.    0.    0.    0.    0.    0.    0.    0.
    0.    0.    0.    0.    0.    0.    0.    0.    0.    0.    0.    0.
    0.    0.    0.    0.    0.    0.    0.    0.    0.    0.    0.    0.
    0.    0.    0.    0.    0.    0.    0.    0.    0.    0.    0.    0.
    0.    0.    0.    0.    0.    0.    0.    0.    0.    0.    0.    0.
    0.    0.    0.    0.]

Good, our initial condition is in there.

Now were in a position to iterate through each time step and solve the equations, populating our arrays as we go. We'll use a for loop to iterate. This is a type of structure provided in most (all?) programming languages for repeating a particular procedure some number of times. In this case, we're going to solve our spending and income equations for our 100 time steps. Since we have difference equations that reference a previous timestep, we cannot start at \(t=0\) as there'd be no previous values to use. So we start at \(t=1\) and our initial conditions defined at \(t=0\) provides the required information to get going from that point onwards.

The range function provides a handy way to generate a sequence of \(t\) values from \(1\) to \(N\) (omitting \(t=0\)).

In [6]:
for t in range(1, N):
    C[t] = Y[t-1] # calculate spending based on earlier income
    Y[t] = C[t]   # calculcate income earned in this time period

That's it! We've solved the entire history of our economy. Let's make some plots of how spending and income varied through time in our economy. We'll use the matplotlib library here.

In [7]:
# create a figure
fig = plt.figure(figsize=(8, 4))

# create a subplot for consumption
consumption_plot = fig.add_subplot(121)
# plot consumption (C) versus time step (N)
consumption_plot.plot(range(N), C, lw=3)
# add gridlines
# label axes

# create a second subplot for income
income_plot = fig.add_subplot(122)
# plot income (Y) versus time step (N)
income_plot.plot(range(N), Y, lw=3)
# add gridlines
# label axes

# space subplots neatly

The circular flow of money

You'll be forgiven for not being overly excited by these results. But in any case, let's walk through what happened. We started with 100 pounds being spent in the first time step. This immediately became 100 pounds of income. In the second timestep, the 100 pounds of income earned in the first time step was spent by those "recipients" and immediately became 100 pounds of income for "others" in the economy. This process was repeated another 98 times. The upshot is that during every time step the total amount of spending in the economy was 100 pounds, and the total amount of income was 100 pounds.

Now, the numbers in our simulated economy are not meaningful in any sense: our units of money and time are completely arbitrary and so the fact that income is 100 pounds isn't all that illuminating. But we can conclude something important from the flat lines in the plots above. If people simply spend all of their income (and no more) the result will be a constant level of income in the economy. No growth. No recessions. Just stable levels of spending and income. And the simple intuition behind this is revealed by the fact that the two equations we used are practically identical. They simply describe the periodic swapping of money through the process of spending: your spending becomes my income, which becomes my spending, which becomes someone else's income, and so on... There is nothing in the equations which disturbs or adjusts the size of these flows and so the result is that the same levels of spending simply repeat themselves. The equations describe the circulation of the same amount of money through time. This is the basic insight of this model: money circulates.

But it's worth pointing out that, despite the symmetry of our two equations, they do represent distinct concepts and could be different. The consumption function is a statement of human behaviour, intended to convey what we believe our citizens are choosing to do with their money (on average). We could have defined it differently, for example:

\[C = \frac{Y}{2}\]

would imply that people spend only half of their income (presumably saving the rest). On the other hand, the income equation does not represent an assumption about behaviour in our economy. It is more precise than that. It is an accounting identity describing the two relations in a(ll) transaction(s). We happen to have defined the only type of transaction in our economy as being consumption spending and therefore all income derives from consumption. But we might have conceivably included something else, for example, government spending, e.g.:

\[Y = C + G\]

So, the reason that the consumption and income equations in our model resemble one another so closely is simply that we have stripped out as much complexity as possible and essentially reduced our economy to just private citizens exchanging consumption goods and service with one another. Consumption spending and income become completely aligned under these conditions. In other models, the specific forms of the consumption and income equations might diverge from one another and the economy may behave differently as a consequence. But the relationship between spending, income and the circulation of money established in this model remains a fundamental principle.

Stocks, flows and the "velocity" of money

We used the phrase "money circulates" earlier. This would seem like a straightforward statement. And it is, really. But given that we just modelled spending and income rather than money per se, it's worth clarifying the distinction between money and income.

The distinction is that of stock versus flow quantities. A stock quantity is something that can be measured at a single point in time and represents a specific absolute value. A flow quantity, on the other hand, is measured over a period of time and therefore represents a rate over time. Stocks are related to flows in that flows can cause a given stock to be increased or decreased through time. For example, the volume of petrol in the tank of a car is a stock quantity, whereas the consumption of that fuel by the engine represents a flow. In our case, money is a stock quantity and both spending and income are flows. We can't talk about income without stating whether it is hourly or yearly, for example.

So what we have modelled is a flow, income: the rate at which money is earned over time. But we did start out by postulating a fixed stock of money in our economy, although it was not explicitly included in our model. It turns out, that if we pick apart our assumptions a bit more, we can discover that the stock of money was implicit in the model and that the relationship between the total stock of money and total income can be understood in fairly simple terms.

In our economy, we insisted that the only use for money is consumption spending. Further, we assumed that all earned income is spent on every time step, and that there is only one round of spending in each time step. It follows that the entire quantity of money must be spent exactly once in each timestep. There cannot be any more money in existence than what is spent in each time step, otherwise some of it would have to be unspent (i.e. saved) which contradicts our assumptions. And there cannot be any less money than the amount spent in each timestep otherwise some of it would have to be spent twice, which again contradicts the structure of our model. We can deduce two conclusions from this reasoning:

  1. the total stock of money is spent entirely, once, each time step
  2. if the amount spent in each time step is 100 pounds, then it follows from conclusion 1 that the total stock of money is equal to 100 pounds

Let's identify the stock of money as \(M\), then, according to conclusion 2, we can say:

\[C = M\]

and since \(Y = C\),

\[Y = M (= 100)\]

Well that looks suprisingly simple - income in the economy is numerically exactly the same as the size of the money stock! Is this a universal rule? Well let's think this through a little bit. Remember, income is a measure of a flow over time. The key is to consider what period of time we're interested in. In our model, we measured income over single, discrete time periods. Aside from the fact that these time periods were arbitrary and could represent anything (days, weeks, months, years, something else), what happens if we want to understand income over some different time period? For example, what if our model time period was quarterly but what we're really interested in is annual income? Annual income is surely greater than quarterly income. But if the equation \(Y = M\) is universally true then that would imply that the money stock (\(M\)) has to grow simply because we are measuring income over a different time period. That doesn't sound right.

Hopefully it is quite easy to see that, in our model, if quarterly income is 100 pounds then annual income is 400 pounds, since we are simply considering the sum total of income over 4 consecutive time periods. (This is true over any 4 time periods in our model since income is constant). So when we change the measurement period, we find that income changes - as it should for a flow quantity that is measured over time (duh!). But the stock of money hasn't changed. At least, there is nothing in our model to imply that it should, or even could, have changed. To look at this formally, we can now say:

\[Y_{annual} = 400\]

but, still,

\[M = 100\]

and therefore

\[Y_{annual} \neq M\]

Our equation equating income with the money stock does not hold true now. Instead, we have this situation:

\[Y_{annual} = M \times 4\]

Annual income is equal to 4 times the size of the money stock. Now, remember that in our model, the money stock was entirely spent in each time period, which, for now, we're taking to be a quarter of a year. The significance of the number 4 in the equation above, therefore, is that it represents the number of times the money stock is spent in the new reference period of a whole year. We can generalise this and state that:

\[Y = MV\]

where \(V\) is called the velocity of money and represents the frequency at which the money stock turns over. As long as income and the velocity of money are measured using the same units of time, the equation above will hold true. So when considering annual income, we see that an income of 400 pounds per year is generated from a money stock of 100 pounds circulating 4 times a year (\(V = 4\)). For quarterly income we find an income of 100 pounds per quarter is generated by the same 100 pound stock of money circulating once per quarter (\(V = 1\)). In both cases the stock of money turns over once every quarter, we just happen to be aggregating the income over different time scales, and therefore the turnover rate of the stock of money (the "velocity") changes with respect to the time scale we are considering.

In this light, we see that our original model was a special case where the reference period for income (single time step) happened to coincide with the turnover time of the money stock (single time step). In that context the velocity of money is always 1. Our original equation \(Y = M\) was therefore really \(Y = M \times 1\). Of course, this wasn't a coincidence, it was baked in to our contrived scenario of 100% spending of income in each time step. In fact, when we deduced the size of \(M\) from knowledge of \(Y\) (via \(C\)) we were basically exploiting the fact that our assumptions had predetermined a velocity of money equal to 1 in our economy. In other more complex cases, we might not know or be able to deduce the turnover of the money stock as clearly and therefore we might instead use \(Y = MV\) to calculate it (assuming we know something about \(M\) and \(Y\)). Either way, the equation makes explicit the link between money, income and the frequency of spending.


This model was an incredibly simplified version of a real economy. The essense of the model economy was simply citizens swapping their incomes with each other for goods and services. We had only two rules encoded in our equations 1 and 2: all income was completely spent; and all spending generates - pound for pound - the same amount of income.

We found that under these simple conditions money is simply repeatedly spent on, generating a stable economy with constant levels of spending and income.

The basic insights of this model are this. Income is generated by spending. The relationship between the amount of money and the level of income depends on the frequency at which the money is spent.

This post was written using the iPython Notebook

The source can be found on Github or viewed in the iPython Notebook Viewer.

The Python code used in this post is also available in script form on Github.