You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lectures/wealth_dynamics.md
+56-86Lines changed: 56 additions & 86 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,15 +38,13 @@ tags: [hide-output]
38
38
39
39
## Overview
40
40
41
-
This notebook gives an introduction to wealth distribution dynamics, with a
42
-
focus on
41
+
This notebook gives an introduction to wealth distribution dynamics, with a focus on
43
42
44
43
* modeling and computing the wealth distribution via simulation,
45
44
* measures of inequality such as the Lorenz curve and Gini coefficient, and
46
45
* how inequality is affected by the properties of wage income and returns on assets.
47
46
48
-
One interesting property of the wealth distribution we discuss is Pareto
49
-
tails.
47
+
One interesting property of the wealth distribution we discuss is **Pareto tails**.
50
48
51
49
The wealth distribution in many countries exhibits a Pareto tail
52
50
@@ -59,14 +57,13 @@ It also gives us a way to quantify such concentration, in terms of the tail inde
59
57
60
58
One question of interest is whether or not we can replicate Pareto tails from a relatively simple model.
61
59
62
-
### A Note on Assumptions
60
+
### A note on assumptions
63
61
64
-
The evolution of wealth for any given household depends on their
65
-
savings behavior.
62
+
The evolution of wealth for any given household depends on their savings behavior.
66
63
67
64
Modeling such behavior will form an important part of this lecture series.
68
65
69
-
However, in this particular lecture, we will be content with rather ad hoc (but plausible) savings rules.
66
+
However, in this particular lecture, we will be content with rather *ad hoc* (but plausible) savings rules.
70
67
71
68
We do this to more easily explore the implications of different specifications of income dynamics and investment returns.
72
69
@@ -82,14 +79,13 @@ from numba import jit, float64, prange
82
79
from numba.experimental import jitclass
83
80
```
84
81
85
-
## Lorenz Curves and the Gini Coefficient
82
+
## Lorenz curves and the Gini coefficient
86
83
87
-
Before we investigate wealth dynamics, we briefly review some measures of
88
-
inequality.
84
+
Before we investigate wealth dynamics, we briefly review some measures of inequality.
89
85
90
-
### Lorenz Curves
86
+
### Lorenz curves
91
87
92
-
One popular graphical measure of inequality is the [Lorenz curve](https://en.wikipedia.org/wiki/Lorenz_curve).
88
+
One popular graphical measure of inequality is the **Lorenz curve**.
93
89
94
90
The package [QuantEcon.py](https://github.com/QuantEcon/QuantEcon.py), already imported above, contains a function to compute Lorenz curves.
95
91
@@ -116,21 +112,17 @@ plt.show()
116
112
117
113
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.
118
114
119
-
The "equality" line is the 45 degree line (which might not be exactly 45
120
-
degrees in the figure, depending on the aspect ratio).
115
+
The "equality" line is the 45 degree line (which might not be exactly 45 degrees in the figure, depending on the aspect ratio).
121
116
122
-
A sample that produces this line exhibits perfect equality.
117
+
A sample that produces this line exhibits **perfect equality**.
123
118
124
119
The other line in the figure is the Lorenz curve for the lognormal sample, which deviates significantly from perfect equality.
125
120
126
121
For example, the bottom 80% of the population holds around 40% of total wealth.
127
122
128
-
Here is another example, which shows how the Lorenz curve shifts as the
129
-
underlying distribution changes.
123
+
Here is another example, which shows how the Lorenz curve shifts as the underlying distribution changes.
130
124
131
-
We generate 10,000 observations using the Pareto distribution with a range of
132
-
parameters, and then compute the Lorenz curve corresponding to each set of
133
-
observations.
125
+
We generate 10,000 observations using the Pareto distribution with a range of parameters, and then compute the Lorenz curve corresponding to each set of observations.
134
126
135
127
```{code-cell} ipython3
136
128
a_vals = (1, 2, 5) # Pareto tail index
@@ -150,13 +142,11 @@ You can see that, as the tail parameter of the Pareto distribution increases, in
150
142
151
143
This is to be expected, because a higher tail index implies less weight in the tail of the Pareto distribution.
152
144
153
-
### The Gini Coefficient
145
+
### The Gini coefficient
154
146
155
-
The definition and interpretation of the Gini coefficient can be found on the corresponding [Wikipedia page](https://en.wikipedia.org/wiki/Gini_coefficient).
147
+
The definition and interpretation of the **Gini coefficient** can be found on the corresponding [Wikipedia page](https://en.wikipedia.org/wiki/Gini_coefficient).
156
148
157
-
A value of 0 indicates perfect equality (corresponding the case where the
158
-
Lorenz curve matches the 45 degree line) and a value of 1 indicates complete
159
-
inequality (all wealth held by the richest household).
149
+
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).
160
150
161
151
The [QuantEcon.py](https://github.com/QuantEcon/QuantEcon.py) library contains a function to calculate the Gini coefficient.
162
152
@@ -166,8 +156,7 @@ $$
166
156
G = 1 - 2^{-1/a}
167
157
$$
168
158
169
-
Let's see if the Gini coefficient computed from a simulated sample matches
170
-
this at each fixed value of $a$.
159
+
Let's see if the Gini coefficient computed from a simulated sample matches this at each fixed value of $a$.
171
160
172
161
```{code-cell} ipython3
173
162
a_vals = range(1, 20)
@@ -190,7 +179,7 @@ plt.show()
190
179
191
180
The simulation shows that the fit is good.
192
181
193
-
## A Model of Wealth Dynamics
182
+
## A model of wealth dynamics
194
183
195
184
Having discussed inequality measures, let us now turn to wealth dynamics.
196
185
@@ -212,28 +201,26 @@ where
212
201
Letting $\{z_t\}$ be a correlated state process of the form
Here $\{ (\epsilon_t, \xi_t, \zeta_t) \}$ is IID and standard
231
-
normal in $\mathbb R^3$.
219
+
Here $\{ (ε_t, ξ_t, ζ_t) \}$ is IID and standard normal in $\mathbb R^3$.
232
220
233
-
The value of $c_r$ should be close to zero, since rates of return
234
-
on assets do not exhibit large trends.
221
+
The value of $c_r$ should be close to zero, since rates of return on assets do not exhibit large trends.
235
222
236
-
When we simulate a population of households, we will assume all shocks are idiosyncratic (i.e., specific to individual households and independent across them).
223
+
When we simulate a population of households, we will assume all shocks are *idiosyncratic* (i.e., specific to individual households and independent across them).
237
224
238
225
Regarding the savings function $s$, our default model will be
Parallelization is very effective in the function above because the time path
410
-
of each household can be calculated independently once the path for the
411
-
aggregate state is known.
395
+
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.
412
396
413
397
## Applications
414
398
415
-
Let's try simulating the model at different parameter values and investigate
416
-
the implications for the wealth distribution.
399
+
Let's try simulating the model at different parameter values and investigate the implications for the wealth distribution.
417
400
418
-
### Time Series
401
+
### Time series
419
402
420
403
Let's look at the wealth dynamics of an individual household.
421
404
@@ -435,12 +418,11 @@ Notice the large spikes in wealth over time.
435
418
436
419
Such spikes are similar to what we observed in time series when {doc}`we studied Kesten processes <kesten_processes>`.
437
420
438
-
### Inequality Measures
421
+
### Inequality measures
439
422
440
423
Let's look at how inequality varies with returns on financial assets.
441
424
442
-
The next function generates a cross section and then computes the Lorenz
443
-
curve and Gini coefficient.
425
+
The next function generates a cross section and then computes the Lorenz curve and Gini coefficient.
ax.plot(f_vals, l_vals, label=fr'$\psi^*$ at $\mu_r = {μ_r:0.2}$')
460
+
ax.plot(f_vals, l_vals, label=fr'$\psi^*$ at $μ_r = {μ_r:0.2}$')
479
461
gini_vals.append(gv)
480
462
481
463
ax.plot(f_vals, f_vals, label='equality')
@@ -485,29 +467,23 @@ plt.show()
485
467
486
468
The Lorenz curve shifts downwards as returns on financial income rise, indicating a rise in inequality.
487
469
488
-
We will look at this again via the Gini coefficient immediately below, but
489
-
first consider the following image of our system resources when the code above
490
-
is executing:
470
+
We will look at this again via the Gini coefficient immediately below, but first consider the following image of our system resources when the code above is executing:
491
471
492
-
Since the code is both efficiently JIT compiled and fully parallelized, it's
493
-
close to impossible to make this sequence of tasks run faster without changing
494
-
hardware.
472
+
Since the code is both efficiently JIT compiled and fully parallelized, it's close to impossible to make this sequence of tasks run faster without changing hardware.
ax.plot(f_vals, l_vals, label=fr'$\psi^*$ at $\sigma_r = {σ_r:0.2}$')
499
+
ax.plot(f_vals, l_vals, label=fr'$\psi^*$ at $σ_r = {σ_r:0.2}$')
524
500
gini_vals.append(gv)
525
501
526
502
ax.plot(f_vals, f_vals, label='equality')
@@ -535,30 +511,26 @@ We see that greater volatility has the effect of increasing inequality in this m
535
511
```{exercise}
536
512
:label: wd_ex1
537
513
538
-
For a wealth or income distribution with Pareto tail, a higher tail index suggests lower inequality.
514
+
For a wealth or income distribution with **Pareto tail**, a higher tail index suggests lower inequality.
539
515
540
-
Indeed, it is possible to prove that the Gini coefficient of the Pareto
541
-
distribution with tail index $a$ is $1/(2a - 1)$.
516
+
Indeed, it is possible to prove that the **Gini coefficient** of the Pareto distribution with tail index $a$ is $1/(2a - 1)$.
542
517
543
518
To the extent that you can, confirm this by simulation.
544
519
545
-
In particular, generate a plot of the Gini coefficient against the tail index
546
-
using both the theoretical value just given and the value computed from a sample via `qe.gini_coefficient`.
520
+
In particular, generate a plot of the Gini coefficient against the tail index using both the theoretical value just given and the value computed from a sample via `qe.gini_coefficient`.
547
521
548
522
For the values of the tail index, use `a_vals = np.linspace(1, 10, 25)`.
549
523
550
524
Use sample of size 1,000 for each $a$ and the sampling method for generating Pareto draws employed in the discussion of Lorenz curves for the Pareto distribution.
551
525
552
-
To the extent that you can, interpret the monotone relationship between the
553
-
Gini index and $a$.
526
+
To the extent that you can, interpret the monotone relationship between the Gini index and $a$.
554
527
```
555
528
556
529
```{solution-start} wd_ex1
557
530
:class: dropdown
558
531
```
559
532
560
-
Here is one solution, which produces a good match between theory and
561
-
simulation.
533
+
Here is one solution, which produces a good match between theory and simulation.
562
534
563
535
```{code-cell} ipython3
564
536
a_vals = np.linspace(1, 10, 25) # Pareto tail index
@@ -575,8 +547,7 @@ ax.legend()
575
547
plt.show()
576
548
```
577
549
578
-
In general, for a Pareto distribution, a higher tail index implies less weight
579
-
in the right hand tail.
550
+
In general, for a Pareto distribution, a higher tail index implies less weight in the right hand tail.
580
551
581
552
This means less extreme values for wealth and hence more equality.
582
553
@@ -589,26 +560,25 @@ More equality translates to a lower Gini index.
589
560
:label: wd_ex2
590
561
```
591
562
592
-
The wealth process {eq}`wealth_dynam_ah` is similar to a {doc}`Kesten process <kesten_processes>`.
563
+
The wealth process {eq}`wealth_dynam_ah` is similar to a **Kesten process**.
593
564
594
565
This is because, according to {eq}`sav_ah`, savings is constant for all wealth levels above $\hat w$.
595
566
596
-
When savings is constant, the wealth process has the same quasi-linear
597
-
structure as a Kesten process, with multiplicative and additive shocks.
567
+
When savings is constant, the wealth process has the same quasi-linear structure as a Kesten process, with multiplicative and additive shocks.
598
568
599
-
The Kesten--Goldie theorem tells us that Kesten processes have Pareto tails under a range of parameterizations.
569
+
The **Kesten--Goldie theorem** tells us that Kesten processes have Pareto tails under a range of parameterizations.
600
570
601
571
The theorem does not directly apply here, since savings is not always constant and since the multiplicative and additive terms in {eq}`wealth_dynam_ah` are not IID.
602
572
603
573
At the same time, given the similarities, perhaps Pareto tails will arise.
604
574
605
-
To test this, run a simulation that generates a cross-section of wealth and
606
-
generate a rank-size plot.
575
+
To test this, run a simulation that generates a cross-section of wealth and generate a rank-size plot.
607
576
608
577
If you like, you can use the function `rank_size` from the `quantecon` library (documentation [here](https://quanteconpy.readthedocs.io/en/latest/tools/inequality.html#quantecon.inequality.rank_size)).
609
578
610
-
In viewing the plot, remember that Pareto tails generate a straight line. Is
611
-
this what you see?
579
+
In viewing the plot, remember that Pareto tails generate a straight line.
0 commit comments