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.

The Bust¶

Let's get some of the standard coding stuff out of the way.

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

N = 100

# exogeneous variables

G = 20            # government spending

theta = 0.2       # tax rate

alpha_H = 0.2     # propensity to spend out of saved wealth

# endogeneous variables

Y   = np.zeros(N) # income
T   = np.zeros(N) # tax revenue
C   = np.zeros(N) # consumption
H_h = np.zeros(N) # private savings
H_g = np.zeros(N) # government balance


Okay, now we'll introduce some changes. Firstly, we're going to make $\alpha_Y$ a function of time. This means that it can vary through time if we choose it to. In our code, the variable becomes an array of values instead of a single constant value. We prepare an array with a value for every time step in the enumeration of our model. When we solve our model, instead of referencing the single, constant value, we'll reference the value for the appropriate time period. So we simply need to prepare an array which will contain the values we want through time. Okay, we'll start by initialising an array of length N

In [68]:
alpha_Y = np.zeros(N)


And now we'll set the values in the array. We'll start with the same value as we've used before, but what we want is to reduce this value after 10 time periods. So we'll switch from 0.9 (i.e. 90% spending of disposable income) to 0.8 (80%).

In [69]:
alpha_Y[0:10]  = 0.9 # set the first 10 elements
alpha_Y[10:N]  = 0.8 # set the remainder of the elements


We can check we have what we want by printing out the first, say, 15 values.

In [70]:
print(alpha_Y[0:15])

[ 0.9  0.9  0.9  0.9  0.9  0.9  0.9  0.9  0.9  0.9  0.8  0.8  0.8  0.8  0.8]


Sure enough, we have the change we want in there.

Now, we can also make another change that suits our purposes. Remember the last model took a number of time periods to reach it's ultimate steady-state condition. We can bypass this phase by simply setting our model to start from the steady-state conditions. This way, we can concentrate on the effects we're interested in - in this case, the changing $\alpha_Y$ parameter - without it being obscured by other behaviour that we're not interested in. In modelling parlance we're specifying our initial conditions here. So, we'll set the initial values of each of our variables to the values that emerged during the steady-state of the last model.

In [71]:
Y[0]   =  100
C[0]   =  80
T[0]   =  20
H_h[0] =  40
H_g[0] = -40


Okay, easy. Let's run the model.

In [72]:
for t in range(1, N):

# calculate total income for this time step (equation 1)
Y[t] = (G + alpha_H*H_h[t-1])/(1 - alpha_Y[t]*(1-theta))

# calculate the tax paid on income for this time step (3)
T[t] = theta * Y[t]

# calculate the consumption spending for this time step (4)
C[t] = alpha_Y[t]*(1 - theta)*Y[t] + alpha_H*H_h[t-1]

# calculate the new level of private savings for this time step (5)
H_h[t] = H_h[t-1] + Y[t] - T[t] - C[t]

# calculate the new level of government money balance (6)
H_g[t] = H_g[t-1] + T[t]- G



Notice that there are two subtle changes in the above code. Firstly, all references to the alpha_Y variable now reference the appropriate index of what is now an array (i.e. alpha_Y[t]) rather than treating the variable as a single constant (i.e. alpha_Y) as previously. Secondly, the loop iterates from 1..N as opposed to 0..N (for t in range(1, N):). This is because we have specified particular conditions of the first time period up front (our inital conditions), so we don't want the model to evaluate them. We simply want to start the model from the next time period (identified using the index 1 in the zero-based Python language).

Right, let's make the usual plots. First, aggregate spending and income.

In [73]:
# initialise plot figure
fig = plt.figure(figsize=(12, 4))

# plot government spending (G) through time
gov_plot = fig.add_subplot(131, xlim=(0, N), ylim=(0, 120))         # set axis limits
gov_plot.plot(range(N), np.repeat(G,N), lw=3)                       # plot constant G versus time
gov_plot.grid()                                                     # add gridlines
plt.xlabel('time')                                                  # label x axis
plt.ylabel('government spending')                                   # label y axis

# plot consumption spending (C) through time
consumption_plot = fig.add_subplot(132, xlim=(0, N), ylim=(0, 120)) # set axis limits
consumption_plot.plot(range(N), C, lw=3)                            # plot C versus time
consumption_plot.grid()                                             # add gridlines
plt.xlabel('time')                                                  # label x axis
plt.ylabel('consumption')
# label y axis

