Skip to content

Commit

Permalink
Merge pull request #791 from jdebacker/multi_ind
Browse files Browse the repository at this point in the history
Merging
  • Loading branch information
rickecon authored Jun 30, 2022
2 parents c1146f9 + e7a7f03 commit 97fb7e6
Show file tree
Hide file tree
Showing 89 changed files with 4,006 additions and 1,487 deletions.
21 changes: 21 additions & 0 deletions docs/book/OGCore_references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,16 @@ @ARTICLE{EvansPhillips:2017
pages = {513-533},
}

@ARTICLE{Geary:1950,
AUTHOR = {Roy C. Geary},
TITLE = {A Note on `A Constant-Utility Index of the Cost of Living'},
JOURNAL = {Review of Economics Studies},
YEAR = {1950-51},
volume = {18},
number = {1},
pages = {65-66},
}

@TECHREPORT{MoorePecoraro:2021,
AUTHOR = {Rachel Moore and Brandon Pecoraro},
TITLE = {Quantitative Analysis of a Wealth Tax in the United States: Exclusions, Evasion, and Expenditures},
Expand Down Expand Up @@ -208,6 +218,17 @@ @BOOK{StokeyLucas1989
YEAR = {1989},
}

@ARTICLE{Stone:1954,
AUTHOR = {Richard Stone},
TITLE = {Linear Expenditure Systems and Demand Analysis: An Application to the Pattern of British Demand},
JOURNAL = {The Economic Journal},
YEAR = {1954},
volume = {64},
number = {255},
month = {September},
pages = {511-527},
}

@ARTICLE{Suzumura:1983,
Author = {Kotaro Suzumura},
Journal = {Hitotsubashi Journal of Economics},
Expand Down
2 changes: 1 addition & 1 deletion docs/book/content/api/aggregates.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ ogcore.aggregates

.. automodule:: ogcore.aggregates
:members: get_L, get_I, get_B, get_BQ, get_C, revenue, get_r_p,
resource_constraint, get_K_splits
resource_constraint, get_K_splits, get_ptilde
2 changes: 1 addition & 1 deletion docs/book/content/api/firm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ ogcore.firm
.. automodule:: ogcore.firm
:members: get_Y, get_r, get_w, get_KLratio_old, get_KLratio, get_MPx,
get_w_from_r, get_K, get_K_from_Y, get_L_from_Y,
get_K_from_Y_and_L, get_K_new
get_K_from_Y_and_L, get_K_new, get_pm, solve_L, get_cost_of_capital
5 changes: 3 additions & 2 deletions docs/book/content/api/household.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ ogcore.household
------------------------------------------

.. automodule:: ogcore.household
:members: marg_ut_cons, marg_ut_labor, get_bq, get_tr, get_cons, FOC_savings,
FOC_labor, get_y, constraint_checker_SS, constraint_checker_TPI
:members: marg_ut_cons, marg_ut_labor, get_bq, get_tr, get_cons, get_cm,
FOC_savings, FOC_labor, get_y, constraint_checker_SS,
constraint_checker_TPI
1 change: 0 additions & 1 deletion docs/book/content/api/public_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@ There is also a link to the source code for each documented member.
tax
txfunc
utils
wealth
12 changes: 0 additions & 12 deletions docs/book/content/api/wealth.rst

This file was deleted.

2 changes: 1 addition & 1 deletion docs/book/content/contributing/contributor_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,6 @@ A large set of plots that compare the changes among key variables from the basel
(Sec_ContribFootnotes)=
## Footnotes
[^recent_python]:The most recent version of Python from Anaconda is Python 3.8. `OG-Core` is currently tested to run on Python 3.7 through 3.9.
[^recent_python]:The most recent version of Python from Anaconda is Python 3.8. `OG-Core` is currently tested to run on Python 3.7 through 3.10.
[^commandline_note]:The dollar sign is the end of the command prompt on a Mac. If you are using the Windows operating system, this is usually the right angle bracket (>). No matter the symbol, you don't need to type it (or anything to its left, which shows the current working directory) at the command line before you enter a command; the prompt symbol and preceding characters should already be there.
6 changes: 4 additions & 2 deletions docs/book/content/intro/intro.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
(Chap_Intro)=
# OG-Core

`OG-Core` is the core logic for a country-agnostic overlapping-generations (OG) model of an economy that allows for dynamic general equilibrium analysis of fiscal policy. The model output focuses changes in macroeconomic aggregates (GDP, investment, consumption), wages, interest rates, and the stream of tax revenues over time. Although `OG-Core` can be run independently based on default parameter values (currently representing something similar to the United States), it is meant to be a dependency of a country-specific calibration. This documentation contains the following major sections, which are regularly updated.
`OG-Core` is the core logic for a country-agnostic overlapping-generations (OG) model of an economy that allows for dynamic general equilibrium analysis of fiscal policy. The source code is openly available for download or collaboration at the GitHub repository [www.github.com/PSLmodels/OG-Core](https://github.com/PSLmodels/OG-Core), or you can click on the GitHub icon at the top right of this page.

The model output focuses changes in macroeconomic aggregates (GDP, investment, consumption), wages, interest rates, and the stream of tax revenues over time. Although `OG-Core` can be run independently based on default parameter values (currently representing something similar to the United States), it is meant to be a dependency of a country-specific calibration. This documentation contains the following major sections, which are regularly updated.

* Contributing to `OG-Core`
* `OG-Core` API
Expand All @@ -26,4 +28,4 @@ The model is continuously under development. Users will be notified through [clo
(Sec_CitingOGCore)=
## Citing OG-Core

`OG-Core` (Version #.#.#)[Source code], https://github.com/PSLmodels/OG-Core
`OG-Core` (Version #.#.#)[Source code], https://github.com/PSLmodels/OG-Core.
52 changes: 43 additions & 9 deletions docs/book/content/theory/derivations.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,63 @@

This appendix contains derivations from the theory in the body of this book.

(SecAppDerivCES)=
## Properties of the CES Production Function

The constant elasticity of substitution (CES) production function of capital and labor was introduced by {cite}`Solow:1956` and further extended to a consumption aggregator by {cite}`Armington:1969`. The CES production function of aggregate capital $K_t$ and aggregate labor $L_t$ we use in Chapter {ref}`Chap_Firms` is the following,
(SecAppDerivIndSpecCons)=
## Household first order condition for industry-specific consumption demand

The derivation for the household first order condition for industry-specific consumption demand {eq}`EqHHFOCcm` is the following:
```{math}
:label: EqFirmsCESprodfun
Y_t = F(K_t, K_{g,t}, L_t) \equiv Z_t\biggl[(\gamma)^\frac{1}{\varepsilon}(K_t)^\frac{\varepsilon-1}{\varepsilon} + (\gamma_{g})^\frac{1}{\varepsilon}(K_{g,t})^\frac{\varepsilon-1}{\varepsilon} + (1-\gamma-\gamma_{g})^\frac{1}{\varepsilon}(e^{g_y t}L_t)^\frac{\varepsilon-1}{\varepsilon}\biggr]^\frac{\varepsilon}{\varepsilon-1} \quad\forall t
:label: EqAppDerivHHIndSpecConsFOC
\tilde{p}_{m,t} = \tilde{p}_{j,s,t}\alpha_m(c_{j,m,s,t} - c_{min,m})^{\alpha_m-1}\prod_{u\neq m}^M\left(c_{j,u,s,t} - c_{min,u}\right)^{\alpha_u} \\
\tilde{p}_{m,t}(c_{j,m,s,t} - c_{min,m}) = \tilde{p}_{j,s,t}\alpha_m(c_{j,m,s,t} - c_{min,m})^{\alpha_m}\prod_{u\neq m}^M\left(c_{j,u,s,t} - c_{min,u}\right)^{\alpha_u} \\
\tilde{p}_{m,t}(c_{j,m,s,t} - c_{min,m}) = \tilde{p}_{j,s,t}\alpha_m\prod_{m=1}^M\left(c_{j,m,s,t} - c_{min,m}\right)^{\alpha_m} = \alpha_m \tilde{p}_{j,s,t}c_{j,s,t}
```

where $Y_t$ is aggregate output (GDP), $Z_t$ is total factor productivity, $\gamma$ is a share parameter that represents private capital's share of income in the Cobb-Douglas case ($\varepsilon=1$), $\gamma_{g}$ is public capita's share of income, and $\varepsilon$ is the elasticity of substitution between capital and labor. The stationary version of this production function is given in Chapter {ref}`Chap_Stnrz`. We drop the $t$ subscripts, the ``$\:\,\hat{}\,\:$'' stationary notation, and use the stationarized version of the production function {eq}`EqStnrzCESprodfun` for simplicity.

(SecAppDerivCES)=
## Properties of the CES Production Function

The constant elasticity of substitution (CES) production function of capital and labor was introduced by {cite}`Solow:1956` and further extended to a consumption aggregator by {cite}`Armington:1969`. The CES production function of private capital $K$, public capital $K_g$ and labor $L$ we use in Chapter {ref}`Chap_Firms` is the following,

```{math}
:label: EqStnrzCESprodfun
Y= Z\biggl[(\gamma)^\frac{1}{\varepsilon}(K)^\frac{\varepsilon-1}{\varepsilon} + (\gamma_{g})^\frac{1}{\varepsilon}(K_{g})^\frac{\varepsilon-1}{\varepsilon} + (1-\gamma-\gamma_{g})^\frac{1}{\varepsilon}(L)^\frac{\varepsilon-1}{\varepsilon}\biggr]^\frac{\varepsilon}{\varepsilon-1} \quad\forall t
````
:label: EqAppDerivCESprodfun
Y &= F(K, K_g, L) \\
&\equiv Z\biggl[(\gamma)^\frac{1}{\varepsilon}(K)^\frac{\varepsilon-1}{\varepsilon} + (\gamma_g)^\frac{1}{\varepsilon}(K_g)^\frac{\varepsilon-1}{\varepsilon} + (1-\gamma-\gamma_g)^\frac{1}{\varepsilon}(L)^\frac{\varepsilon-1}{\varepsilon}\biggr]^\frac{\varepsilon}{\varepsilon-1}
```

where $Y$ is aggregate output (GDP), $Z$ is total factor productivity, $\gamma$ is a share parameter that represents private capital's share of income in the Cobb-Douglas case ($\varepsilon=1$), $\gamma_g$ is public capital's share of income, and $\varepsilon$ is the elasticity of substitution between capital and labor. The stationary version of this production function is given in Chapter {ref}`Chap_Stnrz`. We drop the $m$ and $t$ subscripts, the ``$\:\,\hat{}\,\:$'' stationary notation, and use the stationarized version of the production function for simplicity.

The Cobb-Douglas production function is a nested case of the general CES production function with unit elasticity $\varepsilon=1$.
```{math}
:label: EqAppDerivCES_CobbDoug
Y = Z(K)^\gamma(K_{g})^{\gamma_{g}}(L)^{1-\gamma-\gamma_{g}}
```

The marginal productivity of private capital $MPK$ is the derivative of the production function with respect to private capital $K$. Let the variable $\Omega$ represent the expression inside the square brackets in the production function {eq}`EqAppDerivCESprodfun`.
```{math}
:label: EqAppDerivCES_MPK
MPK &\equiv \frac{\partial F}{\partial K} = \left(\frac{\varepsilon}{\varepsilon-1}\right)Z\left[\Omega\right]^\frac{1}{\varepsilon-1}\gamma^\frac{1}{\varepsilon}\left(\frac{\varepsilon-1}{\varepsilon}\right)(K)^{-\frac{1}{\varepsilon}} \\
&= Z\left[\Omega\right]^\frac{1}{\varepsilon-1}\left(\frac{\gamma}{K}\right)^\frac{1}{\varepsilon} = \frac{Z\left[\Omega\right]^\frac{1}{\varepsilon-1}}{Z^\frac{1}{\varepsilon-1}\left[\Omega\right]^\frac{1}{\varepsilon-1}}\left(\frac{\gamma}{K}\right)^\frac{1}{\varepsilon}Y^\frac{1}{\varepsilon} \\
&= (Z)^\frac{\varepsilon-1}{\varepsilon}\left(\gamma\frac{Y}{K}\right)^\frac{1}{\varepsilon}
```

The marginal productivity of public capital $MPK_g$ is the derivative of the production function with respect to public capital $K_g$.
```{math}
:label: EqAppDerivCES_MPKg
MPK_g &\equiv \frac{\partial F}{\partial K_g} = \left(\frac{\varepsilon}{\varepsilon-1}\right)Z\left[\Omega\right]^\frac{1}{\varepsilon-1}\gamma_g^\frac{1}{\varepsilon}\left(\frac{\varepsilon-1}{\varepsilon}\right)(K_g)^{-\frac{1}{\varepsilon}} \\
&= Z\left[\Omega\right]^\frac{1}{\varepsilon-1}\left(\frac{\gamma_g}{K_g}\right)^\frac{1}{\varepsilon} = \frac{Z\left[\Omega\right]^\frac{1}{\varepsilon-1}}{Z^\frac{1}{\varepsilon-1}\left[\Omega\right]^\frac{1}{\varepsilon-1}}\left(\frac{\gamma_g}{K_g}\right)^\frac{1}{\varepsilon}Y^\frac{1}{\varepsilon} \\
&= (Z)^\frac{\varepsilon-1}{\varepsilon}\left(\gamma_g\frac{Y}{K_g}\right)^\frac{1}{\varepsilon}
```

The marginal productivity of labor $MPL$ is the derivative of the production function with respect to labor $L$.
```{math}
:label: EqAppDerivCES_MPL
MPL &\equiv \frac{\partial F}{\partial L} = \left(\frac{\varepsilon}{\varepsilon-1}\right)Z\left[\Omega\right]^\frac{1}{\varepsilon-1}(1-\gamma-\gamma_g)^\frac{1}{\varepsilon}\left(\frac{\varepsilon-1}{\varepsilon}\right)(L)^{-\frac{1}{\varepsilon}} \\
&= Z\left[\Omega\right]^\frac{1}{\varepsilon-1}\left(\frac{1-\gamma-\gamma_g}{L}\right)^\frac{1}{\varepsilon} = \frac{Z\left[\Omega\right]^\frac{1}{\varepsilon-1}}{Z^\frac{1}{\varepsilon-1}\left[\Omega\right]^\frac{1}{\varepsilon-1}}\left(\frac{1-\gamma-\gamma_g}{L}\right)^\frac{1}{\varepsilon}Y^\frac{1}{\varepsilon} \\
&= (Z)^\frac{\varepsilon-1}{\varepsilon}\left([1-\gamma-\gamma_g]\frac{Y}{L}\right)^\frac{1}{\varepsilon}
```


(SecAppDerivCESwr)=
### Wages as a function of interest rates

Expand Down
Loading

0 comments on commit 97fb7e6

Please sign in to comment.