# Wealth Distribution Dynamics¶

In addition to what’s in Anaconda, this lecture will need the following libraries:

!pip install --upgrade quantecon


## Overview¶

This notebook gives an introduction to wealth distribution dynamics, with a focus on

• modeling and computing the wealth distribution via simulation,
• measures of inequality such as the Lorenz curve and Gini coefficient, and
• how inequality is affected by the properties of wage income and returns on assets.

The wealth distribution in many countries exhibits a Pareto tail

### A Note on Assumptions¶

The evolution of wealth for any given household depends on their savings behavior.

We will use the following imports.

## Lorenz Curves and the Gini Coefficient¶

Before we investigate wealth dynamics, we briefly review some measures of inequality.

### Lorenz Curves¶

One popular graphical measure of inequality is the Lorenz curve.

The package QuantEcon.py, already imported above, contains a function to compute Lorenz curves.

To illustrate, suppose that

is data representing the wealth of 10,000 households.

We can compute and plot the Lorenz curve as follows:

This curve can be understood as follows: if point $$(x,y)$$ lies on the curve, it means that, collectively, the bottom $$(100x)\%$$ of the population holds $$(100y)\%$$ of the wealth.

You can see that, as the tail parameter of the Pareto distribution increases, inequality decreases.

This is to be expected, because a higher tail index implies less weight in the tail of the Pareto distribution.

### The Gini Coefficient¶

The definition and interpretation of the Gini coefficient can be found on the corresponding Wikipedia page.

A value of 0 indicates perfect equality (corresponding the case where the Lorenz curve matches the 45 degree line) and a value of 1 indicates complete inequality (all wealth held by the richest household).

The QuantEcon.py library contains a function to calculate the Gini coefficient.

We can test it on the Weibull distribution with parameter $$a$$, where the Gini coefficient is known to be

$G = 1 - 2^{-1/a}$

Let’s see if the Gini coefficient computed from a simulated sample matches this at each fixed value of $$a$$.

The simulation shows that the fit is good.

## A Model of Wealth Dynamics¶

Having discussed inequality measures, let us now turn to wealth dynamics.

The model we will study is

(1)$w_{t+1} = (1 + r_{t+1}) s(w_t) + y_{t+1}$

where

• $$w_t$$ is wealth at time $$t$$ for a given household,
• $$r_t$$ is the rate of return of financial assets,
• $$y_t$$ is current non-financial (e.g., labor) income and
• $$s(w_t)$$ is current wealth net of consumption

Letting $$\{z_t\}$$ be a correlated state process of the form

$z_{t+1} = a z_t + b + \sigma_z \epsilon_{t+1}$

we’ll assume that

$R_t := 1 + r_t = c_r \exp(z_t) + \exp(\mu_r + \sigma_r \xi_t)$

and

$y_t = c_y \exp(z_t) + \exp(\mu_y + \sigma_y \zeta_t)$

Here $$\{ (\epsilon_t, \xi_t, \zeta_t) \}$$ is IID and standard normal in $$\mathbb R^3$$.

(2)$s(w) = s_0 w \cdot \mathbb 1\{w \geq \hat w\}$

where $$s_0$$ is a positive constant.

## Implementation¶

Here’s some type information to help Numba.

Here’s a class that stores instance data and implements methods that update the aggregate state and household wealth.

Here’s function to simulate the time series of wealth for in individual households.

Now here’s function to simulate a cross section of households forward in time.

Note the use of parallelization to speed up computation.

Parallelization is very effective in the function above because the time path of each household can be calculated independently once the path for the aggregate state is known.

## Applications¶

Let’s try simulating the model at different parameter values and investigate the implications for the wealth distribution.

### Time Series¶

Let’s look at the wealth dynamics of an individual household.

Notice the large spikes in wealth over time.

Such spikes are similar to what we observed in time series when we studied Kesten processes.

### Inequality Measures¶

Let’s look at how inequality varies with returns on financial assets.

The next function generates a cross section and then computes the Lorenz curve and Gini coefficient.

Now we investigate how the Lorenz curves associated with the wealth distribution change as return to savings varies.

The code below plots Lorenz curves for three different values of $$\mu_r$$.

If you are running this yourself, note that it will take one or two minutes to execute.

This is unavoidable because we are executing a CPU intensive task.

In fact the code, which is JIT compiled and parallelized, runs extremely fast relative to the number of computations.

The Lorenz curve shifts downwards as returns on financial income rise, indicating a rise in inequality.

Now let’s check the Gini coefficient.

Once again, we see that inequality increases as returns on financial income rise.

Let’s finish this section by investigating what happens when we change the volatility term $$\sigma_r$$ in financial returns.

We see that greater volatility has the effect of increasing inequality in this model.