# plot aggregate income (Y) through time
income_plot = fig.add_subplot(133, xlim=(0, N), ylim=(0, 120))      # set axis limits
income_plot.plot(range(N), Y, lw=3)                                 # plot Y versus time
income_plot.grid()                                                  # add gridlines
plt.xlabel('time')                                                  # label x axis
plt.ylabel('income')                                                # label y axis

plt.tight_layout() # space subplots neatly


So, we have constant government spending but consumption spending is characterised by large decrease at the 10th time period when the private sector's propensity to consume out of income drops from 90% to 80%. This in turn causes an equivalent reduction in aggregate income. Afterwards, both consumption spending and aggregate income recover to their previous, steady-state levels.

Let's see what happens to the government sector under these conditions.

In [74]:
# initialise plot figure
fig = plt.figure(figsize=(8, 4))

gov_plot = fig.add_subplot(121, xlim=(0, N), ylim=(0, np.max(G)*1.5))   # set axis limits
gov_plot.plot(range(N), np.repeat(G,N), lw=3)                           # plot constant G versus time
gov_plot.grid()                                                         # add gridlines
plt.xlabel('time')                                                      # label x axis
plt.ylabel('government spending')                                       # label y axis

tax_plot = fig.add_subplot(122, xlim=(0, N), ylim=(0, np.max(G)*1.5))   # set axis limits
tax_plot.plot(range(N), T, lw=3)                                        # plot tax revenue versus time
tax_plot.grid()                                                         # add gridlines
plt.xlabel('time')                                                      # label x axis
plt.ylabel('tax revenue')                                               # label y axis

plt.tight_layout() # space subplots neatly


The government maintains its constant spending level (left), which is no problem given that the government is the monetary authority in this model. But tax revenue (right) exhibits a reduction in the 10th time period, recovering thereafter. Since tax is levied in proportion to aggregate income, this pattern is trivially explained as a consequence of the variations in aggregate income shown above.

And what does this do to the government and private sector net positions.

In [75]:
# initialise plot figure
fig = plt.figure(figsize=(8, 4))

budget_plot = fig.add_subplot(121, xlim=(0, N), ylim=(-10, 10))                     # set axis limits
budget_plot.plot(range(N), T-np.repeat(G,N), lw=3, label='Government')              # plot gov budget versus time
budget_plot.plot(range(N), Y-T-C, lw=3, label='Private sector')                     # plot private budget versus time
budget_plot.grid()                                                                  # add gridlines
plt.xlabel('time')                                                                  # label x axis
plt.ylabel('budget position')                                                       # label y axis
plt.legend(loc='upper right')

balance_plot = fig.add_subplot(122, xlim=(0, N), ylim=(np.min(H_g), np.max(H_h)))   # set axis limits
balance_plot.plot(range(N), H_g, lw=3, label='Government')                          # plot gov balance versus time
balance_plot.plot(range(N), H_h, lw=3, label='Private sector')                      # plot private balance versus time
balance_plot.grid()                                                                 # add gridlines
plt.xlabel('time')                                                                  # label x axis
plt.ylabel('money balance')                                                         # label y axis
plt.legend(loc='center right')

plt.tight_layout() # space subplots neatly


So on the 10th time period we can see that the private sector jumps into a position of surplus (green, left plot). This is simply because it has suddenly started spending 10% less of it's income. We therefore see private sector wealth start to increase (green, right plot). Correspondingly, the government's budget moves into deficit due to lower tax revenues and the government's "debt" increases. What we have produced here might be called a recession. The change in private sector spending behaviour caused a lowering of consumption spending and thereby aggregate incomes - the economy reduced in size. Recall, that, all other things being equal, increased saving necessarily reduces aggregate incomes.

However, the economy did recover to its original size, and, interestingly, this occurred without any subsequent reversion in private sector spending behaviour. What has happened is that the increased saving of the private sector, over subsequent time periods, resulted in the size of saved wealth growing larger. As such, the spending out of this wealth also grew. Eventually, the private saved wealth reached a size at which the rate of spending out of wealth and the rate of saving out of incomes were again brought in to balance. For reasons discussed previously, this occurred at the same level of aggregate income as before; the sole difference between the steady-state conditions before and after the "recession" being the size of saved wealth (and correspondingly, government debt). Essentially, with a higher rate of saving out of income, saved wealth needs to be larger in order to achieve steady-state.

