Skip to content
This repository was archived by the owner on Apr 24, 2020. It is now read-only.

Commit f302dfc

Browse files
authored
Adding a lecture on Kesten processes (#773)
* getting started * misc edits * various edits
1 parent 3222c15 commit f302dfc

File tree

4 files changed

+808
-4
lines changed

4 files changed

+808
-4
lines changed

source/_static/quant-econ.bib

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,83 @@
33
Note: Extended Information (like abstracts, doi, url's etc.) can be found in quant-econ-extendedinfo.bib file in _static/
44
###
55
6+
@techreport{kondo2018us,
7+
title={On the US Firm and Establishment Size Distributions},
8+
author={Kondo, Illenin and Lewis, Logan T and Stella, Andrea},
9+
year={2018},
10+
institution={SSRN}
11+
}
12+
13+
@article{schluter2019size,
14+
title={Size distributions reconsidered},
15+
author={Schluter, Christian and Trede, Mark},
16+
journal={Econometric Reviews},
17+
volume={38},
18+
number={6},
19+
pages={695--710},
20+
year={2019},
21+
publisher={Taylor \& Francis}
22+
}
23+
24+
@article{fujiwara2004pareto,
25+
title={Do Pareto--Zipf and Gibrat laws hold true? An analysis with
26+
European firms},
27+
author={Fujiwara, Yoshi and Di Guilmi, Corrado and Aoyama, Hideaki and
28+
Gallegati, Mauro and Souma, Wataru},
29+
journal={Physica A: Statistical Mechanics and its Applications},
30+
volume={335},
31+
number={1-2},
32+
pages={197--216},
33+
year={2004},
34+
publisher={Elsevier}
35+
}
36+
37+
@article{dunne1989growth,
38+
title={The growth and failure of US manufacturing plants},
39+
author={Dunne, Timothy and Roberts, Mark J and Samuelson, Larry},
40+
journal={The Quarterly Journal of Economics},
41+
volume={104},
42+
number={4},
43+
pages={671--698},
44+
year={1989},
45+
publisher={MIT Press}
46+
}
47+
48+
@article{hall1987relationship,
49+
title={The Relationship Between Firm Size and Firm Growth in the US
50+
Manufacturing Sector},
51+
author={Hall, Bronwyn H},
52+
journal={The Journal of Industrial Economics},
53+
pages={583--606},
54+
year={1987},
55+
publisher={JSTOR}
56+
}
57+
58+
@article{evans1987relationship,
59+
title={The relationship between firm growth, size, and age: Estimates for
60+
100 manufacturing industries}, author={Evans, David S},
61+
journal={The Journal of Industrial Economics},
62+
pages={567--581},
63+
year={1987},
64+
publisher={JSTOR}
65+
}
66+
67+
@phdthesis{gibrat1931inegalites,
68+
title={Les in{\'e}galit{\'e}s {\'e}conomiques: Applications d'une loi
69+
nouvelle, la loi de l'effet proportionnel},
70+
author={Gibrat, Robert},
71+
year={1931},
72+
school={Recueil Sirey}
73+
}
74+
75+
@book{buraczewski2016stochastic,
76+
title={Stochastic models with power-law tails},
77+
author={Buraczewski, Dariusz and Damek, Ewa and Mikosch, Thomas and others},
78+
year={2016},
79+
publisher={Springer}
80+
}
81+
82+
683
@inproceedings{nishiyama2004estimation,
784
title={Estimation and testing for rank size rule regression under pareto
885
distribution},

source/rst/heavy_tails.rst

Lines changed: 173 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ settings include
5555

5656
* the distribution of city sizes (:cite:`rozenfeld2011area`, :cite:`gabaix2016power`).
5757

58-
These heavy tails turn out to be important for our understanding economic outcomes and their impact.
58+
These heavy tails turn out to be important for our understanding of economic outcomes.
5959

6060
As one example, the heaviness of the tail in the wealth distribution is one
6161
natural measure of inequality.
@@ -341,7 +341,7 @@ for some positive constants :math:`\bar x` and :math:`\alpha`.
341341

342342
It is easy to see that if :math:`X \sim F`, then :math:`\mathbb P\{X > x\}` satisfies :eq:`plrt`.
343343

344-
Thus, in line with the terminology, a Pareto distributed random variables have a Pareto tail.
344+
Thus, in line with the terminology, Pareto distributed random variables have a Pareto tail.
345345

346346

347347
Rank-Size Plots
@@ -362,11 +362,11 @@ A discussion of why this occurs can be found in :cite:`nishiyama2004estimation`.
362362

363363
The figure below provides one example, using simulated data.
364364

365-
The rank-size plots shows draws from three different distributions: folded normal, chi squared with 1 degree of freedom and Pareto.
365+
The rank-size plots shows draws from three different distributions: folded normal, chi-squared with 1 degree of freedom and Pareto.
366366

367367
In each case, the largest 5\% of 1,000 draws are shown.
368368

369-
The Pareto sample produces a straight line, while the line produced by the other samples is concave.
369+
The Pareto sample produces a straight line, while the lines produced by the other samples are concave.
370370

371371
.. _rank_size_fig1:
372372

@@ -413,6 +413,66 @@ Replicate the rank-size plot figure :ref:`presented above <rank_size_fig1>`.
413413
Use ``np.random.seed(13)`` to set the seed.
414414

415415

416+
Exercise 5
417+
----------
418+
419+
There is an ongoing argument about whether the firm size distribution should
420+
be modeled as a Pareto distribution or a lognormal distribution (see, e.g.,
421+
:cite:`fujiwara2004pareto`, :cite:`kondo2018us` or :cite:`schluter2019size`).
422+
423+
This sounds esoteric but has real implications for a variety of economic
424+
phenomena.
425+
426+
To illustrate this fact in a simple way, let us consider an economy with
427+
100,000 firms, an interest rate of ``r = 0.05`` and a corporate tax rate of
428+
15%.
429+
430+
Your task is to estimate the present discounted value of projected corporate
431+
tax revenue over the next 10 years.
432+
433+
Because we are forecasting, we need a model.
434+
435+
We will suppose that
436+
437+
1. the number of firms and the firm size distribution (measured in profits) remain fixed and
438+
439+
2. the firm size distribution is either lognormal or Pareto.
440+
441+
Present discounted value of tax revenue will be estimated by
442+
443+
1. generating 100,000 draws of firm profit from the firm size distribution,
444+
445+
2. multiplying by the tax rate, and
446+
447+
#. summing the results with discounting to obtain present value.
448+
449+
The Pareto distribution is assumed to take the form :eq:`pareto` with :math:`\bar x = 1` and :math:`\alpha = 1.05`.
450+
451+
(The value the tail index :math:`\alpha` is plausible given the data :cite:`gabaix2016power`.)
452+
453+
To make the lognormal option as similar as possible to the Pareto option,
454+
choose its parameters such that the mean and median of both distributions are
455+
the same.
456+
457+
Note that, for each distribution, your estimate of tax revenue will be random
458+
because it is based on a finite number of draws.
459+
460+
To take this into account, generate 100 draws in each case and compare the two
461+
samples by
462+
463+
* producing a `violin plot <https://en.wikipedia.org/wiki/Violin_plot>`__ visualizing the two samples side-by-side and
464+
465+
* printing the mean and standard deviation of both samples.
466+
467+
For the seed use ``np.random.seed(1234)``.
468+
469+
What differences do you observe?
470+
471+
(Note: a better approach to this problem would be to model firm dynamics and
472+
try to track individual firms given the current distribution. We will discuss
473+
firm dynamics in later lectures.)
474+
475+
416476

417477
Solutions
418478
=========
@@ -556,3 +616,112 @@ First we will create a function and then generate the plot
556616
plt.show()
557617
558618
619+
Exercise 5
620+
----------
621+
622+
To do the exercise, we need to choose the parameters :math:`\mu`
623+
and :math:`\sigma` of the lognormal distribution to match the mean and median
624+
of the Pareto distribution.
625+
626+
Here we understand the lognormal distribution as that of the random variable
627+
:math:`\exp(\mu + \sigma Z)` when :math:`Z` is standard normal.
628+
629+
The mean and median of the Pareto distribution :eq:`pareto` with
630+
:math:`\bar x = 1` are
631+
632+
.. math::
633+
634+
\text{mean } = \frac{\alpha}{\alpha - 1}
635+
\quad \text{and} \quad
636+
\text{median } = 2^{1/\alpha}
637+
638+
Using the corresponding expressions for the lognormal distribution leads us to
639+
the equations
640+
641+
.. math::
642+
\frac{\alpha}{\alpha - 1} = \exp(\mu + \sigma^2/2)
643+
\quad \text{and} \quad
644+
2^{1/\alpha} = \exp(\mu)
645+
646+
which we solve for :math:`\mu` and :math:`\sigma` given :math:`\alpha = 1.05`
647+
648+
Here is code that generates the two samples, produces the violin plot and
649+
prints the mean and standard deviation of the two samples.
650+
651+
652+
.. code:: ipython3
653+
654+
num_firms = 100_000
655+
num_years = 10
656+
tax_rate = 0.15
657+
r = 0.05
658+
659+
β = 1 / (1 + r) # discount factor
660+
661+
x_bar = 1.0
662+
α = 1.05
663+
664+
def pareto_rvs(n):
665+
"Uses a standard method to generate Pareto draws."
666+
u = np.random.uniform(size=n)
667+
y = x_bar / (u**(1/α))
668+
return y
669+
670+
Let's compute the lognormal parameters:
671+
672+
.. code:: ipython3
673+
674+
μ = np.log(2) / α
675+
σ_sq = 2 * (np.log(α/(α - 1)) - np.log(2)/α)
676+
σ = np.sqrt(σ_sq)
677+
678+
Here's a function to compute a single estimate of tax revenue for a particular
679+
choice of distribution ``dist``.
680+
681+
.. code:: ipython3
682+
683+
def tax_rev(dist):
684+
tax_raised = 0
685+
for t in range(num_years):
686+
if dist == 'pareto':
687+
π = pareto_rvs(num_firms)
688+
else:
689+
π = np.exp(μ + σ * np.random.randn(num_firms))
690+
tax_raised += β**t * np.sum(π * tax_rate)
691+
return tax_raised
692+
693+
Now let's generate the violin plot.
694+
695+
.. code:: ipython3
696+
697+
num_reps = 100
698+
np.random.seed(1234)
699+
700+
tax_rev_lognorm = np.empty(num_reps)
701+
tax_rev_pareto = np.empty(num_reps)
702+
703+
for i in range(num_reps):
704+
tax_rev_pareto[i] = tax_rev('pareto')
705+
tax_rev_lognorm[i] = tax_rev('lognorm')
706+
707+
fig, ax = plt.subplots()
708+
709+
data = tax_rev_pareto, tax_rev_lognorm
710+
711+
ax.violinplot(data)
712+
713+
plt.show()
714+
715+
Finally, let's print the means and standard deviations.
716+
717+
.. code:: ipython3
718+
719+
tax_rev_pareto.mean(), tax_rev_pareto.std()
720+
721+
.. code:: ipython3
722+
723+
tax_rev_lognorm.mean(), tax_rev_lognorm.std()
724+
725+
726+
Looking at the output of the code, our main conclusion is that the Pareto
727+
assumption leads to a lower mean and greater dispersion.

source/rst/index_intro_dynam.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ agents as given. Later we will look at full equilibrium problems.
2525
finite_markov
2626
linear_models
2727
samuelson
28+
kesten_processes
2829
stationary_densities
2930
cass_koopmans
3031
kalman

0 commit comments

Comments
 (0)