Skip to content

Commit 0cd89f6

Browse files
committed
update docs to reduce jb warnings
1 parent 72f82b7 commit 0cd89f6

File tree

9 files changed

+52
-50
lines changed

9 files changed

+52
-50
lines changed

docs/book/citations.bib

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,6 @@ @TECHREPORT{DeBackerEtAl:2017b
77
month = {January},
88
}
99

10-
@Article{DEP:2019,
11-
author={Jason DeBacker and Richard W. Evans and Kerk L. Phillips},
12-
title={{Integrating Microsimulation Models of Tax Policy into a {DGE} Macroeconomic Model}},
13-
journal={Public Finance Review},
14-
year=2019,
15-
volume={47},
16-
number={2},
17-
pages={207-275},
18-
month={March},
19-
keywords={microsimulation; effective tax rates; marginal tax rates; dynamic general equilibrium; dynamic scori},
20-
doi={},
21-
abstract={This article proposes a method for integrating individual effective tax rates and marginal tax rates computed from a microsimulation (partial equilibrium) model of tax policy with a dynamic general equilibrium model of tax policy that can provide macroeconomic analysis or dynamic scores of tax reforms. Our approach captures the rich heterogeneity, realistic demographics, and tax-code detail of the microsimulation model and allows this detail to inform a general equilibrium model with a relatively high degree of heterogeneity. In addition, we propose a functional form in which tax rates depend jointly on the levels of both capital income and labor income.},
22-
url={https://ideas.repec.org/a/sae/pubfin/v47y2019i2p207-275.html}
23-
}
24-
2510
@TECHREPORT{Pomerleau2020b,
2611
AUTHOR = {Kyle Pomerleau},
2712
TITLE = {An analysis of {J}oe {B}iden’s tax proposals, {O}ctober 2020 update},

docs/book/content/api/utils.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ogcore.utils
1111
.. currentmodule:: ogcore.utils
1212

1313
.. autoclass:: Inequality
14-
:members: gini, var_of_logs, ratio_pct1_pct2, pct, topshare
14+
:members: gini, var_of_logs, ratio_pct1_pct2, pct, top_share
1515

1616
.. autoclass:: CustomHttpAdapter
1717
:members: init_poolmanager

docs/book/content/contributing/contributor_guide.md

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,36 +29,36 @@ If you have already completed the {ref}`Sec_SetupPython` and {ref}`Sec_SetupGit`
2929

3030
6. Create a local repo by entering at the command line the text after the $.[^commandline_note] This step creates a directory called `OG-Core` in the directory that you specified in the prior step:
3131

32-
```
32+
```console
3333
git clone https://github.com/[github-username]/OG-Core.git
3434
```
3535

3636
7. From your command line or terminal, navigate to your local `OG-Core` directory.
3737

3838
8. Make it easier to [push](https://help.github.com/articles/github-glossary/#pull) your local work to others and [pull](https://help.github.com/articles/github-glossary/#pull) others' work to your local machine by entering at the command line:
3939

40-
```
40+
```console
4141
$ cd OG-Core
4242
OG-Core$ git remote add upstream https://github.com/PSLmodels/OG-Core.git
4343
```
4444

4545
9. Create a conda environment with all of the necessary packages to
4646
execute the source code:
4747

48-
```
48+
```console
4949
OG-Core$ conda env create
5050
```
5151

5252
10. The prior command will create a conda environment called `ogcore-dev`.
5353
Activate this environment as follows:
5454

55-
```
55+
```console
5656
OG-Core$ conda activate ogcore-dev
5757
```
5858

5959
11. To make sure that the `ogcore` Python package from the `OG-Core` repository is installed and operational in your `ogcore-dev` conda environment, type the following command at your command prompt.
6060

61-
```
61+
```console
6262
OG-Core$ pip install -e .
6363
```
6464

@@ -75,7 +75,6 @@ Don't be alarmed if the above paragraph is confusing. The following
7575
section introduces some standard Git practices and guides you through
7676
the contribution process.
7777

78-
7978
(Sec_Workflow)=
8079
## Workflow
8180

@@ -84,7 +83,6 @@ the contribution process.
8483

8584
GitHub "issues" are an excellent way to ask questions, include code examples, and tag specific GitHub users.
8685

87-
8886
(Sec_GitHubPR)=
8987
### Submitting a GitHub Pull Request
9088

@@ -100,60 +98,75 @@ situations, in which case other contributors are here to help.
10098
Navigate to your local `OG-Core` directory and enter the
10199
following text at the command line:
102100

103-
```
101+
```console
104102
OG-Core$ git checkout master
105103
```
106104

107105
b. Download all of the content from the central `OG-Core` repo:
108-
```
106+
107+
```console
109108
OG-Core$ git fetch upstream
110109
```
110+
111111
c. Update your local master branch to contain the latest content of
112112
the central master branch using [merge](https://help.github.com/articles/github-glossary/#merge). This step ensures that
113113
you are working with the latest version of `OG-Core`:
114-
```
114+
115+
```console
115116
OG-Core$ git merge upstream/master
116117
```
118+
117119
d. Push the updated master branch in your local repo to your GitHub repo:
118-
```
120+
121+
```console
119122
OG-Core$ git push origin master
120123
```
124+
121125
2. Create a new [branch](https://help.github.com/articles/github-glossary/#branch) on your local machine. Think of your
122126
branches as a way to organize your projects. If you want to work on
123127
this documentation, for example, create a separate branch for that
124128
work. If you want to change an element of the `OG-Core` model, create
125129
a different branch for that project:
126-
```
130+
131+
```console
127132
OG-Core$ git checkout -b [new-branch-name]
128133
```
134+
129135
3. As you make changes, frequently check that your changes do not
130136
introduce bugs or degrade the accuracy of the `OG-Core`. To do
131137
this, run the following command from the command line from inside
132138
the `OG-Core/ogcore` directory:
133-
```
139+
140+
```console
134141
OG-Core/ogcore$ pytest
135142
```
143+
136144
Note that running this full suite of tests may take more than 6 hours (depending on your hardware). To run the subset of tests that run on each pull request (and take about 40 minutes), use `pytest -m "not local"`. If the tests do not pass, try to fix the issue by using the information provided by the error message. If this isn't possible or doesn't work, the core maintainers are here to help via a [GitHub Issue](https://github.com/PSLmodels/OG-Core/issues).
137145

138146
4. Now you're ready to [commit](https://help.github.com/articles/github-glossary/#commit) your changes to your local repo using the code below. The first line of code tells `Git` to track a file. Use the `git status` command to find all the files you have edited, and `git add` command to add each of the files that you would like `Git` to track. As a rule, do not add large files. If you'd like to add a file that is larger than 25 MB, please contact the other contributors and ask how to proceed. The second line of code commits your changes to your local repo and allows you to create a commit message. This should be a short description of your changes.
139147

140148
*Tip*: Committing often is a good idea as `Git` keeps a record of your changes. This means that you can always revert to a previous version of your work if you need to. Do this to commit:
141-
```
149+
150+
```console
142151
OG-Core$ git add [filename]
143152
OG-Core$ git commit -m "[description-of-your-commit]"
144153
```
145154

146155
5. Periodically, make sure that the branch you created in step 2 is in sync with the changes other contributors are making to the central master branch by fetching upstream and merging upstream/master into your branch:
147-
```
156+
157+
```console
148158
OG-Core$ git fetch upstream
149159
OG-Core$ git merge upstream/master
150160
```
161+
151162
You may need to resolve conflicts that arise when another contributor changed the same section of code that you are changing. Feel free to ask other contributors for guidance if this happens to you. If you do need to fix a merge conflict, re-run the test suite afterwards (step 4.)
152163

153164
6. When you are ready for other team members to review your code, make your final commit and push your local branch to your remote repo:
154-
```
165+
166+
```console
155167
OG-Core$ git push origin [new-branch-name]
156168
```
169+
157170
7. From the GitHub.com user interface, [open a pull request](https://help.github.com/articles/creating-a-pull-request/#creating-the-pull-request).
158171

159172
8. When you open a GitHub pull request, a code coverage report will be automatically generated. If your branch adds new code that is not tested, the code coverage percent will decline and the number of untested statements ("misses" in the report) will increase. If this happens, you need to add to your branch one or more tests of your newly added code. Add tests so that the number of untested statements is the same as it is on the master branch.
@@ -166,13 +179,13 @@ situations, in which case other contributors are here to help.
166179

167180
1. Navigate to your local `OG-Core` repository in the terminal of your local machine and activate the `ogcore-dev` conda environment. If you have not created the `ogcore-dev` conda environment, follow steps 1-11 in Section {ref}`Sec_SetupGit` above.
168181

169-
```
182+
```console
170183
OG-Core$ conda activate ogcore-dev
171184
```
172185

173186
2. Run the Python example script [`OG-Core/run_examples/run_ogcore_example.py`](https://github.com/PSLmodels/OG-Core/blob/master/run_examples/run_ogcore_example.py) by entering the following command in your terminal in your local machine `OG-Core` repository with the `ogcore-dev` conda environment activated.
174187

175-
```
188+
```console
176189
(ogcore-dev) OG-Core$ python ./run_examples/run_ogcore_example.py
177190
```
178191

docs/book/content/theory/demographics.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ kernelspec:
1111
name: ogcore-dev
1212
---
1313

14-
(glue)=
1514

1615
(Chap_Demog)=
1716
# Demographics

docs/book/content/theory/equilibrium.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ The computational algorithm for solving for the steady-state follows the steps b
9090
:label: EqSS_HHeul_bS
9191
(\bar{c}_{j,E+S})^{-\sigma} = e^{-\sigma g_y}\chi^b_j(\bar{b}_{j,E+S+1})^{-\sigma} \quad\forall j
9292
```
93-
6. Determine from the quantity of the composite consumption good consumed by each household, $\bar{c}_{j,s}$, use equation {eq}`EqHH_cmDem` to determine consumption of each output good, $\bar{c}_{m,j,s}$
93+
6. Determine from the quantity of the composite consumption good consumed by each household, $\bar{c}_{j,s}$, use equation {eq}`EqStnrz_cmDem2` to determine consumption of each output good, $\bar{c}_{m,j,s}$
9494
7. Using $\bar{c}_{m,j,s}$ in {eq}`EqCmt`, solve for aggregate consumption of each output good, $\bar{C}_{m}$
9595
8. Given values for $\bar{n}_{j,s}$ and $\bar{b}_{j,s+1}$ for all $j$ and $s$, solve for steady-state labor supply, $\bar{L}$, savings, $\bar{B}$
9696
1. Use $\bar{n}_{j,s}$ and the steady-state version of the stationarized labor market clearing equation {eq}`EqStnrzMarkClrLab` to get a value for $\bar{L}^{i}$.
@@ -196,7 +196,7 @@ Under alternative model configurations, the solution algorithm changes slightly.
196196
(SecSSeqlbResults)=
197197
### Steady-state results: default specification
198198
199-
[TODO: Update the results in this section.] In this section, we use the baseline calibration described in Chapter {ref}`Chap_Calibr`, which includes the baseline tax law from `Tax-Calculator`, to show some steady-state results from `OG-Core`. Figures {numref}`FigSSeqlbHHcons`, {numref}`FigSSeqlbHHlab`, and {numref}`FigSSeqlbHHsave` show the household steady-state variables by age $s$ and lifetime income group $j$.
199+
[TODO: Update the results in this section.] In this section, we use the baseline calibration described in Chapter {ref}`Chap_Calib`, which includes the baseline tax law from `Tax-Calculator`, to show some steady-state results from `OG-Core`. Figures {numref}`FigSSeqlbHHcons`, {numref}`FigSSeqlbHHlab`, and {numref}`FigSSeqlbHHsave` show the household steady-state variables by age $s$ and lifetime income group $j$.
200200
201201
```{figure} ./images/HHcons_SS.png
202202
---
@@ -328,7 +328,7 @@ The stationary non-steady state (transition path) solution algorithm has followi
328328
2. From price of consumption goods, determine the price of the composite consmpution good, $\bar{p}$ using equation {eq}`EqCompPnorm2`
329329
3. The household problem can be solved with a multivariate root finder solving the $2S$ equations and unknowns at once for each $j$ and $1\leq t\leq T+S-1$. The root finder uses $2S$ household Euler equations {eq}`EqStnrz_eul_n`, {eq}`EqStnrz_eul_b`, and {eq}`EqStnrz_eul_bS` to solve for each household's $2S$ lifetime decisions. The household decision rules for each type and birth cohort are solved separately.
330330
4. After solving the first iteration of time path iteration, subsequent initial values for the $J$, $2S$ root finding problems are based on the solution in the prior iteration. This speeds up computation further and makes the initial guess for the highly nonlinear system of equations start closer to the solution value.
331-
7. Determine from the quantity of the composite consumption good consumed by each household, $\hat{c}_{j,s,t}$, use equation {eq}`EqHH_cmDem` to determine consumption of each output good, $\hat{c}_{m,j,s,t}$
331+
7. Determine from the quantity of the composite consumption good consumed by each household, $\hat{c}_{j,s,t}$, use equation {eq}`EqStnrz_cmDem2` to determine consumption of each output good, $\hat{c}_{m,j,s,t}$
332332
8. Using $\hat{c}_{m,j,s,t}$ in {eq}`EqCmt`, solve for aggregate consumption of each output good, $\hat{C}_{m,t}$
333333
9. Given values for $n_{j,s,t}$ and $\hat{b}_{j,s+1,t+1}$ for all $j$, $s$, and $t$, solve for aggregate labor supply, $\hat{L}_t$, and savings, $B_t$ in each period
334334
1. Use $n_{j,s,t}$ and the stationarized labor market clearing equation {eq}`EqStnrzMarkClrLab` to get a value for $\hat{L}_t^{i}$.
@@ -345,17 +345,20 @@ The stationary non-steady state (transition path) solution algorithm has followi
345345
2. The capital-output ratio can be determined from the FOC for the firms' choice of capital: $\frac{\hat{K}_{m,t}}{\hat{Y}_{m,t}} = \gamma_m\left[\frac{r_t + \delta_{M,t} - \tau^{corp}_{m,t}\delta^{\tau}_{m,t} - \tau^{inv}_{m,t}\delta_{M,t}}{(1-\tau^{corp}_{m,t})p_{m,t}({Z}_{m,t})^\frac{\varepsilon_m -1}{\varepsilon_m}}\right]^{-\varepsilon_m}$
346346
3. Capital demand can thus be found: $\hat{K}_{m,t} = \frac{\hat{K}_{m,t}}{\hat{Y}_{m,t}} * \hat{Y}_{m,t}$
347347
4. Labor demand can be found by inverting the production function:
348+
348349
```{math}
349350
:label: EqTPI_solveL
350351
\hat{L}_{m,t} = \left(\frac{\left(\frac{\hat{Y}_{m,t}}{Z_{m,t}}\right)^{\frac{\varepsilon_m-1}{\varepsilon_m}} - \gamma_{m}^{\frac{1}{\varepsilon_m}}\hat{K}_{m,t}^{\frac{\varepsilon_m-1}{\varepsilon_m}} - \gamma_{g,m}^{\frac{1}{\varepsilon_m}}\hat{K}_{g,m,t}^{\frac{\varepsilon_m-1}{\varepsilon_m}}}{(1-\gamma_m-\gamma_{g,m})^{\frac{1}{\varepsilon_m}}}\right)^{\frac{\varepsilon_m}{\varepsilon_m-1}}
351352
```
353+
352354
5. Use the interest rate $r_t^*$ and labor demand $\hat{L}_{m,t}$ to solve for private capital demand at the world interest rate $\hat{K}_{m,t}^{r^*}$ using {eq}`EqFirmsMPKg_opt`
355+
353356
```{math}
354357
:label: EqTP_MPKg
355358
\hat{K}_{m,t}^{r^*} = \hat{L}_{m,t}\left(\frac{\hat{w}_t}{\frac{r_t + \delta_{M,t} - \tau^{corp}_{m,t}\delta^{\tau}_{m,t} - \tau^{inv}_{m,t}\delta_{M,t}}{1 - \bar{\tau}_{m,t}^b}}\right)^{\varepsilon_m} \frac{\gamma_m}{(1 - \gamma_m - \gamma_{g,m})}
356359
```
357360
358-
18. Determine factor demands and output for industry $M$:
361+
18. Determine factor demands and output for industry $M$:
359362
1. $\hat{L}_{M,t} = \hat{L}_t - \sum_{m=1}^{M-1}\hat{L}_{m,t}$
360363
2. Find $\hat{K}_{m,t}^{r^*}$ using {eq}`EqFirmsMPKg_opt`
361364
3. Find total capital supply, and the split between that from domestic and foreign households: $\hat{K}_t^{i'}$, $\hat{K}_t^d$, $\hat{K}_t^f$:
@@ -385,7 +388,7 @@ The stationary non-steady state (transition path) solution algorithm has followi
385388
5. $error_{bq} = max\left\{\frac{\hat{BQ}_{t}^{\,i'} - \hat{BQ}_{t}^{\,i}}{\hat{BQ}_{t}^{\,i}}\right\}_{t=0}^{T}$
386389
6. $error_{tr} = \left\{\frac{\hat{TR}_{t}^{\,i'} - \hat{TR}_{t}^{\,i}}{\hat{TR}_{t}^{\,i}}\right\}_{t=0}^{T}$
387390
388-
23. If the maximum absolute error among the four outer loop error terms is greater than some small positive tolerance $toler_{tpi,out}$, $\max\big|\left(error_{r_p}, error_r, error_w, error_p, error_{bq},error_{tr}\right)\bigr| > toler_{tpi,out}$, then update the guesses for the outer loop variables as a convex combination governed by $\xi_{tpi}\in(0,1]$ of the respective initial guesses and the new implied values and repeat steps (3) through (5).
391+
23. If the maximum absolute error among the four outer loop error terms is greater than some small positive tolerance $toler_{tpi,out}$, $\max\big|\left(error_{r_p}, error_r, error_w, error_p, error_{bq},error_{tr}\right)\bigr| > toler_{tpi,out}$, then update the guesses for the outer loop variables as a convex combination governed by $\xi_{tpi}\in(0,1]$ of the respective initial guesses and the new implied values and repeat steps (3) through (5).
389392
390393
$$
391394
&[\boldsymbol{r}_p^{i+1}, \boldsymbol{r}^{i+1}, \boldsymbol{\hat{w}}^{i+1}, \boldsymbol{p}^{i+1}, \boldsymbol{\hat{BQ}}^{i+1},\boldsymbol{\hat{TR}}^{i+1} ] = \\
@@ -395,9 +398,9 @@ The stationary non-steady state (transition path) solution algorithm has followi
395398
396399
24. If the maximum absolute error among the M-1+5 outer loop error terms is less-than-or-equal-to some small positive tolerance $toler_{tpi,out}$ in each period along the transition path, $\max\big|\left(error_{r_p}, error_r, error_w, error_p, error_{bq},error_{tr}\right)\bigr| \leq toler_{tpi,out}$ then the non-steady-state equilibrium has been found.
397400
398-
1. Make sure that the resource constraint for industry $M$ (goods market clearing) {eq}`EqStnrzMarkClrGoods_M` is satisfied in each period along the time path. It is redundant, but this is a good check as to whether everything worked correctly.
399-
2. Make sure that the government budget constraint {eq}`EqStnrzGovBC` binds.
400-
3. Make sure that all the $(T+S)\times2JS$ household Euler equations are solved to a satisfactory tolerance.
401+
1. Make sure that the resource constraint for industry $M$ (goods market clearing) {eq}`EqStnrzMarkClrGoods_M` is satisfied in each period along the time path. It is redundant, but this is a good check as to whether everything worked correctly.
402+
2. Make sure that the government budget constraint {eq}`EqStnrzGovBC` binds.
403+
3. Make sure that all the $(T+S)\times2JS$ household Euler equations are solved to a satisfactory tolerance.
401404
402405
Under alternative model configurations, the solution algorithm changes slightly. When `budget_balance = True`, the guess of $\boldsymbol{\hat{TR}}$ in the outer loop is replaced by the guess of $\boldsymbol{\hat{Y}}$ and transfers are determined a residual from the government budget constraint given revenues and other spending policy. When `baseline_spending = True`, $\boldsymbol{\hat{TR}}$ is determined from the baseline model solution and not updated in the outer loop described above. In this case $\boldsymbol{\hat{Y}}$ becomes variable that is updates in the outer loop.
403406

docs/book/content/theory/financial.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11

22
(Chap_FinInt)=
3-
43
# Financial Intermediary
54

65
Domestic household wealth $W^d_{t}=B_{t}$ and foreign ownership of domestic assets $W^f_{t}$, both in terms of the numeraire good, are invested in a financial intermediary. This intermediary purchases a portfolio of government bonds and private capital in accordance with the domestic and foreign investor demand for these assets and then returns a single portfolio rate of return to all investors.
@@ -15,7 +14,7 @@ Foreign demand for government bonds is specified in section {ref}`SecMarkClrMktC
1514
This leaves domestic investors to buy up the residual amount of government debt:
1615

1716
```{math}
18-
:label: EqMarkClr_zetaD2
17+
:label: EqMarkClr_DomesticDebt
1918
D^{d}_{t} = D_{t} - D^{f}_{t} \quad\forall t
2019
```
2120

0 commit comments

Comments
 (0)