We can interpret this by focussing not so much on change in propensity to spend out of incomeper se, but that the private sector changed their preferred level of wealth - their wealth target. Intuitively, we can imagine that, irrepsective of what caused the private sector to start saving more in the first place, their confidence to spend was gradually restored as they built up a sufficient new level of saved wealth. The net result of this is a return to the previous levels of income but with greater private savings and a larger government "debt".

Notice that the government deficit which emerged from the private sector's change in behaviour was eventually closed. And without the government doing anything to change their fiscal policy (spending, $G$, and tax rate, $\theta$).

The boom¶

Let's replay the scenario modelled above, but this time we'll actually revert the change to $\alpha_Y$ on the 50th time period.

In [76]:
alpha_Y[0:10]  = 0.9
alpha_Y[10:50] = 0.8
alpha_Y[50:N]  = 0.9

In [77]:
for t in range(1, N):

# calculate total income for this time step (equation 1)
Y[t] = (G + alpha_H*H_h[t-1])/(1 - alpha_Y[t]*(1-theta))

# calculate the tax paid on income for this time step (3)
T[t] = theta * Y[t]

# calculate the consumption spending for this time step (4)
C[t] = alpha_Y[t]*(1 - theta)*Y[t] + alpha_H*H_h[t-1]

# calculate the new level of private savings for this time step (5)
H_h[t] = H_h[t-1] + Y[t] - T[t] - C[t]

# calculate the new level of government money balance (6)
H_g[t] = H_g[t-1] + T[t]- G



How does this change our results...

In [78]:
# initialise plot figure
fig = plt.figure(figsize=(12, 4))

# plot government spending (G) through time
gov_plot = fig.add_subplot(131, xlim=(0, N), ylim=(0, 130))         # set axis limits
gov_plot.plot(range(N), np.repeat(G,N), lw=3)                       # plot constant G versus time
gov_plot.grid()                                                     # add gridlines
plt.xlabel('time')                                                  # label x axis
plt.ylabel('government spending')                                   # label y axis

# plot consumption spending (C) through time
consumption_plot = fig.add_subplot(132, xlim=(0, N), ylim=(0, 130)) # set axis limits
consumption_plot.plot(range(N), C, lw=3)                            # plot C versus time
consumption_plot.grid()                                             # add gridlines
plt.xlabel('time')                                                  # label x axis
plt.ylabel('consumption')                                           # label y axis

# plot aggregate income (Y) through time
income_plot = fig.add_subplot(133, xlim=(0, N), ylim=(0, 130))      # set axis limits
income_plot.plot(range(N), Y, lw=3)                                 # plot Y versus time
income_plot.grid()                                                  # add gridlines
plt.xlabel('time')                                                  # label x axis
plt.ylabel('income')                                                # label y axis

plt.tight_layout() # space subplots neatly


As before, we have a "recession" at the 10th time period which "recovers" over the subsequent 20 or 30 time periods. Then on the 50th time period consumer spending suddenly increases. As such, aggregate incomes also take a big boost.

In [79]:
# initialise plot figure
fig = plt.figure(figsize=(8, 4))

gov_plot = fig.add_subplot(121, xlim=(0, N), ylim=(0, np.max(G)*1.5))   # set axis limits
gov_plot.plot(range(N), np.repeat(G,N), lw=3)                           # plot constant G versus time
gov_plot.grid()                                                         # add gridlines
plt.xlabel('time')                                                      # label x axis
plt.ylabel('government spending')                                       # label y axis

tax_plot = fig.add_subplot(122, xlim=(0, N), ylim=(0, np.max(G)*1.5))   # set axis limits
tax_plot.plot(range(N), T, lw=3)                                        # plot tax revenue versus time
tax_plot.grid()                                                         # add gridlines
plt.xlabel('time')                                                      # label x axis
plt.ylabel('tax revenue')                                               # label y axis

plt.tight_layout() # space subplots neatly


The boost to aggregate incomes causes a corresponding jump in tax revenue at time period 50 (above, right).

In [80]:
# initialise plot figure
fig = plt.figure(figsize=(8, 4))

budget_plot = fig.add_subplot(121, xlim=(0, N), ylim=(-10, 10))                     # set axis limits
budget_plot.plot(range(N), T-np.repeat(G,N), lw=3, label='Government')              # plot gov budget versus time
budget_plot.plot(range(N), Y-T-C, lw=3, label='Private sector')                     # plot private budget versus time
budget_plot.grid()                                                                  # add gridlines
plt.xlabel('time')                                                                  # label x axis
plt.ylabel('budget position')                                                       # label y axis
plt.legend(loc='upper right')

balance_plot = fig.add_subplot(122, xlim=(0, N), ylim=(np.min(H_g), np.max(H_h)))   # set axis limits
balance_plot.plot(range(N), H_g, lw=3, label='Government')                          # plot gov balance versus time
balance_plot.plot(range(N), H_h, lw=3, label='Private sector')                      # plot private balance versus time
balance_plot.grid()                                                                 # add gridlines
plt.xlabel('time')                                                                  # label x axis
plt.ylabel('money balance')                                                         # label y axis
plt.legend(loc='center right')

plt.tight_layout() # space subplots neatly


And we can see from the sectoral balance charts that the government (blue) is actually in a position of budget surplus (left plot) because of this boost to tax revenues in the 50th period. Notice that this fiscal surplus is mirrored exactly by a private sector deficit (green, left chart) - the private sector are dissaving. And by implication, the saved wealth of the private sector is reduced (green, right plot).

With the change in $\alpha_Y$ the private sector have effectively changed their wealth target back to its original, lower level. They are comparatively more focussed on spending and less focussed on saving. When they initially started to spend 10% more of their incomes ($\alpha_Y = 0.8$ to $\alpha_Y = 0.9$) at time step 50, saved wealth was at its highest level, consistent with the previous, higher wealth target. This means that spending out of saved wealth was also at its highest rate. With the switch to higher spending out of income and therefore less saving out of income, these flows into and out of saved wealth became unbalanced, with more money being spent out of savings than being saved from income. This is what caused the boost to consumption spending, aggregate income and tax revenue. We could call this a boom.

As in the previous example above, this state of affairs does not continue indefinitely. As the population dissave, the size of saved wealth reduces and so the amount spend out fo saved wealth reduces too. Eventually the amount spent out of saved wealth moves into balance with the amount saved out of income and equilibrium is once again achieved. This occurs when saved wealth (and government debt) is back at the original size.

Summing up¶

This model illustrates a number of things. Firstly, we've achieved two technical milestones: (1) starting the model with specific initial conditions, in this case to by-pass the convergence to steady-state; and (2) we've introduced the idea of an "exogeneous shock" to our model economy, by specifying a time-varying behaviour in one of our parameters ($\alpha_Y$). Aside from that though, we've learned a bit about how private sector behaviour affects the economy in aggregate and even the government sector specifically.

What we have seen is that when the private decide to save more, this affects aggregate spending and therefore aggregate incomes. This is an illustration of the famous Paradox of Thrift but is more complicated than the example previously discussed. In the present case, the government accommodates the demand for saved wealth by running a deficit - essentially introducing money to the economy to replace that removed from circulation by saving. This enables spending to be supported and incomes to gradually recover to their previous levels.

It is worth noting how these examples saw the government's budget move into deficit and into surplus without the government altering their fiscal policy at all. Recall that in these simple models fiscal policy is set by determing the government spending level, $G$, and the income tax rate, $\theta$. At no point were these values altered. Yet the government's budget position shifted significantly. One conclusion from this is that the government's budget is not necessarily under the control of fiscal policy and is instead intrinsically wedded to the dynamics of the wider economy. Indeed, the sectoral balance charts show quite vividly how the financial stocks and flows of the government and private sector are mirror images of one another in accounting terms and cannot vary independently of one another.

It is worth pointing out a few caveats here too. The change in behaviours modelled in this post were unrealistically sharp, with sudden, large changes in spending propesnties within a single time periods. This produced equally sharp responses in our model economy. In the real world it is perhaps more likely that aggregate behaviours might vary more smoothly. It would be trvial to adjust the examples shown here to describe more nuanced and realistic changes in behaviours (e.g. see here). The scenarios shown here were intentionally simple so as to elucidate the effects most clearly.

Also, this model doesn't include a number of things that might be relevant to the impacts of economic cycles: government social security spending (e.g. unemployment benefit), trading with external economies (i.e. imports and exports) and bank credit. However, the model does isolate, nicely, the fundamentals of the relationship between a domestic private sector and a currency-issuing government.