From c7f8b1485ac1165330ed11cc0d40002ab00f922b Mon Sep 17 00:00:00 2001 From: Alan Lujan Date: Mon, 6 Feb 2023 19:32:30 -0500 Subject: [PATCH] pre-commit run -a --- .github/CODE_OF_CONDUCT.md | 2 +- .github/FUNDING.yml | 2 +- .github/ISSUE_TEMPLATE/bug_report.md | 15 +- .github/PULL_REQUEST_TEMPLATE.md | 1 + .github/workflows/chatops-binder.yaml | 40 +- .github/workflows/coverage.yml | 34 +- .github/workflows/examples.yml | 7 +- .github/workflows/hark.yml | 31 +- .gitignore | 2 +- .zenodo.json | 39 +- Documentation/ARKitecture.md | 172 ++-- Documentation/CHANGELOG.md | 312 +++---- Documentation/NARK/LaTeX/NARK.bib | 2 - Documentation/NARK/NARK.tex | 122 ++- .../NARK/Resources/.git-public-commit | 1 - .../LaTeXInputs/BufferStockTheory-tikz.sty | 12 +- .../LaTeXInputs/BufferStockTheory.sty | 7 +- .../LaTeXInputs/econtex_onlyinsubfile.tex | 1 - .../NARK/Resources/PoweredByEconARK.svg | 2 +- .../NARK/Resources/econ-ark-logo-small.xbb | 1 - .../NARK/Resources/texmf-local/README.md | 2 - .../texmf-local/bibtex/bib/economics.bib | 33 +- .../bibtex/bst/unsrtnatTitlesFirst.bst | 4 +- .../texmf-local/tex/latex/ReadMe.texmf | 4 +- .../tex/latex/articleNoRefHead.cls | 2 +- .../texmf-local/tex/latex/cvBibMake.tex | 2 +- .../texmf-local/tex/latex/econtex.cls | 34 +- .../texmf-local/tex/latex/econtex.sty | 10 +- .../texmf-local/tex/latex/econtexBibMake.tex | 2 +- .../texmf-local/tex/latex/econtexSetup.sty | 21 +- .../tex/latex/econtexShortcuts.sty | 85 +- .../texmf-local/tex/latex/handout.cls | 34 +- .../texmf-local/tex/latex/handout.sty | 10 +- .../texmf-local/tex/latex/handoutSetup.sty | 14 +- .../tex/latex/handoutShortcuts.sty | 85 +- .../texmf-local/tex/latex/printvrb.sty | 14 +- .../texmf-local/tex/latex/snapshot.sty | 4 +- .../tex/latex/tex4ht/pictureenv.4ht | 2 +- .../tex4ht/svg-math-and-subfigures-README.md | 6 +- .../latex/tex4ht/svg-math-and-subfigures.cfg | 32 +- .../latex/tex4ht/svg-math-and-subfigures.tex | 32 +- .../texmf-local/tex/latex/tex4htMakeCFG.sh | 2 - .../texmf-local/texmf-local/README.md | 2 - .../texmf-local/bibtex/bib/economics.bib | 33 +- .../bibtex/bst/unsrtnatTitlesFirst.bst | 4 +- .../texmf-local/tex/latex/ReadMe.texmf | 4 +- .../tex/latex/articleNoRefHead.cls | 2 +- .../texmf-local/tex/latex/cvBibMake.tex | 2 +- .../texmf-local/tex/latex/econtex.cls | 34 +- .../texmf-local/tex/latex/econtex.sty | 10 +- .../texmf-local/tex/latex/econtexBibMake.tex | 2 +- .../texmf-local/tex/latex/econtexSetup.sty | 21 +- .../tex/latex/econtexShortcuts.sty | 85 +- .../texmf-local/tex/latex/handout.cls | 34 +- .../texmf-local/tex/latex/handout.sty | 10 +- .../texmf-local/tex/latex/handoutSetup.sty | 14 +- .../tex/latex/handoutShortcuts.sty | 85 +- .../texmf-local/tex/latex/printvrb.sty | 14 +- .../texmf-local/tex/latex/snapshot.sty | 4 +- .../tex/latex/tex4ht/pictureenv.4ht | 2 +- .../tex4ht/svg-math-and-subfigures-README.md | 6 +- .../latex/tex4ht/svg-math-and-subfigures.cfg | 32 +- .../latex/tex4ht/svg-math-and-subfigures.tex | 32 +- .../texmf-local/tex/latex/tex4htMakeCFG.sh | 2 - .../texmf-local/texmf-local/web2c/texmf.cnf | 4 +- .../Resources/texmf-local/web2c/texmf.cnf | 4 +- Documentation/_static/theme_overrides.css | 2 +- Documentation/conf.py | 183 ++-- Documentation/contributing/CONTRIBUTING.md | 216 ++--- .../contributing/Installation_instruction.md | 86 +- Documentation/introduction.md | 12 +- Documentation/quick-start.md | 59 +- .../ConsumptionSaving/ConsAggShockModel.rst | 2 +- .../ConsGenIncProcessModel.rst | 2 +- .../ConsumptionSaving/ConsLaborModel.rst | 2 +- .../ConsumptionSaving/ConsMarkovModel.rst | 2 +- .../ConsumptionSaving/ConsMedModel.rst | 2 +- .../ConsumptionSaving/ConsPortfolioModel.rst | 2 +- .../ConsumptionSaving/ConsPrefShochModel.rst | 2 +- .../ConsumptionSaving/ConsRepAgentModel.rst | 2 +- .../TractableBufferStockModel.rst | 2 +- Documentation/reference/tools/core.rst | 2 +- Documentation/reference/tools/dcegm.rst | 2 +- .../reference/tools/distribution.rst | 2 +- Documentation/reference/tools/estimation.rst | 2 +- Documentation/reference/tools/helpers.rst | 2 +- .../reference/tools/interpolation.rst | 2 +- Documentation/reference/tools/parallel.rst | 2 +- Documentation/reference/tools/simulation.rst | 2 +- Documentation/reference/tools/utilities.rst | 2 +- Documentation/reference/tools/validators.rst | 2 +- .../texmf-local/bibtex/bib/economics-UTF8.bib | 33 +- .../texmf-local/bibtex/bib/economics.bib | 37 +- .../bibtex/bst/unsrtnatTitlesFirst.bst | 4 +- .../texmf-local/tex/latex/ReadMe.texmf | 4 +- .../tex/latex/articleNoRefHead.cls | 2 +- .../texmf-local/tex/latex/cvBibMake.tex | 2 +- .../texmf-local/tex/latex/econtex.cls | 34 +- .../texmf-local/tex/latex/econtex.sty | 10 +- .../texmf-local/tex/latex/econtexBibMake.tex | 2 +- .../texmf-local/tex/latex/econtexSetup.sty | 19 +- .../tex/latex/econtexShortcuts.sty | 85 +- .../texmf-local/tex/latex/handout.cls | 34 +- .../texmf-local/tex/latex/handout.sty | 10 +- .../texmf-local/tex/latex/handoutSetup.sty | 14 +- .../tex/latex/handoutshortcuts.sty | 83 +- .../texmf-local/tex/latex/printvrb.sty | 14 +- .../texmf-local/tex/latex/snapshot.sty | 4 +- .../tex/latex/tex4ht/pictureenv.4ht | 2 +- .../latex/tex4ht/svg-math-and-subfigures.cfg | 52 +- .../texmf-local/tex/latex/tex4htMakeCFG.sh | 1 - .../latex/texmf-local/tex/latex/econtex.cls | 34 +- .../latex/texmf-local/tex/latex/econtex.sty | 10 +- .../texmf-local/tex/latex/econtexBibMake.tex | 4 +- .../texmf-local/tex/latex/econtexSetup.sty | 19 +- .../tex/latex/econtexShortcuts.sty | 79 +- .../latex/texmf-local/tex/latex/handout.cls | 28 +- .../texmf-local/tex/latex/handoutSetup.sty | 14 +- .../tex/latex/handoutShortcuts.sty | 85 +- Documentation/texmf-local/web2c/texmf.cnf | 4 +- HARK/Calibration/Income/IncomeTools.py | 29 +- .../Income/tests/test_IncomeTools.py | 16 +- HARK/ConsumptionSaving/ConsIndShockModel.py | 6 +- .../ConsIndShockModelFast.py | 29 +- HARK/ConsumptionSaving/ConsPortfolioModel.py | 43 +- HARK/ConsumptionSaving/ConsRepAgentModel.py | 7 +- .../ConsRiskyContribModel.py | 59 +- .../TractableBufferStockModel.py | 1 + .../tests/test_ConsLaborModel.py | 3 +- .../tests/test_ConsMarkovModel.py | 2 - .../tests/test_ConsMedModel.py | 2 - .../tests/test_ConsPrefShockModel.py | 3 - .../tests/test_ConsRiskyContribModel.py | 2 - .../tests/test_IndShockConsumerType.py | 19 +- .../tests/test_KinkedRconsumerType.py | 1 - .../tests/test_PerfForesightConsumerType.py | 2 - .../test_PerfForesightFastConsumerType.py | 2 +- .../tests/test_SmallOpenEconomy.py | 6 +- .../tests/test_TractableBufferStockModel.py | 4 +- .../tests/test_modelInits.py | 11 +- HARK/core.py | 24 +- HARK/datasets/SCF/WealthIncomeDist/README.md | 16 +- .../SCF/WealthIncomeDist/SCFDistTools.py | 13 +- HARK/datasets/cpi/us/CPITools.py | 7 +- HARK/datasets/cpi/us/README.md | 1 + HARK/datasets/data/EducMortAdj.txt | 2 +- HARK/datasets/data/USactuarial.txt | 2 +- HARK/datasets/life_tables/us_ssa/README.md | 2 + HARK/datasets/life_tables/us_ssa/SSATools.py | 12 +- HARK/datasets/load_data.py | 7 +- HARK/datasets/tests/test_load_data.py | 5 +- HARK/dcegm.py | 8 - HARK/distribution.py | 10 +- HARK/econforgeinterp.py | 13 +- HARK/estimation.py | 8 +- HARK/frame.py | 48 +- HARK/helpers.py | 2 +- HARK/interpolation.py | 9 +- HARK/parallel.py | 5 +- HARK/rewards.py | 9 +- HARK/simulation.py | 1 + HARK/tests/OpenCLtest.py | 6 +- HARK/tests/test_HARKutilities.py | 1 - HARK/tests/test_TractableBufferStockModel.py | 1 - HARK/tests/test_approxDstns.py | 2 - HARK/tests/test_dcegm.py | 6 +- HARK/tests/test_discrete.py | 5 +- HARK/tests/test_distribution.py | 12 - HARK/tests/test_econforgeinterp.py | 19 +- HARK/tests/test_frame.py | 4 - HARK/tests/test_interpolation.py | 14 +- HARK/tests/test_parallel.py | 5 +- HARK/tests/test_validators.py | 9 +- HARK/utilities.py | 16 +- README.md | 96 +-- binder/postBuild | 2 +- binder/postBuild.bat | 2 +- binder/requirements.txt | 8 +- examples/Calibration/US_SSA_life_tables.py | 12 +- examples/Journeys/Journey-PhD.ipynb | 2 +- examples/Journeys/Journey-PhD.py | 2 +- .../Quick_start_with_solution.ipynb | 535 ++++++------ .../Quick_start_with_solution.py | 799 ++++++++++++++++++ .../Journeys/Quickstart_tutorial/README.md | 2 +- requirements.txt | 28 +- setup.cfg | 2 +- 186 files changed, 2852 insertions(+), 2189 deletions(-) create mode 100644 examples/Journeys/Quickstart_tutorial/Quick_start_with_solution.py diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md index 56f87ad18..f0a0106aa 100644 --- a/.github/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -1,3 +1,3 @@ # Code of Conduct -* [NumFOCUS Code of Conduct](https://numfocus.org/code-of-conduct) \ No newline at end of file +- [NumFOCUS Code of Conduct](https://numfocus.org/code-of-conduct) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 696c25ff3..1325ef975 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,2 +1,2 @@ github: [numfocus] -custom: ['https://numfocus.org/donate-to-econ-ark'] +custom: ["https://numfocus.org/donate-to-econ-ark"] diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index b95012d29..82df89135 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,10 +1,9 @@ --- name: Bug report about: Create a report to help us improve -title: '' -labels: '' -assignees: '' - +title: "" +labels: "" +assignees: "" --- **Describe the bug** @@ -12,6 +11,7 @@ A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: + 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' @@ -24,9 +24,10 @@ A clear and concise description of what you expected to happen. If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - - OS: [e.g. Mac/Windows/Linux] - - Browser [e.g. chrome, safari] - - Econ-ARK and Python version [eg. 0.10.6 and python 3.7] + +- OS: [e.g. Mac/Windows/Linux] +- Browser [e.g. chrome, safari] +- Econ-ARK and Python version [eg. 0.10.6 and python 3.7] **Additional context** Add any other context about the problem here. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index d96c4d6d3..c4441bf88 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,6 +1,7 @@ Please ensure your pull request adheres to the following guidelines: + - [ ] Tests for new functionality/models or Tests to reproduce the bug-fix in code. - [ ] Updated documentation of features that add new functionality. - [ ] Update CHANGELOG.md with major/minor changes. diff --git a/.github/workflows/chatops-binder.yaml b/.github/workflows/chatops-binder.yaml index b47ba470f..feb143271 100644 --- a/.github/workflows/chatops-binder.yaml +++ b/.github/workflows/chatops-binder.yaml @@ -8,27 +8,27 @@ jobs: if: (github.event.issue.pull_request != null) && contains(github.event.comment.body, '/binder') runs-on: ubuntu-latest steps: - # Use the GitHub API to: - # (1) Get the branch name of the PR that has been commented on with "/binder" + # Use the GitHub API to: + # (1) Get the branch name of the PR that has been commented on with "/binder" # (2) make a comment on the PR with the binder badge - - name: comment on PR with Binder link - uses: actions/github-script@v1 - with: - github-token: ${{secrets.GITHUB_TOKEN}} - script: | - // Get the branch name - github.pulls.get({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: context.payload.issue.number - }).then( (pr) => { - - // use the branch name to make a comment on the PR with a Binder badge - var BRANCH_NAME = pr.data.head.ref - github.issues.createComment({ - issue_number: context.payload.issue.number, + - name: comment on PR with Binder link + uses: actions/github-script@v1 + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + // Get the branch name + github.pulls.get({ owner: context.repo.owner, repo: context.repo.repo, - body: `[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/${context.repo.owner}/${context.repo.repo}/${BRANCH_NAME}) :point_left: Launch a binder notebook on this branch` + pull_number: context.payload.issue.number + }).then( (pr) => { + + // use the branch name to make a comment on the PR with a Binder badge + var BRANCH_NAME = pr.data.head.ref + github.issues.createComment({ + issue_number: context.payload.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: `[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/${context.repo.owner}/${context.repo.repo}/${BRANCH_NAME}) :point_left: Launch a binder notebook on this branch` + }) }) - }) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 0564da53e..e87ab97a5 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -3,10 +3,10 @@ name: Generate coverage report on: push: branches: - - master + - master pull_request: branches: - - master + - master jobs: build: @@ -16,18 +16,18 @@ jobs: python-version: [3.8] steps: - - uses: actions/checkout@v1 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - - name: Generate coverage report - run: | - pip install pytest pytest-cov - pytest --cov=./ --cov-report=xml - - name: upload coverage report - uses: codecov/codecov-action@v1 + - uses: actions/checkout@v1 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Generate coverage report + run: | + pip install pytest pytest-cov + pytest --cov=./ --cov-report=xml + - name: upload coverage report + uses: codecov/codecov-action@v1 diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index e176814bd..c26d24624 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -3,10 +3,10 @@ name: Test examples as a cron job on: push: branches: - - master + - master pull_request: branches: - - master + - master schedule: - cron: 0 0 * * * @@ -16,7 +16,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: ['3.8', '3.9', '3.10'] + python-version: ["3.8", "3.9", "3.10"] steps: - uses: actions/checkout@v2 - name: Set up Python @@ -31,4 +31,3 @@ jobs: - name: Run examples run: | pytest --nbval-lax --current-env examples/ - diff --git a/.github/workflows/hark.yml b/.github/workflows/hark.yml index 5fdae8d6a..8e173cc7f 100644 --- a/.github/workflows/hark.yml +++ b/.github/workflows/hark.yml @@ -3,14 +3,13 @@ name: HARK build on MacOS, Ubuntu and Windows on: push: branches: - - master + - master pull_request: branches: - - master + - master jobs: build: - runs-on: ${{ matrix.os }} strategy: max-parallel: 5 @@ -19,16 +18,16 @@ jobs: python-version: [3.8, 3.9, "3.10"] steps: - - uses: actions/checkout@v1 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install pytest - pip install . - - name: Test with pytest - run: | - pytest + - uses: actions/checkout@v1 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pytest + pip install . + - name: Test with pytest + run: | + pytest diff --git a/.gitignore b/.gitignore index ac9448633..f5fe6dadf 100644 --- a/.gitignore +++ b/.gitignore @@ -281,7 +281,7 @@ nate-notes/ *_region_*.* -# VSCode +# VSCode settings.json .idea diff --git a/.zenodo.json b/.zenodo.json index d87d18c91..eed2ec9e1 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -1,26 +1,33 @@ { "title": "Heterogeneous Agents Resources and toolKit (HARK)", - "creators": [{ + "creators": [ + { "name": "Carroll, Christopher D" - }, { + }, + { "name": "Palmer, Nathan" - }, { + }, + { "name": "White, Matthew N." - }, { + }, + { "name": "Kazil, Jacqueline" - }, { + }, + { "name": "Low, David C" - }, { + }, + { "name": "Kaufman, Alexander" - }], - "access_right": "open", + } + ], + "access_right": "open", "license": "apache2.0", - "upload_type": "software", - "related_identifiers": [ - { - "scheme": "url", - "identifier": "https://github.com/econ-ark/HARK/", - "relation": "isSupplementTo" - } - ] + "upload_type": "software", + "related_identifiers": [ + { + "scheme": "url", + "identifier": "https://github.com/econ-ark/HARK/", + "relation": "isSupplementTo" + } + ] } diff --git a/Documentation/ARKitecture.md b/Documentation/ARKitecture.md index 29e80c328..027f81578 100644 --- a/Documentation/ARKitecture.md +++ b/Documentation/ARKitecture.md @@ -1,225 +1,219 @@ # ARKitecture of Econ-ARK -This document guides you through the structure of econ-ark and explain the main ingredients. Note that it does not explain *how* to use it. For this, please follow the example notebooks which you can find on the left. +This document guides you through the structure of econ-ark and explain the main ingredients. Note that it does not explain _how_ to use it. For this, please follow the example notebooks which you can find on the left. [Econ-ark](https://github.com/econ-ark) contains the three main repositories [HARK](https://github.com/econ-ark/HARK), [DemARK](https://github.com/econ-ark/DEMARK), and [REMARK](https://github.com/econ-ark/REMARK). On top of that, the [website](https://econ-ark.org/) combines all of them. Hence, if you want to find a notebook search them in [materials](https://econ-ark.org/materials). -* [HARK](https://github.com/econ-ark/HARK): Includes the source code as well as some example notebooks. -* [DemARK](https://github.com/econ-ark/DemARK): Here you can find *Dem*onstrations of tools, AgentTypes, and ModelClasses. -* [REMARK](https://github.com/econ-ark/REMARK): Here you can find *R*[eplications/eproductions] and *E*xplorations *M*ade using *ARK*. +- [HARK](https://github.com/econ-ark/HARK): Includes the source code as well as some example notebooks. +- [DemARK](https://github.com/econ-ark/DemARK): Here you can find *Dem*onstrations of tools, AgentTypes, and ModelClasses. +- [REMARK](https://github.com/econ-ark/REMARK): Here you can find _R_[eplications/eproductions] and *E*xplorations *M*ade using _ARK_. Before describing each repository in detail, some preliminary remarks. -HARK is written in Python, an object-oriented programming (OOP) language that has experienced increasing popularity in the scientific community in the past several years. A significant reason for the adoption of Python is the ***numpy*** and ***scipy*** packages, which offer a wide array of mathematical and statistical functions and tools; HARK makes liberal use of these libraries. Python's object-oriented nature allows models in HARK to be easily extended: more complex models can inherit functions and methods from more fundamental ''parent'' models, eliminating the need to reproduce or repurpose code. +HARK is written in Python, an object-oriented programming (OOP) language that has experienced increasing popularity in the scientific community in the past several years. A significant reason for the adoption of Python is the **_numpy_** and **_scipy_** packages, which offer a wide array of mathematical and statistical functions and tools; HARK makes liberal use of these libraries. Python's object-oriented nature allows models in HARK to be easily extended: more complex models can inherit functions and methods from more fundamental ''parent'' models, eliminating the need to reproduce or repurpose code. As implied in the previous section, we strongly encourage HARK users to use the Anaconda distribution of Python, which includes all commonly used mathematical and scientific packages, an interactive development environment for iPython (Spyder), and a package manager that allows users to quickly install or update packages not included in the default distribution (conda). -For users unfamiliar with OOP, we strongly encourage you to review the background material on OOP provided by the good people at [QuantEcon](https://python.quantecon.org/intro.html) (for more on them, see below) at this link: [Object Oriented Programming](https://python-programming.quantecon.org/oop_intro.html). Unlike non-OOP languages, OOP bundles together data and functions into *objects*. These can be accessed via: ***object\_name.data*** and ***object\_name.method\_name()***, respectively. For organizational purposes, definitions of multiple objects are stored in *modules*, which are simply files with a ***.py*** extension. Modules can be accessed in Python via: +For users unfamiliar with OOP, we strongly encourage you to review the background material on OOP provided by the good people at [QuantEcon](https://python.quantecon.org/intro.html) (for more on them, see below) at this link: [Object Oriented Programming](https://python-programming.quantecon.org/oop_intro.html). Unlike non-OOP languages, OOP bundles together data and functions into _objects_. These can be accessed via: **_object_name.data_** and **_object_name.method_name()_**, respectively. For organizational purposes, definitions of multiple objects are stored in _modules_, which are simply files with a **_.py_** extension. Modules can be accessed in Python via: + ``` import module_name as import_name ``` -This imports the module and gives it a local name of ***import\_name***. We can access a function within this module by simply typing: ***import\_name.function\_name()***. The following example will illustrate the usage of these commands. ***CRRAutility*** is the function object for calculating CRRA utility supplied by ***HARK.utilities*** module. ***CRRAutility*** is called *attributes* of the module ***HARK.utilities***. In order to calculate CRRA utility with a consumption of 1 and a coefficient of risk aversion of 2 we run: +This imports the module and gives it a local name of **_import_name_**. We can access a function within this module by simply typing: **_import_name.function_name()_**. The following example will illustrate the usage of these commands. **_CRRAutility_** is the function object for calculating CRRA utility supplied by **_HARK.utilities_** module. **_CRRAutility_** is called _attributes_ of the module **_HARK.utilities_**. In order to calculate CRRA utility with a consumption of 1 and a coefficient of risk aversion of 2 we run: + ``` import HARK.utilities as Hutil Hutil.CRRAutility(1,2) ``` -Python modules in HARK can generally be categorized into three types: tools, models, and applications. **Tool modules** contain functions and classes with general purpose tools that have no inherent ''economic content'', but that can be used in many economic models as building blocks or utilities; they could plausibly be useful in non-economic settings. Tools might include functions for data analysis (e.g. calculating Lorenz shares from data, or constructing a non-parametric kernel regression), functions to create and manipulate discrete approximations to continuous distributions, or classes for constructing interpolated approximations to non-parametric functions. Tool modules generally reside in HARK's root directory and have names like ***HARK.simulation*** and ***HARK.interpolation***; they do not necessarily do anything when run. +Python modules in HARK can generally be categorized into three types: tools, models, and applications. **Tool modules** contain functions and classes with general purpose tools that have no inherent ''economic content'', but that can be used in many economic models as building blocks or utilities; they could plausibly be useful in non-economic settings. Tools might include functions for data analysis (e.g. calculating Lorenz shares from data, or constructing a non-parametric kernel regression), functions to create and manipulate discrete approximations to continuous distributions, or classes for constructing interpolated approximations to non-parametric functions. Tool modules generally reside in HARK's root directory and have names like **_HARK.simulation_** and **_HARK.interpolation_**; they do not necessarily do anything when run. -**Model modules** specify particular economic models, including classes to represent agents in the model (and the ''market structure'' in which they interact) and functions for solving the ''one period problem'' of those models. For example, **ConsIndShockModel.py** concerns consumption-saving models in which agents have CRRA utility over consumption and face idiosyncratic shocks to permanent and transitory income. The module includes classes for representing ''types'' of consumers, along with functions for solving (several flavors of) the one period consumption-saving problem. When run, model modules might demonstrate example specifications of their models, filling in the model parameters with arbitrary values. When ***ConsIndShockModel.py*** is run, it specifies an infinite horizon consumer with a particular discount factor, permanent income growth rate, coefficient of relative risk aversion (etc), who faces lognormal shocks to permanent and transitory income each period with a particular standard deviation; it then solves this consumer's problem and graphically displays the results. Model modules generally have ***Model*** in their name. +**Model modules** specify particular economic models, including classes to represent agents in the model (and the ''market structure'' in which they interact) and functions for solving the ''one period problem'' of those models. For example, **ConsIndShockModel.py** concerns consumption-saving models in which agents have CRRA utility over consumption and face idiosyncratic shocks to permanent and transitory income. The module includes classes for representing ''types'' of consumers, along with functions for solving (several flavors of) the one period consumption-saving problem. When run, model modules might demonstrate example specifications of their models, filling in the model parameters with arbitrary values. When **_ConsIndShockModel.py_** is run, it specifies an infinite horizon consumer with a particular discount factor, permanent income growth rate, coefficient of relative risk aversion (etc), who faces lognormal shocks to permanent and transitory income each period with a particular standard deviation; it then solves this consumer's problem and graphically displays the results. Model modules generally have **_Model_** in their name. -## HARK +## HARK After you [installed](https://hark.readthedocs.io/en/latest/quick-start.html) and [cloned the repository of](https://github.com/econ-ark/HARK) HARK, you can explore the content of it. In the subfolder HARK, you can find a range of [general purpose tools](#general-purpose-tools), as well as the next subfolder ConsumptionSaving which has [AgentType Classes](#agenttype-class) and [Market Classes](#market-class). ### General Purpose Tools -HARK's root directory contains six tool modules, [1](#myfootnote1) each containing a variety of functions and classes that can be used in many economic models-- or even for mathematical purposes that have nothing to do with economics. Some of the tool modules are very sparely populated at this time, while others are quite large. We expect that all of these modules will grow considerably in the near future, as new tools are ''low hanging fruit'' for contribution to the project. [2](#myfootnote2) +HARK's root directory contains six tool modules, [1](#myfootnote1) each containing a variety of functions and classes that can be used in many economic models-- or even for mathematical purposes that have nothing to do with economics. Some of the tool modules are very sparely populated at this time, while others are quite large. We expect that all of these modules will grow considerably in the near future, as new tools are ''low hanging fruit'' for contribution to the project. [2](#myfootnote2) 1: The ''taxonomy'' of these modules is in flux; the functions described here could be combined into fewer modules or further divided by purpose. [↩](#a1) -2: That is, as the foundational, building-block elements of HARK, new tools are not difficult to program and do not require extensive integration with many moving parts. [↩](#a2) +2: That is, as the foundational, building-block elements of HARK, new tools are not difficult to program and do not require extensive integration with many moving parts. [↩](#a2) #### HARK.core -A key goal of the project is to create modularity and interoperability between models, making them easy to combine, adapt, and extend. To this end, the ***HARK.core*** module specifies a framework for economic models in HARK, creating a common structure for them on two levels that can be called ''microeconomic'' and ''macroeconomic''. - -Microeconomic models in HARK use the ***AgentType*** class to represent agents with an intertemporal optimization problem. Each of these models specifies a subclass of ***AgentType***; an instance of the subclass represents agents who are *ex-ante* homogeneous-- they have common values for all parameters that describe the problem. For example, ***ConsIndShockModel*** specifies the ***IndShockConsumerType*** class, which has methods specific to consumption-saving models with idiosyncratic shocks to income; an instance of the class might represent all consumers who have a CRRA of 3, discount factor of 0.98, etc. The ***AgentType*** class has a ***solve*** method that acts as a ''universal microeconomic solver'' for any properly formatted model, making it easier to set up a new model and to combine elements from different models; the solver is intended to encompass any model that can be framed as a sequence of one period problems. For a complete description, see section [AgentType Class](#agenttype-class). +A key goal of the project is to create modularity and interoperability between models, making them easy to combine, adapt, and extend. To this end, the **_HARK.core_** module specifies a framework for economic models in HARK, creating a common structure for them on two levels that can be called ''microeconomic'' and ''macroeconomic''. -Macroeconomic models in HARK use the ***Market*** class to represent a market (or other aggregator) that combines the actions, states, and/or shocks (generally, outcomes) of individual agents in the model into aggregate outcomes that are ''passed back'' to the agents. For example, the market in a consumption-saving model might combine the individual asset holdings of all agents in the market to generate aggregate capital in the economy, yielding the interest rate on assets (as the marginal product of capital); the individual agents then learn the aggregate capital level and interest rate, conditioning their next action on this information. Objects that microeconomic agents treat as exogenous when solving (or simulating) their model are thus endogenous at the macroeconomic level. Like ***AgentType***, the ***Market*** class also has a ***solve*** method, which seeks out a dynamic general equilibrium: a ''rule'' governing the dynamic evolution of macroeconomic objects such that if agents believe this rule and act accordingly, then their collective actions generate a sequence of macroeconomic outcomes that justify the belief in that rule. For a more complete description, see section [Market Class](#market-class). +Microeconomic models in HARK use the **_AgentType_** class to represent agents with an intertemporal optimization problem. Each of these models specifies a subclass of **_AgentType_**; an instance of the subclass represents agents who are _ex-ante_ homogeneous-- they have common values for all parameters that describe the problem. For example, **_ConsIndShockModel_** specifies the **_IndShockConsumerType_** class, which has methods specific to consumption-saving models with idiosyncratic shocks to income; an instance of the class might represent all consumers who have a CRRA of 3, discount factor of 0.98, etc. The **_AgentType_** class has a **_solve_** method that acts as a ''universal microeconomic solver'' for any properly formatted model, making it easier to set up a new model and to combine elements from different models; the solver is intended to encompass any model that can be framed as a sequence of one period problems. For a complete description, see section [AgentType Class](#agenttype-class). -Beyond the model frameworks, ***HARK.core*** also defines a ''supersuperclass'' called ***HARKobject***. When solving a dynamic microeconomic model with an infinite horizon (or searching for a dynamic general equilibrium), it is often required to consider whether two solutions are sufficiently close to each other to warrant stopping the process (i.e. approximate convergence). It is thus necessary to calculate the ''distance'' between two solutions, so HARK specifies that classes should have a ***distance*** method that takes a single input and returns a non-negative value representing the (generally dimensionless) distance between the object in question and the input to the method. As a convenient default, ***HARKobject*** provides a ''universal distance metric'' that should be useful in many contexts. [3](#myfootnote3) When defining a new subclass of ***HARKobject***, the user simply defines the attribute ***distance_criteria*** as a list of strings naming the attributes of the class that should be compared when calculating the distance between two instances of that class. For example, the class ***ConsumerSolution*** has ***distance_criteria = ['cFunc']***, indicating that only the consumption function attribute of the solution matters when comparing the distance between two instances of ***ConsumerSolution***. See [here](https://hark.readthedocs.io/en/latest/reference/tools/core.html) for further documentation. +Macroeconomic models in HARK use the **_Market_** class to represent a market (or other aggregator) that combines the actions, states, and/or shocks (generally, outcomes) of individual agents in the model into aggregate outcomes that are ''passed back'' to the agents. For example, the market in a consumption-saving model might combine the individual asset holdings of all agents in the market to generate aggregate capital in the economy, yielding the interest rate on assets (as the marginal product of capital); the individual agents then learn the aggregate capital level and interest rate, conditioning their next action on this information. Objects that microeconomic agents treat as exogenous when solving (or simulating) their model are thus endogenous at the macroeconomic level. Like **_AgentType_**, the **_Market_** class also has a **_solve_** method, which seeks out a dynamic general equilibrium: a ''rule'' governing the dynamic evolution of macroeconomic objects such that if agents believe this rule and act accordingly, then their collective actions generate a sequence of macroeconomic outcomes that justify the belief in that rule. For a more complete description, see section [Market Class](#market-class). +Beyond the model frameworks, **_HARK.core_** also defines a ''supersuperclass'' called **_HARKobject_**. When solving a dynamic microeconomic model with an infinite horizon (or searching for a dynamic general equilibrium), it is often required to consider whether two solutions are sufficiently close to each other to warrant stopping the process (i.e. approximate convergence). It is thus necessary to calculate the ''distance'' between two solutions, so HARK specifies that classes should have a **_distance_** method that takes a single input and returns a non-negative value representing the (generally dimensionless) distance between the object in question and the input to the method. As a convenient default, **_HARKobject_** provides a ''universal distance metric'' that should be useful in many contexts. [3](#myfootnote3) When defining a new subclass of **_HARKobject_**, the user simply defines the attribute **_distance_criteria_** as a list of strings naming the attributes of the class that should be compared when calculating the distance between two instances of that class. For example, the class **_ConsumerSolution_** has **_distance_criteria = ['cFunc']_**, indicating that only the consumption function attribute of the solution matters when comparing the distance between two instances of **_ConsumerSolution_**. See [here](https://hark.readthedocs.io/en/latest/reference/tools/core.html) for further documentation. -3: Roughly speaking, the universal distance metric is a recursive supnorm, returning the largest distance between two instances, among attributes named in ***distance_criteria***. Those attributes might be complex objects themselves rather than real numbers, generating a recursive call to the universal distance metric. [↩](#a3) - +3: Roughly speaking, the universal distance metric is a recursive supnorm, returning the largest distance between two instances, among attributes named in **_distance_criteria_**. Those attributes might be complex objects themselves rather than real numbers, generating a recursive call to the universal distance metric. [↩](#a3) #### HARK.utilities -The ***HARK.utilities*** module carries a double meaning in its name, as it contains both utility functions (and their derivatives, inverses, and combinations thereof) in the economic modeling sense as well as utilities in the sense of general tools. Utility functions included at this time are constant relative risk aversion and constant absolute risk aversion. Other functions in ***HARK.utilities*** include some data manipulation tools (e.g. for calculating an average of data conditional on being within a percentile range of different data), functions for constructing discrete state space grids, convenience functions for retrieving information about functions, and basic plotting tools using ***matplotlib.pyplot***. +The **_HARK.utilities_** module carries a double meaning in its name, as it contains both utility functions (and their derivatives, inverses, and combinations thereof) in the economic modeling sense as well as utilities in the sense of general tools. Utility functions included at this time are constant relative risk aversion and constant absolute risk aversion. Other functions in **_HARK.utilities_** include some data manipulation tools (e.g. for calculating an average of data conditional on being within a percentile range of different data), functions for constructing discrete state space grids, convenience functions for retrieving information about functions, and basic plotting tools using **_matplotlib.pyplot_**. -The module also includes functions for constructing discrete approximations to continuous distributions (e.g. ***approxLognormal()*** to approximate a log-normal distribution) as well as manipulating these representations (e.g. appending one outcome to an existing distribution, or combining independent univariate distributions into one multivariate distribution). As a convention in HARK, continuous distributions are approximated as finite discrete distributions when solving models; an *N*-dimensional random variable is formatted as a length *N+1* list of 1D arrays, with the first element representing event probabilities and all other elements are realizations of the *N* component RVs. This both simplifies solution methods (reducing numeric integrals to simple dot products) and allows users to easily test whether their chosen degree of discretization yields a sufficient approximation to the full distribution. See [here](https://hark.readthedocs.io/en/latest/reference/tools/utilities.html) for further documentation. +The module also includes functions for constructing discrete approximations to continuous distributions (e.g. **_approxLognormal()_** to approximate a log-normal distribution) as well as manipulating these representations (e.g. appending one outcome to an existing distribution, or combining independent univariate distributions into one multivariate distribution). As a convention in HARK, continuous distributions are approximated as finite discrete distributions when solving models; an _N_-dimensional random variable is formatted as a length _N+1_ list of 1D arrays, with the first element representing event probabilities and all other elements are realizations of the _N_ component RVs. This both simplifies solution methods (reducing numeric integrals to simple dot products) and allows users to easily test whether their chosen degree of discretization yields a sufficient approximation to the full distribution. See [here](https://hark.readthedocs.io/en/latest/reference/tools/utilities.html) for further documentation. #### HARK.interpolation -The ***HARK.interpolation*** module defines classes for representing interpolated function approximations. Interpolation methods in HARK all inherit from a superclass such as ***HARKinterpolator1D*** or ***HARKinterpolator2D***, wrapper classes that ensures interoperability across interpolation methods. For example, ***HARKinterpolator1D*** specifies the methods ***__call__*** and ***derivative*** to accept an arbitrary array as an input and return an identically shaped array with the interpolated function evaluated at the values in the array or its first derivative, respectively. However, these methods do little on their own, merely reshaping arrays and referring to the ***_evaluate*** and ***_der*** methods, which are *not actually defined in* ***HARKinterpolator1D***. Each subclass of ***HARKinterpolator1D*** specifies their own implementation of ***_evaluate*** and ***_der*** particular to that interpolation method, accepting and returning only 1D arrays. In this way, subclasses of ***HARKinterpolator1D*** are easily interchangeable with each other, as all methods that the user interacts with are identical, varying only by ''internal'' methods. +The **_HARK.interpolation_** module defines classes for representing interpolated function approximations. Interpolation methods in HARK all inherit from a superclass such as **_HARKinterpolator1D_** or **_HARKinterpolator2D_**, wrapper classes that ensures interoperability across interpolation methods. For example, **_HARKinterpolator1D_** specifies the methods **\_**call**\_** and **_derivative_** to accept an arbitrary array as an input and return an identically shaped array with the interpolated function evaluated at the values in the array or its first derivative, respectively. However, these methods do little on their own, merely reshaping arrays and referring to the **_\_evaluate_** and **_\_der_** methods, which are _not actually defined in_ **_HARKinterpolator1D_**. Each subclass of **_HARKinterpolator1D_** specifies their own implementation of **_\_evaluate_** and **_\_der_** particular to that interpolation method, accepting and returning only 1D arrays. In this way, subclasses of **_HARKinterpolator1D_** are easily interchangeable with each other, as all methods that the user interacts with are identical, varying only by ''internal'' methods. -When evaluating a stopping criterion for an infinite horizon problem, it is often necessary to know the ''distance'' between functions generated by successive iterations of a solution procedure. To this end, each interpolator class in HARK must define a ***distance*** method that takes as an input another instance of the same class and returns a non-negative real number representing the ''distance'' between the two. As each of the ***HARKinterpolatorXD*** classes inherits from ***HARKobject***, all interpolator classes have the default ''universal'' distance method; the user must simply list the names of the relevant attributes in the attribute ***distance_criteria*** of the class. +When evaluating a stopping criterion for an infinite horizon problem, it is often necessary to know the ''distance'' between functions generated by successive iterations of a solution procedure. To this end, each interpolator class in HARK must define a **_distance_** method that takes as an input another instance of the same class and returns a non-negative real number representing the ''distance'' between the two. As each of the **_HARKinterpolatorXD_** classes inherits from **_HARKobject_**, all interpolator classes have the default ''universal'' distance method; the user must simply list the names of the relevant attributes in the attribute **_distance_criteria_** of the class. -Interpolation methods currently implemented in HARK include (multi)linear interpolation up to 4D, 1D cubic spline interpolation, (multi)linear interpolation over 1D interpolations (up to 4D total), (multi)linear interpolation over 2D interpolations (up to 4D total), linear interpolation over 3D interpolations, 2D curvilinear interpolation over irregular grids, and a 1D ''lower envelope'' interpolator. See [here](https://hark.readthedocs.io/en/latest/reference/tools/interpolation.html) for further documentation. +Interpolation methods currently implemented in HARK include (multi)linear interpolation up to 4D, 1D cubic spline interpolation, (multi)linear interpolation over 1D interpolations (up to 4D total), (multi)linear interpolation over 2D interpolations (up to 4D total), linear interpolation over 3D interpolations, 2D curvilinear interpolation over irregular grids, and a 1D ''lower envelope'' interpolator. See [here](https://hark.readthedocs.io/en/latest/reference/tools/interpolation.html) for further documentation. #### HARK.simulation -The ***HARK.simulation*** module provides tools for generating simulated data or shocks for post-solution use of models. Currently implemented distributions include normal, lognormal, Weibull (including exponential), uniform, Bernoulli, and discrete. As an example of their use, these tools are used in the consumption-saving models of ***ConsIndShockModel.py*** to simulate permanent and transitory income shocks as well as unemployment events. See [here](https://hark.readthedocs.io/en/latest/reference/tools/simulation.html) for further documentation. +The **_HARK.simulation_** module provides tools for generating simulated data or shocks for post-solution use of models. Currently implemented distributions include normal, lognormal, Weibull (including exponential), uniform, Bernoulli, and discrete. As an example of their use, these tools are used in the consumption-saving models of **_ConsIndShockModel.py_** to simulate permanent and transitory income shocks as well as unemployment events. See [here](https://hark.readthedocs.io/en/latest/reference/tools/simulation.html) for further documentation. #### HARK.estimation -Methods for optimizing an objective function for the purposes of estimating a model can be found in ***HARK.estimation***. As of this writing, the implementation includes only minimization by the Nelder-Mead simplex method, minimization by a derivative-free Powell method variant, and two small tools for resampling data (i.e. for a bootstrap); the minimizers are merely convenience wrappers (with result reporting) for optimizers included in ***scipy.optimize***. Future functionality will include more robust global search methods, including genetic algorithms, simulated annealing, and differential evolution. See [here](https://hark.readthedocs.io/en/latest/reference/tools/estimation.html) for full documentation. +Methods for optimizing an objective function for the purposes of estimating a model can be found in **_HARK.estimation_**. As of this writing, the implementation includes only minimization by the Nelder-Mead simplex method, minimization by a derivative-free Powell method variant, and two small tools for resampling data (i.e. for a bootstrap); the minimizers are merely convenience wrappers (with result reporting) for optimizers included in **_scipy.optimize_**. Future functionality will include more robust global search methods, including genetic algorithms, simulated annealing, and differential evolution. See [here](https://hark.readthedocs.io/en/latest/reference/tools/estimation.html) for full documentation. #### HARK.parallel -By default, processes in Python are single-threaded, using only a single CPU core. The ***HARK.parallel*** module provides basic tools for using multiple CPU cores simultaneously, with minimal effort. [4](#myfootnote4) In particular, it provides the function ***multiThreadCommands***, which takes two arguments: a list of ***AgentType***s and a list of commands as strings; each command should be a method of the ***AgentType***s. The function simply distributes the ***AgentType***s across threads on different cores and executes each command in order, returning no output (the ***AgentType***s themselves are changed by running the commands). Equivalent results would be achieved by simply looping over each type and running each method in the list. Indeed, ***HARK.parallel*** also has a function called ***multiThreadCommandsFake*** that does just that, with identical syntax to ***multiThreadCommands***; multithreading in HARK can thus be easily turned on and off. [5](#myfootnote5) The module also has functions for a parallel implementation of the Nelder-Mead simplex algorithm, as described in Wiswall and Lee (2011). See [here](https://hark.readthedocs.io/en/latest/reference/tools/parallel.html) for full documentation. - +By default, processes in Python are single-threaded, using only a single CPU core. The **_HARK.parallel_** module provides basic tools for using multiple CPU cores simultaneously, with minimal effort. [4](#myfootnote4) In particular, it provides the function **_multiThreadCommands_**, which takes two arguments: a list of **_AgentType_**s and a list of commands as strings; each command should be a method of the **_AgentType_**s. The function simply distributes the **_AgentType_**s across threads on different cores and executes each command in order, returning no output (the **_AgentType_**s themselves are changed by running the commands). Equivalent results would be achieved by simply looping over each type and running each method in the list. Indeed, **_HARK.parallel_** also has a function called **_multiThreadCommandsFake_** that does just that, with identical syntax to **_multiThreadCommands_**; multithreading in HARK can thus be easily turned on and off. [5](#myfootnote5) The module also has functions for a parallel implementation of the Nelder-Mead simplex algorithm, as described in Wiswall and Lee (2011). See [here](https://hark.readthedocs.io/en/latest/reference/tools/parallel.html) for full documentation. -4: ***HARK.parallel*** uses two packages that aren't included in the default distribution of Anaconda: ***joblib*** and ***dill***; see [here](https://hark.readthedocs.io/en/latest/quick-start.html#using-hark-with-anaconda) for instructions on how to install them. [↩](#a4) +4: **_HARK.parallel_** uses two packages that aren't included in the default distribution of Anaconda: **_joblib_** and **_dill_**; see [here](https://hark.readthedocs.io/en/latest/quick-start.html#using-hark-with-anaconda) for instructions on how to install them. [↩](#a4) -5: In the future, ***HARK.parallel*** might be absorbed into ***HARK.core*** and ***HARK.estimation***, particularly if ***joblib*** and ***dill*** become part of the standard Anaconda distribution. [↩](#a5) +5: In the future, **_HARK.parallel_** might be absorbed into **_HARK.core_** and **_HARK.estimation_**, particularly if **_joblib_** and **_dill_** become part of the standard Anaconda distribution. [↩](#a5) ### AgentType Class -The core of our microeconomic dynamic optimization framework is a flexible object-oriented representation of economic agents. The ***HARK.core*** module defines a superclass called ***AgentType***; each model defines a subclass of ***AgentType***, specifying additional model-specific features and methods while inheriting the methods of the superclass. Most importantly, the method ***solve*** acts as a ''universal solver'' applicable to any (properly formatted) discrete time model. This section describes the format of an instance of ***AgentType*** as it defines a dynamic microeconomic problem. Note that each instance of ***AgentType*** represents an *ex-ante* heterogeneous ''type'' of agent; *ex-post* heterogeneity is achieved by simulating many agents of the same type, each of whom receives a unique sequence of shocks. +The core of our microeconomic dynamic optimization framework is a flexible object-oriented representation of economic agents. The **_HARK.core_** module defines a superclass called **_AgentType_**; each model defines a subclass of **_AgentType_**, specifying additional model-specific features and methods while inheriting the methods of the superclass. Most importantly, the method **_solve_** acts as a ''universal solver'' applicable to any (properly formatted) discrete time model. This section describes the format of an instance of **_AgentType_** as it defines a dynamic microeconomic problem. Note that each instance of **_AgentType_** represents an _ex-ante_ heterogeneous ''type'' of agent; _ex-post_ heterogeneity is achieved by simulating many agents of the same type, each of whom receives a unique sequence of shocks. #### Attributes of an AgentType -A discrete time model in our framework is characterized by a sequence of ''periods'' that the agent will experience. A well-formed instance of ***AgentType*** includes the following attributes: +A discrete time model in our framework is characterized by a sequence of ''periods'' that the agent will experience. A well-formed instance of **_AgentType_** includes the following attributes: -* ***solveOnePeriod***: A function, or a list of functions, representing the solution method for a single period of the agent's problem. The inputs passed to a ***solveOnePeriod*** function include all data that characterize the agent's problem in that period, including the solution to the subsequent period's problem (designated as ***solution_next***). The output of these functions is a single ***Solution*** object, which can be passed to the solver for the previous period. +- **_solveOnePeriod_**: A function, or a list of functions, representing the solution method for a single period of the agent's problem. The inputs passed to a **_solveOnePeriod_** function include all data that characterize the agent's problem in that period, including the solution to the subsequent period's problem (designated as **_solution_next_**). The output of these functions is a single **_Solution_** object, which can be passed to the solver for the previous period. -* ***time_inv***: A list of strings containing all of the variable names that are passed to at least one function in ***solveOnePeriod*** but do *not* vary across periods. Each of these variables resides in a correspondingly named attribute of the ***AgentType*** instance. +- **_time_inv_**: A list of strings containing all of the variable names that are passed to at least one function in **_solveOnePeriod_** but do _not_ vary across periods. Each of these variables resides in a correspondingly named attribute of the **_AgentType_** instance. -* ***time_vary***: A list of strings naming the attributes of this instance that vary across periods. Each of these attributes is a list of period-specific values, which should be of the same length. If the solution method varies across periods, then ***'solveOnePeriod'*** is an element of ***time_vary***. [6](#myfootnote6) +- **_time_vary_**: A list of strings naming the attributes of this instance that vary across periods. Each of these attributes is a list of period-specific values, which should be of the same length. If the solution method varies across periods, then **_'solveOnePeriod'_** is an element of **_time_vary_**. [6](#myfootnote6) -* ***solution_terminal***: An object representing the solution to the ''terminal'' period of the model. This might represent a known trivial solution that does not require numeric methods, the solution to some previously solved ''next phase'' of the model, a scrap value function, or an initial guess of the solution to an infinite horizon model. +- **_solution_terminal_**: An object representing the solution to the ''terminal'' period of the model. This might represent a known trivial solution that does not require numeric methods, the solution to some previously solved ''next phase'' of the model, a scrap value function, or an initial guess of the solution to an infinite horizon model. -* ***pseudo_terminal***: A Boolean flag indicating that ***solution_terminal*** is not a proper terminal period solution (rather an initial guess, ''next phase'' solution, or scrap value) and should not be reported as part of the model's solution. +- **_pseudo_terminal_**: A Boolean flag indicating that **_solution_terminal_** is not a proper terminal period solution (rather an initial guess, ''next phase'' solution, or scrap value) and should not be reported as part of the model's solution. -* ***cycles***: A non-negative integer indicating the number of times the agent will experience the sequence of periods in the problem. For example, ***cycles = 1*** means that the sequence of periods is analogous to a lifecycle model, experienced once from beginning to end; ***cycles = 2*** means that the agent experiences the sequence twice, with the first period in the sequence following the last. An infinite horizon problem in which the sequence of periods repeats indefinitely is indicated with ***cycles = 0***. +- **_cycles_**: A non-negative integer indicating the number of times the agent will experience the sequence of periods in the problem. For example, **_cycles = 1_** means that the sequence of periods is analogous to a lifecycle model, experienced once from beginning to end; **_cycles = 2_** means that the agent experiences the sequence twice, with the first period in the sequence following the last. An infinite horizon problem in which the sequence of periods repeats indefinitely is indicated with **_cycles = 0_**. -* ***tolerance***: A positive real number indicating convergence tolerance, representing the maximum acceptable ''distance'' between successive cycle solutions in an infinite horizon model; it is irrelevant when ***cycles > 0***. As the distance metric on the space of solutions is model-specific, the value of ***tolerance*** is generally dimensionless. +- **_tolerance_**: A positive real number indicating convergence tolerance, representing the maximum acceptable ''distance'' between successive cycle solutions in an infinite horizon model; it is irrelevant when **_cycles > 0_**. As the distance metric on the space of solutions is model-specific, the value of **_tolerance_** is generally dimensionless. -* ***time_flow***: A Boolean flag indicating the direction that time is ''flowing.'' When ***True***, the variables listed in ***time_vary*** are listed in ordinary chronological order, with index 0 being the first period; when ***False***, these lists are in reverse chronological order, with index 0 holding the last period. +- **_time_flow_**: A Boolean flag indicating the direction that time is ''flowing.'' When **_True_**, the variables listed in **_time_vary_** are listed in ordinary chronological order, with index 0 being the first period; when **_False_**, these lists are in reverse chronological order, with index 0 holding the last period. -An instance of ***AgentType*** also has the attributes named in ***time_vary*** and ***time_inv***, and may have other attributes that are not included in either (e.g. values not used in the model solution, but instead to construct objects used in the solution). +An instance of **_AgentType_** also has the attributes named in **_time_vary_** and **_time_inv_**, and may have other attributes that are not included in either (e.g. values not used in the model solution, but instead to construct objects used in the solution). - -6: ***time_vary*** may include attributes that are never used by a function in ***solveOnePeriod***. Most saliently, the attribute ***solution*** is time-varying but is not used to solve individual periods. [↩](#b1) +6: **_time_vary_** may include attributes that are never used by a function in **_solveOnePeriod_**. Most saliently, the attribute **_solution_** is time-varying but is not used to solve individual periods. [↩](#b1) #### A Universal Solver -When an instance of ***AgentType*** invokes its ***solve*** method, the solution to the agent's problem is stored in the attribute ***solution***. The solution is computed by recursively solving the sequence of periods defined by the variables listed in ***time_vary*** and ***time_inv*** using the functions in ***solveOnePeriod***. The time-varying inputs are updated each period, including the successive period's solution as ***solution_next***; the same values of time invariant inputs in ***time_inv*** are passed to the solver in every period. The first call to ***solveOnePeriod*** uses ***solution_terminal*** as ***solution_next***. In a finite horizon problem, the sequence of periods is solved ***cycles*** times over; in an infinite horizon problem, the sequence of periods is solved until the solutions of successive cycles have a ''distance'' of less than ***tolerance***. +When an instance of **_AgentType_** invokes its **_solve_** method, the solution to the agent's problem is stored in the attribute **_solution_**. The solution is computed by recursively solving the sequence of periods defined by the variables listed in **_time_vary_** and **_time_inv_** using the functions in **_solveOnePeriod_**. The time-varying inputs are updated each period, including the successive period's solution as **_solution_next_**; the same values of time invariant inputs in **_time_inv_** are passed to the solver in every period. The first call to **_solveOnePeriod_** uses **_solution_terminal_** as **_solution_next_**. In a finite horizon problem, the sequence of periods is solved **_cycles_** times over; in an infinite horizon problem, the sequence of periods is solved until the solutions of successive cycles have a ''distance'' of less than **_tolerance_**. -The output from a function in ***solveOnePeriod*** is an instance of a model-specific solution class. The attributes of a solution to one period of a problem might include behavioral functions, (marginal) value functions, and other variables characterizing the result. Each solution class must have a method called ***distance()***, which returns the ''distance'' between itself and another instance of the same solution class, so as to define convergence as a stopping criterion; for many models, this will be the ''distance'' between a policy or value function in the solutions. If the solution class is defined as a subclass of ***HARKobject***, it automatically inherits the default ***distance*** method, so that the user must only list the relevant object attributes in ***distance_criteria***. +The output from a function in **_solveOnePeriod_** is an instance of a model-specific solution class. The attributes of a solution to one period of a problem might include behavioral functions, (marginal) value functions, and other variables characterizing the result. Each solution class must have a method called **_distance()_**, which returns the ''distance'' between itself and another instance of the same solution class, so as to define convergence as a stopping criterion; for many models, this will be the ''distance'' between a policy or value function in the solutions. If the solution class is defined as a subclass of **_HARKobject_**, it automatically inherits the default **_distance_** method, so that the user must only list the relevant object attributes in **_distance_criteria_**. -The ***AgentType*** also has methods named ***preSolve*** and ***postSolve***, both of which take no arguments and do absolutely nothing. A subclass of ***AgentType*** can overwrite these blank methods with its own model specific methods. ***preSolve*** is automatically called near the beginning of the ***solve*** method, before solving the sequence of periods. It is used for specifying tasks that should be done before solving the sequence of periods, such as pre-constructing some objects repeatedly used by the solution method or finding an analytical terminal period solution. For example, the ***IndShockConsumerType*** class in ***ConsIndShockModel*** has a ***preSolve*** method that calls its ***updateSolutionTerminal*** method to ensure that ***solution_terminal*** is consistent with the model parameters. The ***postSolve*** method is called shortly after the sequence of periods is fully solved; it can be used for ''post-processing'' of the solution or performing a step that is only useful after solution convergence. For example, the ***TractableConsumerType*** in ***TractableBufferStockModel*** has a ***postSolve*** method that constructs an interpolated consumption function from the list of stable arm points found during solution. +The **_AgentType_** also has methods named **_preSolve_** and **_postSolve_**, both of which take no arguments and do absolutely nothing. A subclass of **_AgentType_** can overwrite these blank methods with its own model specific methods. **_preSolve_** is automatically called near the beginning of the **_solve_** method, before solving the sequence of periods. It is used for specifying tasks that should be done before solving the sequence of periods, such as pre-constructing some objects repeatedly used by the solution method or finding an analytical terminal period solution. For example, the **_IndShockConsumerType_** class in **_ConsIndShockModel_** has a **_preSolve_** method that calls its **_updateSolutionTerminal_** method to ensure that **_solution_terminal_** is consistent with the model parameters. The **_postSolve_** method is called shortly after the sequence of periods is fully solved; it can be used for ''post-processing'' of the solution or performing a step that is only useful after solution convergence. For example, the **_TractableConsumerType_** in **_TractableBufferStockModel_** has a **_postSolve_** method that constructs an interpolated consumption function from the list of stable arm points found during solution. -Our universal solver is written in a very general way that should be applicable to any discrete time optimization problem-- because Python is so flexible in defining objects, the time-varying inputs for each period can take any form. Indeed, the solver does no ''real work'' itself, but merely provides a structure for describing models in the HARK framework, allowing interoperability among current and future modules. +Our universal solver is written in a very general way that should be applicable to any discrete time optimization problem-- because Python is so flexible in defining objects, the time-varying inputs for each period can take any form. Indeed, the solver does no ''real work'' itself, but merely provides a structure for describing models in the HARK framework, allowing interoperability among current and future modules. #### The Flow of Time and Other Methods -Because dynamic optimization problems are solved recursively in our framework, it is natural to list time-varying values in reverse chronological order-- the ***solve()*** method loops over the values in each time-varying list in the same direction that a human would read them. When simulating agents after the solution has been obtained, however, it is much more convenient for time-varying parameters to be listed in ordinary chronological order-- the direction in which they will be experienced by simulated agents. To allow the user to set the order in which ''time is flowing'' for an instance of ***AgentType, the HARK framework includes functionality to easily change ordering of time-varying values. +Because dynamic optimization problems are solved recursively in our framework, it is natural to list time-varying values in reverse chronological order-- the **_solve()_** method loops over the values in each time-varying list in the same direction that a human would read them. When simulating agents after the solution has been obtained, however, it is much more convenient for time-varying parameters to be listed in ordinary chronological order-- the direction in which they will be experienced by simulated agents. To allow the user to set the order in which ''time is flowing'' for an instance of \*\*\*AgentType, the HARK framework includes functionality to easily change ordering of time-varying values. -The attribute ***time_flow*** is ***True*** if variables are listed in ordinary chronological order and ***False*** otherwise. ***AgentType*** has the following methods for manipulating time: +The attribute **_time_flow_** is **_True_** if variables are listed in ordinary chronological order and **_False_** otherwise. **_AgentType_** has the following methods for manipulating time: -* ***timeReport()***: Prints to screen a description of the direction that time is flowing, for interactive convenience and as a reminder of the functionality. +- **_timeReport()_**: Prints to screen a description of the direction that time is flowing, for interactive convenience and as a reminder of the functionality. -* ***timeFlip()***: Flips the direction of time. Each attribute listed in ***time_vary*** is reversed in place, and the value of ***time_flow*** is toggled. +- **_timeFlip()_**: Flips the direction of time. Each attribute listed in **_time_vary_** is reversed in place, and the value of **_time_flow_** is toggled. -* ***timeFwd()***: Sets the direction of time to ordinary chronological order. +- **_timeFwd()_**: Sets the direction of time to ordinary chronological order. -* ***timeRev()***: Sets the direction of time to reverse chronological order. +- **_timeRev()_**: Sets the direction of time to reverse chronological order. -These methods are invoked to more conveniently access time-varying objects. When a new time-varying attribute is added, its name should be appended to ***time_vary***, particularly if its values are used in the solution of the model (or is part of the solution itself). For example, the ***solve()*** method automatically adds the string ***'solution'*** to ***time_vary*** if it is not already present. Note that attributes listed in ***time_vary*** *must* be lists if ***solve()*** or ***timeFlip()*** are used. Some values that could be considered ''time varying'' but are never used to solve the model are more conveniently represented as a ***numpy.array*** object (e.g. the history of a state or control variable from a simulation); because the ***numpy.array*** class does not have a ***reverse()*** method, these attributes should not be listed in ***time_vary***. +These methods are invoked to more conveniently access time-varying objects. When a new time-varying attribute is added, its name should be appended to **_time_vary_**, particularly if its values are used in the solution of the model (or is part of the solution itself). For example, the **_solve()_** method automatically adds the string **_'solution'_** to **_time_vary_** if it is not already present. Note that attributes listed in **_time_vary_** _must_ be lists if **_solve()_** or **_timeFlip()_** are used. Some values that could be considered ''time varying'' but are never used to solve the model are more conveniently represented as a **_numpy.array_** object (e.g. the history of a state or control variable from a simulation); because the **_numpy.array_** class does not have a **_reverse()_** method, these attributes should not be listed in **_time_vary_**. -The base ***AgentType*** is sparsely defined, as most ''real'' methods will be application-specific. Two final methods bear mentioning. First, the ***__call__*** method points to ***assignParameters()***, a convenience method for adding or adjusting attributes (inherited from ***HARKobject***). This method takes any number of keyword arguments, so that code can be parsimoniously written as, for example, ***AgentInstance(attribute1 = value1, attribute2 = value2)***. Using Python's dictionary capabilities, many attributes can be conveniently set with minimal code. Second, the ***resetRNG*** method simply resets the ***AgentType***'s random number generator (as the attribute ***RNG***) using the value in the attribute ***seed***. [7](#myfootnote7) This method is useful for (*inter alia*) ensuring that the same underlying sequence of shocks is used for every simulation run when a model is solved or estimated. +The base **_AgentType_** is sparsely defined, as most ''real'' methods will be application-specific. Two final methods bear mentioning. First, the **\_**call**\_** method points to **_assignParameters()_**, a convenience method for adding or adjusting attributes (inherited from **_HARKobject_**). This method takes any number of keyword arguments, so that code can be parsimoniously written as, for example, **_AgentInstance(attribute1 = value1, attribute2 = value2)_**. Using Python's dictionary capabilities, many attributes can be conveniently set with minimal code. Second, the **_resetRNG_** method simply resets the **_AgentType_**'s random number generator (as the attribute **_RNG_**) using the value in the attribute **_seed_**. [7](#myfootnote7) This method is useful for (_inter alia_) ensuring that the same underlying sequence of shocks is used for every simulation run when a model is solved or estimated. -7: Every instance of ***AgentType*** is created with a random number generator as an instance of the class ***numpy.random.RandomState***, with a default ***seed*** of zero. [↩](#b2) +7: Every instance of **_AgentType_** is created with a random number generator as an instance of the class **_numpy.random.RandomState_**, with a default **_seed_** of zero. [↩](#b2) ### Market Class -The modeling framework of ***AgentType*** is deemed ''microeconomic'' because it pertains only to the dynamic optimization problem of agents, treating all inputs of the problem as exogenously fixed. In what we label as ''macroeconomic'' models, some of the inputs for the microeconomic models are endogenously determined by the collective states and controls of agents in the model. In a dynamic general equilibrium, there must be consistency between agents' beliefs about these macroeconomic objects, their individual behavior, and the realizations of the macroeconomic objects that result from individual choices. +The modeling framework of **_AgentType_** is deemed ''microeconomic'' because it pertains only to the dynamic optimization problem of agents, treating all inputs of the problem as exogenously fixed. In what we label as ''macroeconomic'' models, some of the inputs for the microeconomic models are endogenously determined by the collective states and controls of agents in the model. In a dynamic general equilibrium, there must be consistency between agents' beliefs about these macroeconomic objects, their individual behavior, and the realizations of the macroeconomic objects that result from individual choices. -The ***Market*** class in ***HARK.core*** provides a framework for such macroeconomic models, with a ***solve*** method that searches for a dynamic general equilibrium. An instance of ***Market*** includes a list of ***AgentType***s that compose the economy, a method for transforming microeconomic outcomes (states, controls, and/or shocks) into macroeconomic outcomes, and a method for interpreting a history or sequence of macroeconomic outcomes into a new ''dynamic rule'' for agents to believe. Agents treat the dynamic rule as an input to their microeconomic problem, conditioning their optimal policy functions on it. A dynamic general equilibrium is a fixed point dynamic rule: when agents act optimally while believing the equilibrium rule, their individual actions generate a macroeconomic history consistent with the equilibrium rule. +The **_Market_** class in **_HARK.core_** provides a framework for such macroeconomic models, with a **_solve_** method that searches for a dynamic general equilibrium. An instance of **_Market_** includes a list of **_AgentType_**s that compose the economy, a method for transforming microeconomic outcomes (states, controls, and/or shocks) into macroeconomic outcomes, and a method for interpreting a history or sequence of macroeconomic outcomes into a new ''dynamic rule'' for agents to believe. Agents treat the dynamic rule as an input to their microeconomic problem, conditioning their optimal policy functions on it. A dynamic general equilibrium is a fixed point dynamic rule: when agents act optimally while believing the equilibrium rule, their individual actions generate a macroeconomic history consistent with the equilibrium rule. #### Down on the Farm -The ***Market*** class uses a farming metaphor to conceptualize the process for generating a history of macroeconomic outcomes in a model. Suppose all ***AgentTypes*** in the economy believe in some dynamic rule (i.e. the rule is stored as attributes of each ***AgentType***, which directly or indirectly enters their dynamic optimization problem), and that they have each found the solution to their microeconomic model using their ***solve*** method. Further, the macroeconomic and microeconomic states have been reset to some initial orientation. +The **_Market_** class uses a farming metaphor to conceptualize the process for generating a history of macroeconomic outcomes in a model. Suppose all **_AgentTypes_** in the economy believe in some dynamic rule (i.e. the rule is stored as attributes of each **_AgentType_**, which directly or indirectly enters their dynamic optimization problem), and that they have each found the solution to their microeconomic model using their **_solve_** method. Further, the macroeconomic and microeconomic states have been reset to some initial orientation. -To generate a history of macroeconomic outcomes, the ***Market*** repeatedly loops over the following steps a set number of times: +To generate a history of macroeconomic outcomes, the **_Market_** repeatedly loops over the following steps a set number of times: -* ***sow***: Distribute the macroeconomic state variables to all ***AgentType***s in the market. +- **_sow_**: Distribute the macroeconomic state variables to all **_AgentType_**s in the market. -* ***cultivate***: Each ***AgentType*** executes their ***marketAction*** method, likely corresponding to simulating one period of the microeconomic model. +- **_cultivate_**: Each **_AgentType_** executes their **_marketAction_** method, likely corresponding to simulating one period of the microeconomic model. -* ***reap***: Microeconomic outcomes are gathered from each ***AgentType*** in the market. +- **_reap_**: Microeconomic outcomes are gathered from each **_AgentType_** in the market. -* ***mill***: Data gathered by ***reap*** is processed into new macroeconomic states according to some ''aggregate market process''. +- **_mill_**: Data gathered by **_reap_** is processed into new macroeconomic states according to some ''aggregate market process''. -* ***store***: Relevant macroeconomic states are added to a running history of outcomes. +- **_store_**: Relevant macroeconomic states are added to a running history of outcomes. -This procedure is conducted by the ***makeHistory*** method of ***Market*** as a subroutine of its ***solve*** method. After making histories of the relevant macroeconomic variables, the market then executes its ***calcDynamics*** function with the macroeconomic history as inputs, generating a new dynamic rule to distribute to the ***AgentType***s in the market. The process then begins again, with the agents solving their updated microeconomic models given the new dynamic rule; the ***solve*** loop continues until the ''distance'' between successive dynamic rules is sufficiently small. +This procedure is conducted by the **_makeHistory_** method of **_Market_** as a subroutine of its **_solve_** method. After making histories of the relevant macroeconomic variables, the market then executes its **_calcDynamics_** function with the macroeconomic history as inputs, generating a new dynamic rule to distribute to the **_AgentType_**s in the market. The process then begins again, with the agents solving their updated microeconomic models given the new dynamic rule; the **_solve_** loop continues until the ''distance'' between successive dynamic rules is sufficiently small. #### Attributes of a Market -To specify a complete instance of ***Market***, the user should give it the following attributes: [8](#myfootnote8) - -* ***agents***: A list of ***AgentType***s, representing the agents in the market. Each element in ***agents*** represents an *ex-ante* heterogeneous type; each type could have many *ex-post* heterogeneous agents. - -* ***sow_vars***: A list of strings naming variables that are output from the aggregate market process, representing the macroeconomic outcomes. These variables will be distributed to the ***agents*** in the ***sow*** step. +To specify a complete instance of **_Market_**, the user should give it the following attributes: [8](#myfootnote8) -* ***reap_vars***: A list of strings naming variables to be collected from the ***agents*** in the ***reap*** step, to be used as inputs for the aggregate market process. +- **_agents_**: A list of **_AgentType_**s, representing the agents in the market. Each element in **_agents_** represents an _ex-ante_ heterogeneous type; each type could have many _ex-post_ heterogeneous agents. -* ***const_vars***: A list of strings naming variables used by the aggregate market process that *do not* come from ***agents***; they are constant or come from the ***Market*** itself. +- **_sow_vars_**: A list of strings naming variables that are output from the aggregate market process, representing the macroeconomic outcomes. These variables will be distributed to the **_agents_** in the **_sow_** step. -* ***track_vars***: A list of strings naming variables generated by the aggregate market process that should be tracked as a history, to be used when calculating a new dynamic rule. Usually a subset of ***sow_vars***. +- **_reap_vars_**: A list of strings naming variables to be collected from the **_agents_** in the **_reap_** step, to be used as inputs for the aggregate market process. -* ***dyn_vars***: A list of strings naming the variables that constitute a dynamic rule. These will be stored as attributes of the ***agents*** whenever a new rule is calculated. +- **_const_vars_**: A list of strings naming variables used by the aggregate market process that _do not_ come from **_agents_**; they are constant or come from the **_Market_** itself. -* ***millRule***: A function for the ''aggregate market process'', transforming microeconomic outcomes into macroeconomic outcomes. Its inputs are named in ***reap_vars*** and ***const_vars***, and it returns a single object with attributes named in ***sow_vars*** and/or ***track_vars***. Can be defined as a method of a subclass of ***Market***. +- **_track_vars_**: A list of strings naming variables generated by the aggregate market process that should be tracked as a history, to be used when calculating a new dynamic rule. Usually a subset of **_sow_vars_**. -* ***calcDynamics***: A function that generates a new dynamic rule from a history of macroeconomic outcomes. Its inputs are named in ***track_vars***, and it returns a single object with attributes named in ***dyn_vars***. +- **_dyn_vars_**: A list of strings naming the variables that constitute a dynamic rule. These will be stored as attributes of the **_agents_** whenever a new rule is calculated. -* ***act_T***: The number of times that the ***makeHistory*** method should execute the ''farming loop'' when generating a new macroeconomic history. +- **_millRule_**: A function for the ''aggregate market process'', transforming microeconomic outcomes into macroeconomic outcomes. Its inputs are named in **_reap_vars_** and **_const_vars_**, and it returns a single object with attributes named in **_sow_vars_** and/or **_track_vars_**. Can be defined as a method of a subclass of **_Market_**. -* ***tolerance***: The minimum acceptable ''distance'' between successive dynamic rules produced by ***calcDynamics*** to constitute a sufficiently converged solution. +- **_calcDynamics_**: A function that generates a new dynamic rule from a history of macroeconomic outcomes. Its inputs are named in **_track_vars_**, and it returns a single object with attributes named in **_dyn_vars_**. +- **_act_T_**: The number of times that the **_makeHistory_** method should execute the ''farming loop'' when generating a new macroeconomic history. -Further, each ***AgentType*** in ***agents*** must have two methods not necessary for microeconomic models; neither takes any input (except ***self***): +- **_tolerance_**: The minimum acceptable ''distance'' between successive dynamic rules produced by **_calcDynamics_** to constitute a sufficiently converged solution. -* ***marketAction***: The microeconomic process to be run in the ***cultivate*** step. Likely uses the new macroeconomic outcomes named in ***sow_vars***; should store new values of relevant microeconomic outcomes in the attributes (of ***self***) named in ***reap_vars***. +Further, each **_AgentType_** in **_agents_** must have two methods not necessary for microeconomic models; neither takes any input (except **_self_**): -* ***reset***: Reset, initialize, or prepare for a new ''farming loop'' to generate a macroeconomic history. Might reset its internal random number generator, set initial state variables, clear personal histories, etc. +- **_marketAction_**: The microeconomic process to be run in the **_cultivate_** step. Likely uses the new macroeconomic outcomes named in **_sow_vars_**; should store new values of relevant microeconomic outcomes in the attributes (of **_self_**) named in **_reap_vars_**. +- **_reset_**: Reset, initialize, or prepare for a new ''farming loop'' to generate a macroeconomic history. Might reset its internal random number generator, set initial state variables, clear personal histories, etc. -When solving macroeconomic models in HARK, the user should also define classes to represent the output from the aggregate market process in ***millRule*** and for the model-specific dynamic rule. The latter should have a ***distance*** method to test for solution convergence; if the class inherits from ***HARKobject***, the user need only list relevant attributes in ***distance_criteria***. +When solving macroeconomic models in HARK, the user should also define classes to represent the output from the aggregate market process in **_millRule_** and for the model-specific dynamic rule. The latter should have a **_distance_** method to test for solution convergence; if the class inherits from **_HARKobject_**, the user need only list relevant attributes in **_distance_criteria_**. - -8: For some purposes, it might be useful to specify a subclass of ***Market***, defining ***millRule*** and/or ***calcDynamics*** as methods rather than functions. [↩](#c1) +8: For some purposes, it might be useful to specify a subclass of **_Market_**, defining **_millRule_** and/or **_calcDynamics_** as methods rather than functions. [↩](#c1) ## DemARK -If you want to get a feeling for how the code works and what you can do with it, check out the DemARK [repository](https://github.com/econ-ark/DEMARK) which contains many useful demonstrations of tools, AgentTypes, and ModelClasses. +If you want to get a feeling for how the code works and what you can do with it, check out the DemARK [repository](https://github.com/econ-ark/DEMARK) which contains many useful demonstrations of tools, AgentTypes, and ModelClasses. If you want to run the notebooks on your own machine make sure to install the necessary packages described in the readme file. Afterwards you can dive in the notebook folder. Each example has a markdown (.md) version with explanatory notes. The notebook (.ipynb) describes the method and runs (part of the) code. - ## REMARK -HARK can be used to replicate papers as well. For this purpose the *R*[eplications/eproductions] and *E*xplorations *M*ade using *ARK* (REMARK) [repository](https://github.com/econ-ark/REMARK) was created. +HARK can be used to replicate papers as well. For this purpose the _R_[eplications/eproductions] and *E*xplorations *M*ade using _ARK_ (REMARK) [repository](https://github.com/econ-ark/REMARK) was created. -Each replication consists of a *metadata file* (.md) with an overview, a *notebook* which replicates the paper, and a *requirement.txt* file with the necessary packages to run the notebooks on your local mashine. +Each replication consists of a _metadata file_ (.md) with an overview, a _notebook_ which replicates the paper, and a _requirement.txt_ file with the necessary packages to run the notebooks on your local mashine. diff --git a/Documentation/CHANGELOG.md b/Documentation/CHANGELOG.md index f35856528..700944080 100644 --- a/Documentation/CHANGELOG.md +++ b/Documentation/CHANGELOG.md @@ -14,50 +14,50 @@ Release Date: TBD ### Major Changes -* Updates the DCEGM tools to address the flaws identified in [issue #1062](https://github.com/econ-ark/HARK/issues/1062). PR: [1100](https://github.com/econ-ark/HARK/pull/1100). -* Updates `IndexDstn`, introducing the option to use an existing RNG instead of creating a new one, and creating and storing all the conditional distributions at initialization. [1104](https://github.com/econ-ark/HARK/pull/1104) -* `make_shock_history` and `read_shocks == True` now store and use the random draws that determine newborn's initial states [#1101](https://github.com/econ-ark/HARK/pull/1101). -* `FrameModel` and `FrameSet` classes introduced for more modular construction of framed models. `FrameAgentType` dedicated to simulation. [#1117](https://github.com/econ-ark/HARK/pull/1117) -* General control transitions based on decision rules in `FrameAgentType`. [#1117](https://github.com/econ-ark/HARK/pull/1117) -* Adds `distr_of_function` tool to calculate the distribution of a function of a discrete random variable. [#1144](https://github.com/econ-ark/HARK/pull/1144) -* Changes the `DiscreteDistribution` class to allow for arbitrary array-valued random variables. [#1146](https://github.com/econ-ark/HARK/pull/1146) -* Adds `IndShockRiskyAssetConsumerType` as agent which can invest savings all in safe asset, all in risky asset, a fixed share in risky asset, or optimize its portfolio. [#1107](https://github.com/econ-ark/HARK/issues/1107) -* Updates all HARK models to allow for age-varying interest rates. [#1150](https://github.com/econ-ark/HARK/pull/1150) -* Adds `DiscreteDistribution.expected` method which expects vectorized functions and is faster than `HARK.distribution.calc_expectation`. [#1156](https://github.com/econ-ark/HARK/pull/1156) -* Adds `DiscreteDistributionXRA` class which extends `DiscreteDistribution` to allow for underlying data to be stored in a `xarray.DataArray` object. [#1156](https://github.com/econ-ark/HARK/pull/1156) -* Adds keyword argument `labels` to `expected()` when using `DiscreteDistributionXRA` to allow for expressive functions that use labeled xarrays. [#1156](https://github.com/econ-ark/HARK/pull/1156) -* Adds a wrapper for [`interpolation.py`](https://github.com/EconForge/interpolation.py) for fast multilinear interpolation. [#1151](https://github.com/econ-ark/HARK/pull/1151) -* Adds support for the calculation of dreivatives in the `interpolation.py` wrappers. [#1157](https://github.com/econ-ark/HARK/pull/1157) -* Adds class `DecayInterp` to `econforgeinterp.py`. It implements interpolators that "decay" to some limiting function when extrapolating. [#1165](https://github.com/econ-ark/HARK/pull/1165) -* Add methods to non stochastically simulate an economy by computing transition matrices. Functions to compute transition matrices and ergodic distribution have been added [#1155](https://github.com/econ-ark/HARK/pull/1155). -* Fixes a bug that causes `t_age` and `t_cycle` to get out of sync when reading pre-computed mortality. [#1181](https://github.com/econ-ark/HARK/pull/1181) -* Adds Methods to calculate Heterogenous Agent Jacobian matrices. [#1185](https://github.com/econ-ark/HARK/pull/1185) -* Enhances `combine_indep_dstns` to work with labeled distributions (`DiscreteDistributionLabeled`). [#1191](htttps://github.com/econ-ark/HARK/pull/1191) -* Updates the `numpy` random generator from `RandomState` to `Generator`. [#1193](https://github.com/econ-ark/HARK/pull/1193) -* Turns the income and income+return distributions into `DiscreteDistributionLabeled` objects. [#1189](https://github.com/econ-ark/HARK/pull/1189) -* Creates `UtilityFuncCRRA` which is an object oriented utility function with a coefficient of constant relative risk aversion and includes derivatives and inverses. Also creates `UtilityFuncCobbDouglas`, `UtilityFuncCobbDouglasCRRA`, and `UtilityFuncConstElastSubs`. [#1168](https://github.com/econ-ark/HARK/pull/1168) -* Reorganizes `HARK.distribution`. All distributions now inherit all features from `scipy.stats`. New `ContinuousFrozenDistribution` and `DiscreteFrozenDistribution` to use `scipy.stats` distributions not yet implemented in HARK. New `Distribution.discretize(N, method = "***")` replaces `Distribution.approx(N)`. New `DiscreteDistribution.limit` attribute describes continuous origin and discretization method. [#1197](https://github.com/econ-ark/HARK/pull/1197). -* Creates new class of *labeled* models under `ConsLabeledModel` that use xarray for more expressive modeling of underlying mathematical and economics variables. [#1177](https://github.com/econ-ark/HARK/pull/1177) +- Updates the DCEGM tools to address the flaws identified in [issue #1062](https://github.com/econ-ark/HARK/issues/1062). PR: [1100](https://github.com/econ-ark/HARK/pull/1100). +- Updates `IndexDstn`, introducing the option to use an existing RNG instead of creating a new one, and creating and storing all the conditional distributions at initialization. [1104](https://github.com/econ-ark/HARK/pull/1104) +- `make_shock_history` and `read_shocks == True` now store and use the random draws that determine newborn's initial states [#1101](https://github.com/econ-ark/HARK/pull/1101). +- `FrameModel` and `FrameSet` classes introduced for more modular construction of framed models. `FrameAgentType` dedicated to simulation. [#1117](https://github.com/econ-ark/HARK/pull/1117) +- General control transitions based on decision rules in `FrameAgentType`. [#1117](https://github.com/econ-ark/HARK/pull/1117) +- Adds `distr_of_function` tool to calculate the distribution of a function of a discrete random variable. [#1144](https://github.com/econ-ark/HARK/pull/1144) +- Changes the `DiscreteDistribution` class to allow for arbitrary array-valued random variables. [#1146](https://github.com/econ-ark/HARK/pull/1146) +- Adds `IndShockRiskyAssetConsumerType` as agent which can invest savings all in safe asset, all in risky asset, a fixed share in risky asset, or optimize its portfolio. [#1107](https://github.com/econ-ark/HARK/issues/1107) +- Updates all HARK models to allow for age-varying interest rates. [#1150](https://github.com/econ-ark/HARK/pull/1150) +- Adds `DiscreteDistribution.expected` method which expects vectorized functions and is faster than `HARK.distribution.calc_expectation`. [#1156](https://github.com/econ-ark/HARK/pull/1156) +- Adds `DiscreteDistributionXRA` class which extends `DiscreteDistribution` to allow for underlying data to be stored in a `xarray.DataArray` object. [#1156](https://github.com/econ-ark/HARK/pull/1156) +- Adds keyword argument `labels` to `expected()` when using `DiscreteDistributionXRA` to allow for expressive functions that use labeled xarrays. [#1156](https://github.com/econ-ark/HARK/pull/1156) +- Adds a wrapper for [`interpolation.py`](https://github.com/EconForge/interpolation.py) for fast multilinear interpolation. [#1151](https://github.com/econ-ark/HARK/pull/1151) +- Adds support for the calculation of dreivatives in the `interpolation.py` wrappers. [#1157](https://github.com/econ-ark/HARK/pull/1157) +- Adds class `DecayInterp` to `econforgeinterp.py`. It implements interpolators that "decay" to some limiting function when extrapolating. [#1165](https://github.com/econ-ark/HARK/pull/1165) +- Add methods to non stochastically simulate an economy by computing transition matrices. Functions to compute transition matrices and ergodic distribution have been added [#1155](https://github.com/econ-ark/HARK/pull/1155). +- Fixes a bug that causes `t_age` and `t_cycle` to get out of sync when reading pre-computed mortality. [#1181](https://github.com/econ-ark/HARK/pull/1181) +- Adds Methods to calculate Heterogenous Agent Jacobian matrices. [#1185](https://github.com/econ-ark/HARK/pull/1185) +- Enhances `combine_indep_dstns` to work with labeled distributions (`DiscreteDistributionLabeled`). [#1191](htttps://github.com/econ-ark/HARK/pull/1191) +- Updates the `numpy` random generator from `RandomState` to `Generator`. [#1193](https://github.com/econ-ark/HARK/pull/1193) +- Turns the income and income+return distributions into `DiscreteDistributionLabeled` objects. [#1189](https://github.com/econ-ark/HARK/pull/1189) +- Creates `UtilityFuncCRRA` which is an object oriented utility function with a coefficient of constant relative risk aversion and includes derivatives and inverses. Also creates `UtilityFuncCobbDouglas`, `UtilityFuncCobbDouglasCRRA`, and `UtilityFuncConstElastSubs`. [#1168](https://github.com/econ-ark/HARK/pull/1168) +- Reorganizes `HARK.distribution`. All distributions now inherit all features from `scipy.stats`. New `ContinuousFrozenDistribution` and `DiscreteFrozenDistribution` to use `scipy.stats` distributions not yet implemented in HARK. New `Distribution.discretize(N, method = "***")` replaces `Distribution.approx(N)`. New `DiscreteDistribution.limit` attribute describes continuous origin and discretization method. [#1197](https://github.com/econ-ark/HARK/pull/1197). +- Creates new class of _labeled_ models under `ConsLabeledModel` that use xarray for more expressive modeling of underlying mathematical and economics variables. [#1177](https://github.com/econ-ark/HARK/pull/1177) ### Minor Changes -* Updates the lognormal-income-process constructor from `ConsIndShockModel.py` to use `IndexDistribution`. [#1024](https://github.com/econ-ark/HARK/pull/1024), [#1115](https://github.com/econ-ark/HARK/pull/1115) -* Allows for age-varying unemployment probabilities and replacement incomes with the lognormal income process constructor. [#1112](https://github.com/econ-ark/HARK/pull/1112) -* Option to have newborn IndShockConsumerType agents with a transitory income shock in the first period. Default is false, meaning they only have a permanent income shock in period 1 and permanent AND transitory in the following ones. [#1126](https://github.com/econ-ark/HARK/pull/1126) -* Adds `benchmark` utility to profile the performance of `HARK` solvers. [#1131](https://github.com/econ-ark/HARK/pull/1131) -* Fixes scaling bug in Normal equiprobable approximation method. [1139](https://github.com/econ-ark/HARK/pull/1139) -* Removes the extra-dimension that was returned by `calc_expectations` in some instances. [#1149](https://github.com/econ-ark/HARK/pull/1149) -* Adds `HARK.distribution.expected` alias for `DiscreteDistribution.expected`. [#1156](https://github.com/econ-ark/HARK/pull/1156) -* Renames attributes in `DiscreteDistribution`: `X` to `atoms` and `pmf` to `pmv`. [#1164](https://github.com/econ-ark/HARK/pull/1164), [#1051](https://github.com/econ-ark/HARK/pull/1151), [#1159](https://github.com/econ-ark/HARK/pull/1159). -* Remove or replace automated tests that depend on brittle simulation results. [#1148](https://github.com/econ-ark/HARK/pull/1148) -* Updates asset grid constructor from `ConsIndShockModel.py` to allow for linearly-spaced grids when `aXtraNestFac == -1`. [#1172](https://github.com/econ-ark/HARK/pull/1172) -* Renames `DiscreteDistributionXRA` to `DiscreteDistributionLabeled` and updates methods [#1170](https://github.com/econ-ark/HARK/pull/1170) -* Renames `HARK.numba` to `HARK.numba_tools` [#1183](https://github.com/econ-ark/HARK/pull/1183) -* Adds the RNG seed as a property of `DiscreteDistributionLabeled` [#1184](https://github.com/econ-ark/HARK/pull/1184) -* Updates the `approx` method of `HARK.distributions.Uniform` to include the endpoints of the distribution with infinitesimally small (zero) probability mass. [#1180](https://github.com/econ-ark/HARK/pull/1180) -* Refactors tests to incorporate custom precision `HARK_PRECISION = 4`. [#1193](https://github.com/econ-ark/HARK/pull/1193) -* Cast `DiscreteDistribution.pmv` attribute as a `np.ndarray`. [#1199](https://github.com/econ-ark/HARK/pull/1199) -* Update structure of dynamic interest rate. [#1221](https://github.com/econ-ark/HARK/pull/1221) +- Updates the lognormal-income-process constructor from `ConsIndShockModel.py` to use `IndexDistribution`. [#1024](https://github.com/econ-ark/HARK/pull/1024), [#1115](https://github.com/econ-ark/HARK/pull/1115) +- Allows for age-varying unemployment probabilities and replacement incomes with the lognormal income process constructor. [#1112](https://github.com/econ-ark/HARK/pull/1112) +- Option to have newborn IndShockConsumerType agents with a transitory income shock in the first period. Default is false, meaning they only have a permanent income shock in period 1 and permanent AND transitory in the following ones. [#1126](https://github.com/econ-ark/HARK/pull/1126) +- Adds `benchmark` utility to profile the performance of `HARK` solvers. [#1131](https://github.com/econ-ark/HARK/pull/1131) +- Fixes scaling bug in Normal equiprobable approximation method. [1139](https://github.com/econ-ark/HARK/pull/1139) +- Removes the extra-dimension that was returned by `calc_expectations` in some instances. [#1149](https://github.com/econ-ark/HARK/pull/1149) +- Adds `HARK.distribution.expected` alias for `DiscreteDistribution.expected`. [#1156](https://github.com/econ-ark/HARK/pull/1156) +- Renames attributes in `DiscreteDistribution`: `X` to `atoms` and `pmf` to `pmv`. [#1164](https://github.com/econ-ark/HARK/pull/1164), [#1051](https://github.com/econ-ark/HARK/pull/1151), [#1159](https://github.com/econ-ark/HARK/pull/1159). +- Remove or replace automated tests that depend on brittle simulation results. [#1148](https://github.com/econ-ark/HARK/pull/1148) +- Updates asset grid constructor from `ConsIndShockModel.py` to allow for linearly-spaced grids when `aXtraNestFac == -1`. [#1172](https://github.com/econ-ark/HARK/pull/1172) +- Renames `DiscreteDistributionXRA` to `DiscreteDistributionLabeled` and updates methods [#1170](https://github.com/econ-ark/HARK/pull/1170) +- Renames `HARK.numba` to `HARK.numba_tools` [#1183](https://github.com/econ-ark/HARK/pull/1183) +- Adds the RNG seed as a property of `DiscreteDistributionLabeled` [#1184](https://github.com/econ-ark/HARK/pull/1184) +- Updates the `approx` method of `HARK.distributions.Uniform` to include the endpoints of the distribution with infinitesimally small (zero) probability mass. [#1180](https://github.com/econ-ark/HARK/pull/1180) +- Refactors tests to incorporate custom precision `HARK_PRECISION = 4`. [#1193](https://github.com/econ-ark/HARK/pull/1193) +- Cast `DiscreteDistribution.pmv` attribute as a `np.ndarray`. [#1199](https://github.com/econ-ark/HARK/pull/1199) +- Update structure of dynamic interest rate. [#1221](https://github.com/econ-ark/HARK/pull/1221) ### 0.12.0 @@ -65,36 +65,36 @@ Release Date: December 14, 2021 #### Major Changes -* FrameAgentType for modular definitions of agents [#865](https://github.com/econ-ark/HARK/pull/865) [#1064](https://github.com/econ-ark/HARK/pull/1064) -* Frame relationships with backward and forward references, with plotting example [#1071](https://github.com/econ-ark/HARK/pull/1071) -* PortfolioConsumerFrameType, a port of PortfolioConsumerType to use Frames [#865](https://github.com/econ-ark/HARK/pull/865) -* Input parameters for cyclical models now indexed by t [#1039](https://github.com/econ-ark/HARK/pull/1039) -* A IndexDistribution class for representing time-indexed probability distributions [#1018](https://github.com/econ-ark/pull/1018/). -* Adds new consumption-savings-portfolio model `RiskyContrib`, which represents an agent who can save in risky and risk-free assets but faces -frictions to moving funds between them. To circumvent these frictions, he has access to an income-deduction scheme to accumulate risky assets. -PR: [#832](https://github.com/econ-ark/HARK/pull/832). See [this forthcoming REMARK](https://github.com/Mv77/RiskyContrib) for the model's details. -* 'cycles' agent property moved from constructor argument to parameter [#1031](https://github.com/econ-ark/HARK/pull/1031) -* Uses iterated expectations to speed-up the solution of `RiskyContrib` when income and returns are independent [#1058](https://github.com/econ-ark/HARK/pull/1058). -* `ConsPortfolioSolver` class for solving portfolio choice model replaces `solveConsPortfolio` method [#1047](https://github.com/econ-ark/HARK/pull/1047) -* `ConsPortfolioDiscreteSolver` class for solving portfolio choice model when allowed share is on a discrete grid [#1047](https://github.com/econ-ark/HARK/pull/1047) -* `ConsPortfolioJointDistSolver` class for solving portfolio chioce model when the income and risky return shocks are not independent [#1047](https://github.com/econ-ark/HARK/pull/1047) +- FrameAgentType for modular definitions of agents [#865](https://github.com/econ-ark/HARK/pull/865) [#1064](https://github.com/econ-ark/HARK/pull/1064) +- Frame relationships with backward and forward references, with plotting example [#1071](https://github.com/econ-ark/HARK/pull/1071) +- PortfolioConsumerFrameType, a port of PortfolioConsumerType to use Frames [#865](https://github.com/econ-ark/HARK/pull/865) +- Input parameters for cyclical models now indexed by t [#1039](https://github.com/econ-ark/HARK/pull/1039) +- A IndexDistribution class for representing time-indexed probability distributions [#1018](https://github.com/econ-ark/pull/1018/). +- Adds new consumption-savings-portfolio model `RiskyContrib`, which represents an agent who can save in risky and risk-free assets but faces + frictions to moving funds between them. To circumvent these frictions, he has access to an income-deduction scheme to accumulate risky assets. + PR: [#832](https://github.com/econ-ark/HARK/pull/832). See [this forthcoming REMARK](https://github.com/Mv77/RiskyContrib) for the model's details. +- 'cycles' agent property moved from constructor argument to parameter [#1031](https://github.com/econ-ark/HARK/pull/1031) +- Uses iterated expectations to speed-up the solution of `RiskyContrib` when income and returns are independent [#1058](https://github.com/econ-ark/HARK/pull/1058). +- `ConsPortfolioSolver` class for solving portfolio choice model replaces `solveConsPortfolio` method [#1047](https://github.com/econ-ark/HARK/pull/1047) +- `ConsPortfolioDiscreteSolver` class for solving portfolio choice model when allowed share is on a discrete grid [#1047](https://github.com/econ-ark/HARK/pull/1047) +- `ConsPortfolioJointDistSolver` class for solving portfolio chioce model when the income and risky return shocks are not independent [#1047](https://github.com/econ-ark/HARK/pull/1047) #### Minor Changes -* Using Lognormal.from_mean_std in the forward simulation of the RiskyAsset model [#1019](https://github.com/econ-ark/HARK/pull/1019) -* Fix bug in DCEGM's primary kink finder due to numpy no longer accepting NaN in integer arrays [#990](https://github.com/econ-ark/HARK/pull/990). -* Add a general class for consumers who can save using a risky asset [#1012](https://github.com/econ-ark/HARK/pull/1012/). -* Add Boolean attribute 'PerfMITShk' to consumption models. When true, allows perfect foresight MIT shocks to be simulated. [#1013](https://github.com/econ-ark/HARK/pull/1013). -* Track and update start-of-period (pre-income) risky and risk-free assets as states in the `RiskyContrib` model [1046](https://github.com/econ-ark/HARK/pull/1046). -* distribute_params now uses assign_params to create consistent output [#1044](https://github.com/econ-ark/HARK/pull/1044) -* The function that computes end-of-period derivatives of the value function was moved to the inside of `ConsRiskyContrib`'s solver [#1057](https://github.com/econ-ark/HARK/pull/1057) -* Use `np.fill(np.nan)` to clear or initialize the arrays that store simulations. [#1068](https://github.com/econ-ark/HARK/pull/1068) -* Add Boolean attribute 'neutral_measure' to consumption models. When true, simulations are more precise by allowing permanent shocks to be drawn from a neutral measure (see Harmenberg 2021). [#1069](https://github.com/econ-ark/HARK/pull/1069) -* Fix mathematical limits of model example in `example_ConsPortfolioModel.ipynb` [#1047](https://github.com/econ-ark/HARK/pull/1047) -* Update `ConsGenIncProcessModel.py` to use `calc_expectation` method [#1072](https://github.com/econ-ark/HARK/pull/1072) -* Fix bug in `calc_normal_style_pars_from_lognormal_pars` due to math error. [#1076](https://github.com/econ-ark/HARK/pull/1076) -* Fix bug in `distribute_params` so that `AgentCount` parameter is updated. [#1089](https://github.com/econ-ark/HARK/pull/1089) -* Fix bug in 'vFuncBool' option for 'MarkovConsumerType' so that the value function may now be calculated. [#1095](https://github.com/econ-ark/HARK/pull/1095) +- Using Lognormal.from_mean_std in the forward simulation of the RiskyAsset model [#1019](https://github.com/econ-ark/HARK/pull/1019) +- Fix bug in DCEGM's primary kink finder due to numpy no longer accepting NaN in integer arrays [#990](https://github.com/econ-ark/HARK/pull/990). +- Add a general class for consumers who can save using a risky asset [#1012](https://github.com/econ-ark/HARK/pull/1012/). +- Add Boolean attribute 'PerfMITShk' to consumption models. When true, allows perfect foresight MIT shocks to be simulated. [#1013](https://github.com/econ-ark/HARK/pull/1013). +- Track and update start-of-period (pre-income) risky and risk-free assets as states in the `RiskyContrib` model [1046](https://github.com/econ-ark/HARK/pull/1046). +- distribute_params now uses assign_params to create consistent output [#1044](https://github.com/econ-ark/HARK/pull/1044) +- The function that computes end-of-period derivatives of the value function was moved to the inside of `ConsRiskyContrib`'s solver [#1057](https://github.com/econ-ark/HARK/pull/1057) +- Use `np.fill(np.nan)` to clear or initialize the arrays that store simulations. [#1068](https://github.com/econ-ark/HARK/pull/1068) +- Add Boolean attribute 'neutral_measure' to consumption models. When true, simulations are more precise by allowing permanent shocks to be drawn from a neutral measure (see Harmenberg 2021). [#1069](https://github.com/econ-ark/HARK/pull/1069) +- Fix mathematical limits of model example in `example_ConsPortfolioModel.ipynb` [#1047](https://github.com/econ-ark/HARK/pull/1047) +- Update `ConsGenIncProcessModel.py` to use `calc_expectation` method [#1072](https://github.com/econ-ark/HARK/pull/1072) +- Fix bug in `calc_normal_style_pars_from_lognormal_pars` due to math error. [#1076](https://github.com/econ-ark/HARK/pull/1076) +- Fix bug in `distribute_params` so that `AgentCount` parameter is updated. [#1089](https://github.com/econ-ark/HARK/pull/1089) +- Fix bug in 'vFuncBool' option for 'MarkovConsumerType' so that the value function may now be calculated. [#1095](https://github.com/econ-ark/HARK/pull/1095) ### 0.11.0 @@ -102,37 +102,37 @@ Release Date: March 4, 2021 #### Major Changes -* Converts non-mathematical code to PEP8 compliant form [#953](https://github.com/econ-ark/HARK/pull/953) -* Adds a constructor for LogNormal distributions from mean and standard deviation [#891](https://github.com/econ-ark/HARK/pull/891/) -* Uses new LogNormal constructor in ConsPortfolioModel [#891](https://github.com/econ-ark/HARK/pull/891/) -* calcExpectations method for taking the expectation of a distribution over a function [#884](https://github.com/econ-ark/HARK/pull/884/] (#897)[https://github.com/econ-ark/HARK/pull/897/) -* Implements the multivariate normal as a supported distribution, with a discretization method. See [#948](https://github.com/econ-ark/HARK/pull/948). -* Centralizes the definition of value, marginal value, and marginal marginal value functions that use inverse-space -interpolation for problems with CRRA utility. See [#888](https://github.com/econ-ark/HARK/pull/888). -* MarkovProcess class used in ConsMarkovModel, ConsRepAgentModel, ConsAggShockModel [#902](https://github.com/econ-ark/HARK/pull/902) [#929](https://github.com/econ-ark/HARK/pull/929) -* replace HARKobject base class with MetricObject and Model classes [#903](https://github.com/econ-ark/HARK/pull/903/) -* Add __repr__ and __eq__ methods to Model class [#903](https://github.com/econ-ark/HARK/pull/903/) -* Adds SSA life tables and methods to extract survival probabilities from them [#986](https://github.com/econ-ark/HARK/pull/906). -* Adds the U.S. CPI research series and tools to extract inflation adjustments from it [#930](https://github.com/econ-ark/HARK/pull/930). -* Adds a module for extracting initial distributions of permanent income (`pLvl`) and normalized assets (`aNrm`) from the SCF [#932](https://github.com/econ-ark/HARK/pull/932). -* Fix the return fields of `dcegm/calcCrossPoints`[#909](https://github.com/econ-ark/HARK/pull/909). -* Corrects location of constructor documentation to class string for Sphinx rendering [#908](https://github.com/econ-ark/HARK/pull/908) -* Adds a module with tools for parsing and using various income calibrations from the literature. It includes the option of using life-cycle profiles of income shock variances from [Sabelhaus and Song (2010)](https://www.sciencedirect.com/science/article/abs/pii/S0304393210000358). See [#921](https://github.com/econ-ark/HARK/pull/921), [#941](https://github.com/econ-ark/HARK/pull/941), [#980](https://github.com/econ-ark/HARK/pull/980). -* remove "Now" from model variable names [#936](https://github.com/econ-ark/HARK/pull/936) -* remove Model.__call__; use Model init in Market and AgentType init to standardize on parameters dictionary [#947](https://github.com/econ-ark/HARK/issues/947) -* Moves state MrkvNow to shocks['Mrkv'] in AggShockMarkov and KrusellSmith models [#935](https://github.com/econ-ark/HARK/pull/935) -* Replaces `ConsIndShock`'s `init_lifecycle` with an actual life-cycle calibration [#951](https://github.com/econ-ark/HARK/pull/951). +- Converts non-mathematical code to PEP8 compliant form [#953](https://github.com/econ-ark/HARK/pull/953) +- Adds a constructor for LogNormal distributions from mean and standard deviation [#891](https://github.com/econ-ark/HARK/pull/891/) +- Uses new LogNormal constructor in ConsPortfolioModel [#891](https://github.com/econ-ark/HARK/pull/891/) +- calcExpectations method for taking the expectation of a distribution over a function [#884](https://github.com/econ-ark/HARK/pull/884/] (#897)[https://github.com/econ-ark/HARK/pull/897/) +- Implements the multivariate normal as a supported distribution, with a discretization method. See [#948](https://github.com/econ-ark/HARK/pull/948). +- Centralizes the definition of value, marginal value, and marginal marginal value functions that use inverse-space + interpolation for problems with CRRA utility. See [#888](https://github.com/econ-ark/HARK/pull/888). +- MarkovProcess class used in ConsMarkovModel, ConsRepAgentModel, ConsAggShockModel [#902](https://github.com/econ-ark/HARK/pull/902) [#929](https://github.com/econ-ark/HARK/pull/929) +- replace HARKobject base class with MetricObject and Model classes [#903](https://github.com/econ-ark/HARK/pull/903/) +- Add **repr** and **eq** methods to Model class [#903](https://github.com/econ-ark/HARK/pull/903/) +- Adds SSA life tables and methods to extract survival probabilities from them [#986](https://github.com/econ-ark/HARK/pull/906). +- Adds the U.S. CPI research series and tools to extract inflation adjustments from it [#930](https://github.com/econ-ark/HARK/pull/930). +- Adds a module for extracting initial distributions of permanent income (`pLvl`) and normalized assets (`aNrm`) from the SCF [#932](https://github.com/econ-ark/HARK/pull/932). +- Fix the return fields of `dcegm/calcCrossPoints`[#909](https://github.com/econ-ark/HARK/pull/909). +- Corrects location of constructor documentation to class string for Sphinx rendering [#908](https://github.com/econ-ark/HARK/pull/908) +- Adds a module with tools for parsing and using various income calibrations from the literature. It includes the option of using life-cycle profiles of income shock variances from [Sabelhaus and Song (2010)](https://www.sciencedirect.com/science/article/abs/pii/S0304393210000358). See [#921](https://github.com/econ-ark/HARK/pull/921), [#941](https://github.com/econ-ark/HARK/pull/941), [#980](https://github.com/econ-ark/HARK/pull/980). +- remove "Now" from model variable names [#936](https://github.com/econ-ark/HARK/pull/936) +- remove Model.**call**; use Model init in Market and AgentType init to standardize on parameters dictionary [#947](https://github.com/econ-ark/HARK/issues/947) +- Moves state MrkvNow to shocks['Mrkv'] in AggShockMarkov and KrusellSmith models [#935](https://github.com/econ-ark/HARK/pull/935) +- Replaces `ConsIndShock`'s `init_lifecycle` with an actual life-cycle calibration [#951](https://github.com/econ-ark/HARK/pull/951). #### Minor Changes -* Move AgentType constructor parameters docs to class docstring so it is rendered by Sphinx. -* Remove uses of deprecated time.clock [#887](https://github.com/econ-ark/HARK/pull/887) -* Change internal representation of parameters to Distributions to ndarray type -* Rename IncomeDstn to IncShkDstn -* AgentType simulate() method now returns history. [#916](https://github.com/econ-ark/HARK/pull/916) -* Rename DiscreteDistribution.drawDiscrete() to draw() -* Update documentation and warnings around IncShkDstn [#955](https://github.com/econ-ark/HARK/pull/955) -* Adds csv files to `MANIFEST.in`. [957](https://github.com/econ-ark/HARK/pull/957) +- Move AgentType constructor parameters docs to class docstring so it is rendered by Sphinx. +- Remove uses of deprecated time.clock [#887](https://github.com/econ-ark/HARK/pull/887) +- Change internal representation of parameters to Distributions to ndarray type +- Rename IncomeDstn to IncShkDstn +- AgentType simulate() method now returns history. [#916](https://github.com/econ-ark/HARK/pull/916) +- Rename DiscreteDistribution.drawDiscrete() to draw() +- Update documentation and warnings around IncShkDstn [#955](https://github.com/econ-ark/HARK/pull/955) +- Adds csv files to `MANIFEST.in`. [957](https://github.com/econ-ark/HARK/pull/957) ### 0.10.8 @@ -140,17 +140,17 @@ Release Date: Nov. 05 2020 #### Major Changes -* Namespace variables for the Market class [#765](https://github.com/econ-ark/HARK/pull/765) -* We now have a Numba based implementation of PerfForesightConsumerType model available as PerfForesightConsumerTypeFast [#774](https://github.com/econ-ark/HARK/pull/774) -* Namespace for exogenous shocks [#803](https://github.com/econ-ark/HARK/pull/803) -* Namespace for controls [#855](https://github.com/econ-ark/HARK/pull/855) -* State and poststate attributes replaced with state_now and state_prev namespaces [#836](https://github.com/econ-ark/HARK/pull/836) +- Namespace variables for the Market class [#765](https://github.com/econ-ark/HARK/pull/765) +- We now have a Numba based implementation of PerfForesightConsumerType model available as PerfForesightConsumerTypeFast [#774](https://github.com/econ-ark/HARK/pull/774) +- Namespace for exogenous shocks [#803](https://github.com/econ-ark/HARK/pull/803) +- Namespace for controls [#855](https://github.com/econ-ark/HARK/pull/855) +- State and poststate attributes replaced with state_now and state_prev namespaces [#836](https://github.com/econ-ark/HARK/pull/836) -#### Minor Changes +#### Minor Changes -* Use shock_history namespace for pre-evaluated shock history [#812](https://github.com/econ-ark/HARK/pull/812) -* Fixes seed of PrefShkDstn on initialization and add tests for simulation output -* Reformat code style using black +- Use shock_history namespace for pre-evaluated shock history [#812](https://github.com/econ-ark/HARK/pull/812) +- Fixes seed of PrefShkDstn on initialization and add tests for simulation output +- Reformat code style using black ### 0.10.7 @@ -163,7 +163,7 @@ Release Date: 08-08-2020 - Removed time flipping and time flow state, "forward/backward time" through data access [#570](https://github.com/econ-ark/HARK/pull/570) - Simulation draw methods are now individual distributions like `Uniform`, `Lognormal`, `Weibull` [#624](https://github.com/econ-ark/HARK/pull/624) -#### Minor Changes +#### Minor Changes - unpackcFunc is deprecated, use unpack(parameter) to unpack a parameter after solving the model [#784](https://github.com/econ-ark/HARK/pull/784) - Remove deprecated Solution Class, use HARKObject across the codebase [#772](https://github.com/econ-ark/HARK/pull/772) @@ -189,51 +189,50 @@ Release Date: 08-08-2020 - Refactor checkConditions by adding a checkCondition method instead of writing custom checks for each condition [#568](https://github.com/econ-ark/HARK/pull/568) - Examples update [#768](https://github.com/econ-ark/HARK/pull/768), [#759](https://github.com/econ-ark/HARK/pull/759), [#756](https://github.com/econ-ark/HARK/pull/756), [#727](https://github.com/econ-ark/HARK/pull/727), [#698](https://github.com/econ-ark/HARK/pull/698), [#697](https://github.com/econ-ark/HARK/pull/697), [#561](https://github.com/econ-ark/HARK/pull/561), [#654](https://github.com/econ-ark/HARK/pull/654), [#633](https://github.com/econ-ark/HARK/pull/633), [#775](https://github.com/econ-ark/HARK/pull/775) - ### 0.10.6 Release Date: 17-04-2020 #### Major Changes -* Add Bellman equations for cyclical model example [#600](https://github.com/econ-ark/HARK/pull/600) +- Add Bellman equations for cyclical model example [#600](https://github.com/econ-ark/HARK/pull/600) -* read_shocks now reads mortality as well [#613](https://github.com/econ-ark/HARK/pull/613) - -* Discrete probability distributions are now classes [#610](https://github.com/econ-ark/HARK/pull/610) - -#### Minor Changes +- read_shocks now reads mortality as well [#613](https://github.com/econ-ark/HARK/pull/613) +- Discrete probability distributions are now classes [#610](https://github.com/econ-ark/HARK/pull/610) +#### Minor Changes ### 0.10.5 Release Date: 24-03-2020 #### Major Changes - * Default parameters dictionaries for ConsumptionSaving models have been moved from ConsumerParameters to nearby the classes that use them. [#527](https://github.com/econ-ark/HARK/pull/527) - * Improvements and cleanup of ConsPortfolioModel, and adding the ability to specify an age-varying list of RiskyAvg and RiskyStd. [#577](https://github.com/econ-ark/HARK/pull/527) +- Default parameters dictionaries for ConsumptionSaving models have been moved from ConsumerParameters to nearby the classes that use them. [#527](https://github.com/econ-ark/HARK/pull/527) - * Rewrite and simplification of ConsPortfolioModel solver. [#594](https://github.com/econ-ark/HARK/pull/594) +- Improvements and cleanup of ConsPortfolioModel, and adding the ability to specify an age-varying list of RiskyAvg and RiskyStd. [#577](https://github.com/econ-ark/HARK/pull/527) -#### Minor Changes +- Rewrite and simplification of ConsPortfolioModel solver. [#594](https://github.com/econ-ark/HARK/pull/594) + +#### Minor Changes ### 0.10.4 Release Date: 05-03-2020 #### Major Changes - - Last release to support Python 2.7, future releases of econ-ark will support Python 3.6+ [#478](https://github.com/econ-ark/HARK/pull/478) - - Move non-reusable model code to examples directory, BayerLuetticke, FashionVictim now in examples instead of in HARK code [#442](https://github.com/econ-ark/HARK/pull/442) - - Load default parameters for ConsumptionSaving models [#466](https://github.com/econ-ark/HARK/pull/466) - - Improved implementaion of parallelNelderMead [#300](https://github.com/econ-ark/HARK/pull/300) - -#### Minor Changes - - Notebook utility functions for determining platform, GUI, latex (installation) are available in HARK.utilities [#512](https://github.com/econ-ark/HARK/pull/512) - - Few DemARKs moved to examples [#472](https://github.com/econ-ark/HARK/pull/472) - - MaxKinks available in ConsumerParameters again [#486](https://github.com/econ-ark/HARK/pull/486) +- Last release to support Python 2.7, future releases of econ-ark will support Python 3.6+ [#478](https://github.com/econ-ark/HARK/pull/478) +- Move non-reusable model code to examples directory, BayerLuetticke, FashionVictim now in examples instead of in HARK code [#442](https://github.com/econ-ark/HARK/pull/442) +- Load default parameters for ConsumptionSaving models [#466](https://github.com/econ-ark/HARK/pull/466) +- Improved implementaion of parallelNelderMead [#300](https://github.com/econ-ark/HARK/pull/300) + +#### Minor Changes + +- Notebook utility functions for determining platform, GUI, latex (installation) are available in HARK.utilities [#512](https://github.com/econ-ark/HARK/pull/512) +- Few DemARKs moved to examples [#472](https://github.com/econ-ark/HARK/pull/472) +- MaxKinks available in ConsumerParameters again [#486](https://github.com/econ-ark/HARK/pull/486) ### 0.10.3 @@ -252,14 +251,15 @@ Release Date: 12-12-2019 - Fixed sphinx dependency errors. ([#411](https://github.com/econ-ark/HARK/pull/411)) - Refactored simultation.py. ([#408](https://github.com/econ-ark/HARK/pull/408)) - AgentType.simulate() now throws informative errors if -attributes required for simulation do not exist, or initializeSim() has -never been called. ([#320](https://github.com/econ-ark/HARK/pull/320)) + attributes required for simulation do not exist, or initializeSim() has + never been called. ([#320](https://github.com/econ-ark/HARK/pull/320)) ### 0.10.2 Release Date: 10-03-2019 #### Minor Changes + - Add some bugfixes and unit tests to HARK.core. ([#401](https://github.com/econ-ark/HARK/pull/401)) - Fix error in discrete portfolio choice's AdjustPrb. ([#391](https://github.com/econ-ark/HARK/pull/391)) @@ -268,6 +268,7 @@ Release Date: 10-03-2019 Release Date: 09-25-2019 #### Minor Changes + - Added portfolio choice between risky and safe assets (ConsPortfolioModel). ([#241](https://github.com/econ-ark/HARK/pull/241)) ### 0.10.1.dev4 @@ -275,6 +276,7 @@ Release Date: 09-25-2019 Release Date: 09-19-2019 #### Minor Changes + - Fixes cubic interpolation in KinkedRSolver. ([#386](https://github.com/econ-ark/HARK/pull/386)) - Documentes the procedure for constructing value function inverses and fixes bug in which survival rate was not included in absolute patience factor. ([#383](https://github.com/econ-ark/HARK/pull/383)) - Fixes problems that sometimes prevented multiprocessing from working. ([#377](https://github.com/econ-ark/HARK/pull/377)) @@ -284,6 +286,7 @@ Release Date: 09-19-2019 Release Date: 07-23-2019 #### Minor Changes + - Missed pre-solve fix (see [#363](https://github.com/econ-ark/HARK/pull/363) for more context). ([#367](https://github.com/econ-ark/HARK/pull/367)) ### 0.10.1.dev2 @@ -291,21 +294,25 @@ Release Date: 07-23-2019 Release Date: 07-22-2019 #### Minor Changes -- Revert pre-solve commit due to bug. ([#363](https://github.com/econ-ark/HARK/pull/363)) + +- Revert pre-solve commit due to bug. ([#363](https://github.com/econ-ark/HARK/pull/363)) ### 0.10.1.dev1 Release Date: 07-20-2019 #### Breaking Changes + - See #302 under minor changes. #### Major Changes + - Adds BayerLuetticke notebooks and functionality. ([#328](https://github.com/econ-ark/HARK/pull/328)) #### Minor Changes + - Fixes one-asset HANK models for endowment economy (had MP wired in as the shock). ([#355](https://github.com/econ-ark/HARK/pull/355)) -- Removes jupytext *.py files. ([#354](https://github.com/econ-ark/HARK/pull/354)) +- Removes jupytext \*.py files. ([#354](https://github.com/econ-ark/HARK/pull/354)) - Reorganizes documentation and configures it to work with Read the Docs. ([#353](https://github.com/econ-ark/HARK/pull/353)) - Adds notebook illustrating dimensionality reduction in Bayer and Luetticke. ([#345](https://github.com/econ-ark/HARK/pull/345)) - Adds notebook illustrating how the Bayer & Luetticke invoke the discrete cosine transformation(DCT) and fixed copula to reduce dimensions of the problem.([#344](https://github.com/econ-ark/HARK/pull/344)) @@ -316,9 +323,9 @@ Release Date: 07-20-2019 - Add an empty method for preSolve called checkRestrictions that can be overwritten in classes inheriting from AgentType to check for illegal parameter values. ([#324](https://github.com/econ-ark/HARK/pull/324)) - Adds a call to updateIncomeProcess() in preSolve() to avoid solutions being based on wrong income process specifications if some parameters change between two solve() calls. ([#323](https://github.com/econ-ark/HARK/pull/323)) - Makes checkConditions() less verbose when the checks are not actually performed by converting a print statement to an inline comment. ([#321](https://github.com/econ-ark/HARK/pull/321)) -- Raises more readable exception when simultate() is called without solving first. ([#315](https://github.com/econ-ark/HARK/pull/315)) +- Raises more readable exception when simultate() is called without solving first. ([#315](https://github.com/econ-ark/HARK/pull/315)) - Removes testing folder (part of ongoing test restructuring). ([#304](https://github.com/econ-ark/HARK/pull/304)) -- Fixes unintended behavior in default simDeath(). Previously, all agents would die off in the first period, but they were meant to always survive. ([#302](https://github.com/econ-ark/HARK/pull/302)) __Warning__: Potentially breaking change. +- Fixes unintended behavior in default simDeath(). Previously, all agents would die off in the first period, but they were meant to always survive. ([#302](https://github.com/econ-ark/HARK/pull/302)) **Warning**: Potentially breaking change. ### 0.10.1 @@ -331,13 +338,15 @@ No changes from 0.10.0.dev3. Release Date: 05-18-2019 #### Major Changes + - Fixes multithreading problems by using Parallels(backend='multiprocessing'). ([287](https://github.com/econ-ark/HARK/pull/287)) - Fixes bug caused by misapplication of check_conditions. ([284](https://github.com/econ-ark/HARK/pull/284)) - Adds functions to calculate quadrature nodes and weights for numerically evaluating expectations in the presence of (log-)normally distributed random variables. ([258](https://github.com/econ-ark/HARK/pull/258)) #### Minor Changes + - Adds method decorator which validates that arguments passed in are not empty. ([282](https://github.com/econ-ark/HARK/pull/282) -- Lints a variety of files. These PRs include some additional/related minor changes, like replacing an exec function, removing some lambdas, adding some files to .gitignore, etc. ([274](https://github.com/econ-ark/HARK/pull/274), [276](https://github.com/econ-ark/HARK/pull/276), [277](https://github.com/econ-ark/HARK/pull/277), [278](https://github.com/econ-ark/HARK/pull/278), [281](https://github.com/econ-ark/HARK/pull/281)) +- Lints a variety of files. These PRs include some additional/related minor changes, like replacing an exec function, removing some lambdas, adding some files to .gitignore, etc. ([274](https://github.com/econ-ark/HARK/pull/274), [276](https://github.com/econ-ark/HARK/pull/276), [277](https://github.com/econ-ark/HARK/pull/277), [278](https://github.com/econ-ark/HARK/pull/278), [281](https://github.com/econ-ark/HARK/pull/281)) - Adds vim swp files to gitignore. ([269](https://github.com/econ-ark/HARK/pull/269)) - Adds version dunder in init. ([265](https://github.com/econ-ark/HARK/pull/265)) - Adds flake8 to requirements.txt and config. ([261](https://github.com/econ-ark/HARK/pull/261)) @@ -353,7 +362,7 @@ None #### Minor Changes -* Fix verbosity check in ConsIndShockModel. ([250](https://github.com/econ-ark/HARK/pull/250)) +- Fix verbosity check in ConsIndShockModel. ([250](https://github.com/econ-ark/HARK/pull/250)) #### Other Changes @@ -365,27 +374,26 @@ Release Date: 04-12-2019 #### Major Changes -* Adds [tools](https://github.com/econ-ark/HARK/blob/master/HARK/dcegm.py) to solve problems that arise from the interaction of discrete and continuous variables, using the [DCEGM](https://github.com/econ-ark/DemARK/blob/master/notebooks/DCEGM-Upper-Envelope.ipynb) method of [Iskhakov et al.](https://onlinelibrary.wiley.com/doi/abs/10.3982/QE643), who apply the their discrete-continuous solution algorithm to the problem of optimal endogenous retirement; their results are replicated using our new tool [here](https://github.com/econ-ark/REMARK/blob/master/REMARKs/EndogenousRetirement/Endogenous-Retirement.ipynb). ([226](https://github.com/econ-ark/HARK/pull/226)) -* Parameters of ConsAggShockModel.CobbDouglasEconomy.updateAFunc and ConsAggShockModel.CobbDouglasMarkovEconomy.updateAFunc that govern damping and the number of discarded 'burn-in' periods were previously hardcoded, now proper instance-level parameters. ([244](https://github.com/econ-ark/HARK/pull/244)) -* Improve accuracy and performance of functions for evaluating the integrated value function and conditional choice probabilities for models with extreme value type I taste shocks. ([242](https://github.com/econ-ark/HARK/pull/242)) -* Add calcLogSum, calcChoiceProbs, calcLogSumChoiceProbs to HARK.interpolation. ([209](https://github.com/econ-ark/HARK/pull/209), [217](https://github.com/econ-ark/HARK/pull/217)) -* Create tool to produce an example "template" of a REMARK based on SolvingMicroDSOPs. ([176](https://github.com/econ-ark/HARK/pull/176)) +- Adds [tools](https://github.com/econ-ark/HARK/blob/master/HARK/dcegm.py) to solve problems that arise from the interaction of discrete and continuous variables, using the [DCEGM](https://github.com/econ-ark/DemARK/blob/master/notebooks/DCEGM-Upper-Envelope.ipynb) method of [Iskhakov et al.](https://onlinelibrary.wiley.com/doi/abs/10.3982/QE643), who apply the their discrete-continuous solution algorithm to the problem of optimal endogenous retirement; their results are replicated using our new tool [here](https://github.com/econ-ark/REMARK/blob/master/REMARKs/EndogenousRetirement/Endogenous-Retirement.ipynb). ([226](https://github.com/econ-ark/HARK/pull/226)) +- Parameters of ConsAggShockModel.CobbDouglasEconomy.updateAFunc and ConsAggShockModel.CobbDouglasMarkovEconomy.updateAFunc that govern damping and the number of discarded 'burn-in' periods were previously hardcoded, now proper instance-level parameters. ([244](https://github.com/econ-ark/HARK/pull/244)) +- Improve accuracy and performance of functions for evaluating the integrated value function and conditional choice probabilities for models with extreme value type I taste shocks. ([242](https://github.com/econ-ark/HARK/pull/242)) +- Add calcLogSum, calcChoiceProbs, calcLogSumChoiceProbs to HARK.interpolation. ([209](https://github.com/econ-ark/HARK/pull/209), [217](https://github.com/econ-ark/HARK/pull/217)) +- Create tool to produce an example "template" of a REMARK based on SolvingMicroDSOPs. ([176](https://github.com/econ-ark/HARK/pull/176)) #### Minor Changes -* Moved old utilities tests. ([245](https://github.com/econ-ark/HARK/pull/245)) -* Deleted old files related to "cstwMPCold". ([239](https://github.com/econ-ark/HARK/pull/239)) -* Set numpy floating point error level to ignore. ([238](https://github.com/econ-ark/HARK/pull/238)) -* Fixed miscellaneous imports. ([212](https://github.com/econ-ark/HARK/pull/212), [224](https://github.com/econ-ark/HARK/pull/224), [225](https://github.com/econ-ark/HARK/pull/225)) -* Improve the tests of buffer stock model impatience conditions in IndShockConsumerType. ([219](https://github.com/econ-ark/HARK/pull/219)) -* Add basic support for Travis continuous integration testing. ([208](https://github.com/econ-ark/HARK/pull/208)) -* Add SciPy to requirements.txt. ([207](https://github.com/econ-ark/HARK/pull/207)) -* Fix indexing bug in bilinear interpolation. ([194](https://github.com/econ-ark/HARK/pull/194)) -* Update the build process to handle Python 2 and 3 compatibility. ([172](https://github.com/econ-ark/HARK/pull/172)) -* Add MPCnow attribute to ConsGenIncProcessModel. ([170](https://github.com/econ-ark/HARK/pull/170)) -* All standalone demo files have been removed. The content that was in these files can now be found in similarly named Jupyter notebooks in the DEMARK repository. Some of these notebooks are also linked from econ-ark.org. ([229](https://github.com/econ-ark/HARK/pull/229), [243](https://github.com/econ-ark/HARK/pull/243)) +- Moved old utilities tests. ([245](https://github.com/econ-ark/HARK/pull/245)) +- Deleted old files related to "cstwMPCold". ([239](https://github.com/econ-ark/HARK/pull/239)) +- Set numpy floating point error level to ignore. ([238](https://github.com/econ-ark/HARK/pull/238)) +- Fixed miscellaneous imports. ([212](https://github.com/econ-ark/HARK/pull/212), [224](https://github.com/econ-ark/HARK/pull/224), [225](https://github.com/econ-ark/HARK/pull/225)) +- Improve the tests of buffer stock model impatience conditions in IndShockConsumerType. ([219](https://github.com/econ-ark/HARK/pull/219)) +- Add basic support for Travis continuous integration testing. ([208](https://github.com/econ-ark/HARK/pull/208)) +- Add SciPy to requirements.txt. ([207](https://github.com/econ-ark/HARK/pull/207)) +- Fix indexing bug in bilinear interpolation. ([194](https://github.com/econ-ark/HARK/pull/194)) +- Update the build process to handle Python 2 and 3 compatibility. ([172](https://github.com/econ-ark/HARK/pull/172)) +- Add MPCnow attribute to ConsGenIncProcessModel. ([170](https://github.com/econ-ark/HARK/pull/170)) +- All standalone demo files have been removed. The content that was in these files can now be found in similarly named Jupyter notebooks in the DEMARK repository. Some of these notebooks are also linked from econ-ark.org. ([229](https://github.com/econ-ark/HARK/pull/229), [243](https://github.com/econ-ark/HARK/pull/243)) #### Other Notes -* Not all changes from 0.9.1 may be listed in these release notes. If you are having trouble addressing a breaking change, please reach out to us. - +- Not all changes from 0.9.1 may be listed in these release notes. If you are having trouble addressing a breaking change, please reach out to us. diff --git a/Documentation/NARK/LaTeX/NARK.bib b/Documentation/NARK/LaTeX/NARK.bib index 139597f9c..e69de29bb 100644 --- a/Documentation/NARK/LaTeX/NARK.bib +++ b/Documentation/NARK/LaTeX/NARK.bib @@ -1,2 +0,0 @@ - - diff --git a/Documentation/NARK/NARK.tex b/Documentation/NARK/NARK.tex index c1d61d9c8..db9c88694 100755 --- a/Documentation/NARK/NARK.tex +++ b/Documentation/NARK/NARK.tex @@ -12,7 +12,7 @@ % \forcedate{2021-02-25} % Updates for HARK 1.0 release % \forcedate{2020-02-26} % Add sav, modl; other tweaks -% \forcedate{2020-06-29} % Update date; shorten ALevBF; add +% \forcedate{2020-06-29} % Update date; shorten ALevBF; add % \forcedate{2020-06-30} % NARK: Minor tweaks % \forcedate{2020-07-01} % Version posted by doEvertyhing.sh \forcedate{2020-07-02} % Add conventions for marginal value and utility @@ -23,13 +23,13 @@ \jelclass{None} -\maketitle +\maketitle \begin{abstract} Sharing code is easier when different contributors use similar names for similar objects. While we will not enforce the - recommendations below, contributors can make their code more attractive to others - by using names consistent with our guidelines. + recommendations below, contributors can make their code more attractive to others + by using names consistent with our guidelines. \end{abstract} \centerline{html version at \url{https://econ-ark.github.io/HARK/Documentation/NARK}} @@ -42,7 +42,7 @@ \section{Principles} Our aim has been to balance: \begin{itemize} -\item Brevity +\item Brevity \item Mnemonic quality \item Uniqueness (enabling global search-and-replace) \item Ubiquity (definitions useful for many projects) @@ -62,19 +62,19 @@ \subsection{Single-Letter} But, because brevity is a virtue, a single letter \textit{in combination with a modifier or two} (`\texttt{hMin}' as the value of minimum human wealth, say) is fine -- so long as the reader has some reason to expect that the lower-case letter \texttt{h} signifies human wealth (as they will, if they consult Table~\ref{table:RomanLetters}). -That is the spirit in which we offer preferred interpretations for the Roman letters below. The upper case version is an aggregated version of the variable (at the level of the whole economy, say, or of the whole market being studied), while the lower case indicates the level of an individual consumer or firm or other subaggregate entity. +That is the spirit in which we offer preferred interpretations for the Roman letters below. The upper case version is an aggregated version of the variable (at the level of the whole economy, say, or of the whole market being studied), while the lower case indicates the level of an individual consumer or firm or other subaggregate entity. A few exceptions to these rules are explicitly noted below the table. When an alternative is needed with a meaning similar to, but distinct from, the definitions below, please use a multi-letter name to represent it. For example, please do not use $W$ for wealth (if some measure of wealth that differs from $\ALev$, $\BLev$, $\HLev$, or $\NLev$ is needed); instead use, say, \texttt{Wlth} or \texttt{Wealth}. (Some examples follow in a subsequent section). -Finally, a few of the definitions below are actually prohibitions; these are based on many years of experience which have shown that use of the prohibited variable name generates more confusion than clarity. +Finally, a few of the definitions below are actually prohibitions; these are based on many years of experience which have shown that use of the prohibited variable name generates more confusion than clarity. \hypertarget{RomanLetters}{} \begin{table}[ht] \centering \begin{tabular}{|lcl|} \hline - Letter & & Meaning + Letter & & Meaning \\ \hline \ALev & & \textit{A}ssets \textit{A}fter \textit{A}ll \textit{A}ctions \textit{A}re \textit{A}ccomplished (end of period) \\ \BLev & & \textit{B}eginning \textit{B}ank \textit{B}alances \textit{B}efore any \textit{B}ehavior (\textit{b}eginning-of-period) @@ -82,7 +82,7 @@ \subsection{Single-Letter} \\ \DLev & & \textit{D}ebt \\ \ELev & & PROHIBITED: Too many possible meanings (expectations, effort, expenses) \\ \FLev & & Production \textit{F}unction - \\ \GLev & & \textit{G}rowth + \\ \GLev & & \textit{G}rowth \\ \HLev & & \textit{H}uman wealth \\ \ILev & & \textit{I}nvestment \\ \JLev & & Ad\textit{J}ustment costs (e.g., in a $Q$ model) @@ -102,7 +102,7 @@ \subsection{Single-Letter} \\ \XLev & & e\textit{X}penditures (as distinct from consumption; e.g., for durables) \\ \YLev & & Noncapital income (usually, the sum of transfer and labor income) \\ \ZLev & & Lei\textit{Z}ure in consumption/leisure tradeoff - \\ \hline + \\ \hline \end{tabular} \caption{Preferred Usages of Roman Letters} \label{table:RomanLetters} @@ -112,7 +112,7 @@ \subsection{Exceptions to the Rules} The letter $\TLev$ is an exception to the rule that lower- and upper-case versions of variables are individual and aggregate quantities. We reserve the capital letter to designate the end of the horizon (death, or the end of the economy, occurs at the end of period $\TLev$). The lower case version $t$ is so ubiquitiously used as the current time period that we follow that convention here. -Finally, the following are exempted from the prohibition on single-letter variable names because they are used so frequently that the prohibition would be more trouble than it is worth: $a$, $b$, $c$, $m$. +Finally, the following are exempted from the prohibition on single-letter variable names because they are used so frequently that the prohibition would be more trouble than it is worth: $a$, $b$, $c$, $m$. \pagebreak @@ -125,13 +125,13 @@ \subsection{Standard Variable Names} \centering \begin{tabular}{|rcl|} \hline - Name & - & Description + Name & - & Description \\ \hline - \texttt{CND} & - & Consumption of Nondurable Good + \texttt{CND} & - & Consumption of Nondurable Good \\ \texttt{CNS} & - & Consumption of Nondurables and Services - \\ \texttt{Cst} & - & Cost of something + \\ \texttt{Cst} & - & Cost of something \\ \texttt{Dgd} & - & Stock of durable good - \\ \texttt{Dvd} & - & Dividends + \\ \texttt{Dvd} & - & Dividends \\ \texttt{Hse} & - & Quantity of housing (\textit{not} value, which is quantity $\times$ price) \\ \texttt{Inc} & - & Income \\ \texttt{Nlq} & - & Quantity that is \textbf{N}ot \textbf{l}i\textbf{q}uid (e.g., $\mathtt{aNlq}$ is illiquid financial) @@ -154,19 +154,19 @@ \section{Factors and Rates} while the corresponding upper-case variable connects adjacent discrete periods.\footnote{This convention rarely conflicts with the usage we endorse elsewhere of indicating individual-level variables by the lower and aggregate - variables by the upper case.}$^{,}$\footnote{If there is a need for the continuous-time + variables by the upper case.}$^{,}$\footnote{If there is a need for the continuous-time representation, we endorse use of the discrete-time rate defined below. Any author who needs a continuous-time rate, a discrete-time rate, and a discrete-time factor - is invited to invent their own notation.} So, for example, if the time interval is a year and the annual interest rate is $\rfree=0.03$ or three percent, then + is invited to invent their own notation.} So, for example, if the time interval is a year and the annual interest rate is $\rfree=0.03$ or three percent, then the annual interest factor is $\Rfree=1.03$.\footnote{In the rare cases where it is necessary to distinguish between a continuous-time rate and a discrete-time rate -- for example, when there is an analytical result available in continuous time -- the variable in question can be modified by \texttt{Cnt} or \texttt{Dsc}.} \begin{table}[ht] \centering - \begin{tabular}{|ccc|} + \begin{tabular}{|ccc|} \hline - Code & Output & Description - \\ \hline + Code & Output & Description + \\ \hline \verb|\Rfree| & $\Rfree$ & Riskfree interest factor \\ \verb|\rfree| & $\rfree$ & Riskfree interest rate \\ \verb|\Risky| & $\Risky$ & The return factor on a risky asset @@ -176,30 +176,30 @@ \section{Factors and Rates} \\ \verb|\RSave| & $\RSave$ & Return factor earned on positive end-of-period assets \\ \verb|\rsave| & $\rsave$ & Return rate earned on positive end-of-period assets \\ \verb|\RBoro| & $\RBoro$ & Return factor paid on debts - \\ \verb|\rboro| & $\rboro$ & Return rate paid on debts + \\ \verb|\rboro| & $\rboro$ & Return rate paid on debts \\ \hline \end{tabular} \caption{Factors and Rates} \label{table:Factors} -\end{table} +\end{table} We depart from the upper-lower case scheme when the natural letter to use has an even more urgent use elsewhere in our scheme. -A particularly common example occurs in the case of models like \cite{blanchardFinite} in which -individual agents are subject to a Poisson probability of death. Because death was common in the +A particularly common example occurs in the case of models like \cite{blanchardFinite} in which +individual agents are subject to a Poisson probability of death. Because death was common in the middle ages, we use the archaic Gothic font for the death rate; and the probability of survival is the cancellation of the probability of death: \begin{table}[ht] \centering - \begin{tabular}{|>{\ttfamily}cccl|} + \begin{tabular}{|>{\ttfamily}cccl|} \hline - Code & \LaTeX & Description & \\ + Code & \LaTeX & Description & \\ \hline - \verb|\DiePrb| & $\DiePrb$ & Probabilty of death & - \\ \verb|\LivPrb| & $\LivPrb$ & Probability to not die $=(1-\DiePrb)$ & + \verb|\DiePrb| & $\DiePrb$ & Probabilty of death & + \\ \verb|\LivPrb| & $\LivPrb$ & Probability to not die $=(1-\DiePrb)$ & \\ \hline \end{tabular} \caption{Special Cases: Factors and Rates} \label{table:SpecialFactors} -\end{table} +\end{table} \section{Parameters} Some parameters are worth defining because they are likely to be @@ -207,20 +207,20 @@ \section{Parameters} constraints when used (such as the need for similar-looking upper- and lower-case Greek representations), as to be worth standardizing. -Programmers should -use the corresponding variable name without the backslash as the name of the corresponding object -in their code. For example, the Coefficient of Relative Risk Aversion is $\verb|\CRRA|$ in a \LaTeX +Programmers should +use the corresponding variable name without the backslash as the name of the corresponding object +in their code. For example, the Coefficient of Relative Risk Aversion is $\verb|\CRRA|$ in a \LaTeX document and \texttt{CRRA} in a software module. \hypertarget{Parameters}{} \begin{table}[ht] \centering - \begin{tabular}{|>{\ttfamily}rcll|} + \begin{tabular}{|>{\ttfamily}rcll|} \hline Name & \LaTeX & Description & Illustration \\ \hline \verb|\CARA| & $\CARA$ & Coefficient of Absolute Risk Aversion &$\uFunc(\bullet)=-\CARA^{-1} e^{-\CARA \bullet}$ - \\ \verb|\CRRA| & $\CRRA$ & Coefficient of Relative Risk Aversion & $\uFunc(\bullet)=(1-\CRRA)^{-1}\bullet^{1-\CRRA}$ + \\ \verb|\CRRA| & $\CRRA$ & Coefficient of Relative Risk Aversion & $\uFunc(\bullet)=(1-\CRRA)^{-1}\bullet^{1-\CRRA}$ \\ \verb|\DiscFac| & $\DiscFac$ & Time Discount Factor & $\uFunc^{\prime}(\cLev_{t}) = \Rfree \DiscFac \uFunc^{\prime}(\cLev_{t+1})$ \\ \verb|\discRte| & $\discRte$ & Time Discount rate & $\discRte=\DiscFac^{-1}-1$ \\ \verb|\DeprFac| & $\DeprFac$ & Depreciation Factor (Hebrew \texttt{daleth}) & $\Kap_{t+1} = \DeprFac \Kap_{t}+\ILev_{t}$ @@ -237,7 +237,7 @@ \section{Parameters} \\ \verb|\MPC| & $\MPC$ & Marginal Propensity to Consume & $\cFunc^{\prime}(\mRat)=\partial c/\partial m$ \\ \verb|\Pat| & $\Pat$ & Absolute Patience Factor (\texttt{Thorn}) & $\Pat = (\Rfree \DiscFac)^{1/\CRRA} $ \\ \verb|\PatPGro| & $\PatPGro$ & Growth Patience Factor (\texttt{Thorn}) & $\Pat = (\Rfree \DiscFac)^{1/\CRRA}/\PtyGro $ - \\ \verb|\PatR| & $\PatR$ & Return Patience Factor (\texttt{Thorn}) & $\Pat = (\Rfree \DiscFac)^{1/\CRRA}/\Rfree $ + \\ \verb|\PatR| & $\PatR$ & Return Patience Factor (\texttt{Thorn}) & $\Pat = (\Rfree \DiscFac)^{1/\CRRA}/\Rfree $ \\ \verb|\pat| & $\pat$ & Absolute Patience rate (\texttt{thorn}) & $\pat = (\Rfree \DiscFac)^{1/\CRRA}-1 \approx \CRRA^{-1}(\rfree-\discRte) $ \\ \verb|\patpGro| & $\patpGro$ & Growth Patience rate (\texttt{thorn}) & $\patpGro = \pat -\ptyGro $ \\ \verb|\patr| & $\patr$ & Return Patience rate (\texttt{thorn}) & $\patr =\pat -\rfree $ @@ -246,13 +246,13 @@ \section{Parameters} \end{tabular} \caption{Parameters} \label{table:Parameters} -\end{table} +\end{table} Mnemonics: \begin{itemize} \item Hebrew \texttt{daleth} is the fourth letter of the Hebrew alphabet (as d and $\delta$ are of the Roman and Greek) and is an etymological and linguistic cousin of those letters \item $\discRte$ is the lower case Greek letter \texttt{omega}, because people say ``OMG, I've got to think about the future.'' -\item You are invited to scrutinize $\Xi$ yourself to imagine reasons it could represent something to do with population growth. +\item You are invited to scrutinize $\Xi$ yourself to imagine reasons it could represent something to do with population growth. \item The glorious letter $\Pat$ (pronounced `\href{http://en.wikipedia.org/wiki/Thorn_(letter)}{thorn}') enriched Old English, Gothic, and some other defunct alphabets; sadly, it remains in use today only in Iceland. It is useful because having to type the many symbols in the object $(\Rfree \DiscFac)^{1/\CRRA}$ over and over again is a \textit{thorn} in the side of economists working with dynamic models! (It is the `absolute patience factor' because if it is less than one the consumer wants to bring resources from the future to the present and is therefore absolutely impatient; for a fuller discussion of this terminology, see \cite{carrollTractable}.) \end{itemize} @@ -263,7 +263,7 @@ \section{Operators} \begin{table}[ht] \centering - \begin{tabular}{|>{\ttfamily}rccll|} + \begin{tabular}{|>{\ttfamily}rccll|} \hline Name & \LaTeX & Code & Description & Illustration \\ \hline @@ -273,7 +273,7 @@ \section{Operators} \end{tabular} \caption{Operators} \label{table:Operators} -\end{table} +\end{table} @@ -287,17 +287,17 @@ \section{Modifiers} \\ \hline \textit{[object]}\texttt{Agg} & - & Value of something at the aggregate level (as opposed to \texttt{Ind}) \\ \textit{[object]}\texttt{Ind} & - & Value of something at the level of an individual (as opposed to \texttt{Agg}) - \\ \textit{[object]}\texttt{Lvl} & - & Level - \\ \textit{[object]}\texttt{Rto} & - & Ratio - \\ \textit{[object]}\texttt{Bot} & - & Lower value in some range - \\ \textit{[object]}\texttt{Top} & - & Upper value in some range - \\ \textit{[object]}\texttt{Min} & - & Minimum possible value - \\ \textit{[object]}\texttt{Max} & - & Maximum possible value + \\ \textit{[object]}\texttt{Lvl} & - & Level + \\ \textit{[object]}\texttt{Rto} & - & Ratio + \\ \textit{[object]}\texttt{Bot} & - & Lower value in some range + \\ \textit{[object]}\texttt{Top} & - & Upper value in some range + \\ \textit{[object]}\texttt{Min} & - & Minimum possible value + \\ \textit{[object]}\texttt{Max} & - & Maximum possible value \\ \textit{[object]}\texttt{Cnt} & - & Continuous-time value \\ \textit{[object]}\texttt{Dsc} & - & Discrete-time value - \\ \textit{[object]}\texttt{Shk} & - & Shock + \\ \textit{[object]}\texttt{Shk} & - & Shock \\ \textit{[object]}\texttt{StE} & - & Steady-state Equilibrium value of a variable - \\ \textit{[object]}\texttt{Trg} & - & The `target' value of a variable + \\ \textit{[object]}\texttt{Trg} & - & The `target' value of a variable \\ \textit{[object]}\texttt{Rte} & - & A `rate' variable like the discount rate $\discRte$ \\ \textit{[object]}\texttt{Fac} & - & A factor variable like the discount factor $\DiscFac$ \\ \textit{[object]}\texttt{Amt} & - & An amount, like \texttt{TaxAmt} which might be lump-sum @@ -310,38 +310,38 @@ \section{Modifiers} \end{tabular} \caption{General Purpose Modifiers} \label{table:General} -\end{table} +\end{table} \medskip\medskip \hypertarget{Shocks}{} Shocks will generally be represented by finite vectors of outcomes and their probabilities. For example, permanent income is called \texttt{Perm} and shocks are designated \texttt{PermShk} \begin{table}[ht] \centering - \begin{tabular}{|>{\ttfamily}ccl|} + \begin{tabular}{|>{\ttfamily}ccl|} \hline \textit{[object]}\texttt{Dstn} & - & Representation of a probability distribution (includes both Prbs and Vals) - \\ \textit{[object]}\texttt{Prbs} & - & Probabilities of outcomes (e.g. \texttt{PermShkPrbs} for permanent shocks) - \\ \textit{[object]}\texttt{Vals} & - & Values (e.g., for mean one shock \texttt{PermShkVals} . \texttt{PermShkPrbs} = 1) + \\ \textit{[object]}\texttt{Prbs} & - & Probabilities of outcomes (e.g. \texttt{PermShkPrbs} for permanent shocks) + \\ \textit{[object]}\texttt{Vals} & - & Values (e.g., for mean one shock \texttt{PermShkVals} . \texttt{PermShkPrbs} = 1) \\ \hline \end{tabular} \caption{Probabilities} \label{table:Probabilities} -\end{table} +\end{table} \hypertarget{Timing}{} -Timing can be confusing because there can be multiple ordered steps +Timing can be confusing because there can be multiple ordered steps within a `period.' We will use \texttt{Prev}, \texttt{Curr}, \texttt{Next} to refer to steps relative to the local moment within a period, and $t$ variables to refer to succeeding periods: \begin{table}[ht] - \centering - \begin{tabular}{|>{\ttfamily}lcl|} + \centering + \begin{tabular}{|>{\ttfamily}lcl|} \hline \textit{[object]}tmn & - & object in period $t$ minus $n$ - \\ \textit{[object]}tm1 & - & object in period $t$ minus 1 + \\ \textit{[object]}tm1 & - & object in period $t$ minus 1 \\ \textit{[object]}Now & - & object in period $t$ \\ \textit{[object]}t\phantom{p1} & - & object in period $t$ (alternative definition) - \\ \textit{[object]}tp1 & - & object in $t$ plus 1 - \\ \textit{[object]}tpn & - & object in $t$ plus $n$ + \\ \textit{[object]}tp1 & - & object in $t$ plus 1 + \\ \textit{[object]}tpn & - & object in $t$ plus $n$ \\ \textit{[object]}Prev & - & object in previous subperiod \\ \textit{[object]}Curr & - & object in current subperiod \\ \textit{[object]}Next & - & object in next subperiod @@ -349,7 +349,7 @@ \section{Modifiers} \end{tabular} \caption{Timing} \label{table:Timing} -\end{table} +\end{table} \section{Model Imports} @@ -364,11 +364,9 @@ \section{Model Imports} \clearpage -\vfill\eject\pagebreak\newpage +\vfill\eject\pagebreak\newpage \bibliography{NARK-Add,economics} \end{document} - - diff --git a/Documentation/NARK/Resources/.git-public-commit b/Documentation/NARK/Resources/.git-public-commit index 8b1378917..e69de29bb 100644 --- a/Documentation/NARK/Resources/.git-public-commit +++ b/Documentation/NARK/Resources/.git-public-commit @@ -1 +0,0 @@ - diff --git a/Documentation/NARK/Resources/LaTeXInputs/BufferStockTheory-tikz.sty b/Documentation/NARK/Resources/LaTeXInputs/BufferStockTheory-tikz.sty index 0ea6bb711..45db72058 100644 --- a/Documentation/NARK/Resources/LaTeXInputs/BufferStockTheory-tikz.sty +++ b/Documentation/NARK/Resources/LaTeXInputs/BufferStockTheory-tikz.sty @@ -1,19 +1,19 @@ -% tikz is very finicky and so let's pull in a minimal set of needed packages +% tikz is very finicky and so let's pull in a minimal set of needed packages \RequirePackage{wasysym - ,psibycus % Greek language package, including koppa + ,psibycus % Greek language package, including koppa ,ushort ,ifthen ,tipa ,cancel } -\usepackage{econtexShortcuts} % Lots of macros +\usepackage{econtexShortcuts} % Lots of macros % Math mode Pat does not play nicely with tikz for some reason \renewcommand{\Pat}{\textbf{\Thorn}} -% Special underlining -\usepackage[normalem]{ulem} +% Special underlining +\usepackage[normalem]{ulem} \makeatletter \newcommand*{\saved@uline}{} @@ -30,7 +30,7 @@ } \renewcommand*{\uline}{% - \relax + \relax \ifmmode \expandafter\mathuline \else diff --git a/Documentation/NARK/Resources/LaTeXInputs/BufferStockTheory.sty b/Documentation/NARK/Resources/LaTeXInputs/BufferStockTheory.sty index 642160af0..079dcfebf 100755 --- a/Documentation/NARK/Resources/LaTeXInputs/BufferStockTheory.sty +++ b/Documentation/NARK/Resources/LaTeXInputs/BufferStockTheory.sty @@ -6,7 +6,7 @@ \newcommand{\onlyinsubfile}[1]{#1}\newcommand{\notinsubfile}[1]{} % https://tex.stackexchange.com/questions/463699/proper-reference-numbers-with-subfiles -\newcommand\labelprefix{} +\newcommand\labelprefix{} \newcommand\localorexternallabel[1]{% \expandafter\ifx\csname r@#1\endcsname\relax \labelprefix @@ -23,10 +23,10 @@ % Implement a standard setup and shortcuts, e.g. for the \CRRA \usepackage{\econtexSetup} \usepackage{econtexShortcuts} -\usepackage{makecell} +\usepackage{makecell} \usepackage{rotating}\usepackage{subfigure} -% Embed metadata +% Embed metadata \hypersetup{pdfauthor={Christopher D. Carroll }, pdftitle={Theoretical Foundations of Buffer Stock Saving}, pdfkeywords={Precautionary saving, buffer-stock saving, consumption, marginal propensity to consume, permanent income hypothesis, income fluctuation problem}, @@ -37,4 +37,3 @@ \newtheorem{defn}{Definition} \newtheorem{theorem}{Theorem} - diff --git a/Documentation/NARK/Resources/LaTeXInputs/econtex_onlyinsubfile.tex b/Documentation/NARK/Resources/LaTeXInputs/econtex_onlyinsubfile.tex index d5b0ec841..b8ad95fe4 100644 --- a/Documentation/NARK/Resources/LaTeXInputs/econtex_onlyinsubfile.tex +++ b/Documentation/NARK/Resources/LaTeXInputs/econtex_onlyinsubfile.tex @@ -8,4 +8,3 @@ % Initialize the counters via the labels belonging to the main document: \setcounter{equation}{\numexpr\getrefnumber{\labelprefix eq:Dummy}\relax}% eq:Dummy is the last number used for an equation in the main text; start counting up from there } - diff --git a/Documentation/NARK/Resources/PoweredByEconARK.svg b/Documentation/NARK/Resources/PoweredByEconARK.svg index d58614648..3ffa95dbf 100644 --- a/Documentation/NARK/Resources/PoweredByEconARK.svg +++ b/Documentation/NARK/Resources/PoweredByEconARK.svg @@ -1 +1 @@ -Powered by: Econ-ARKPowered byEcon-ARK \ No newline at end of file +Powered by: Econ-ARKPowered byEcon-ARK diff --git a/Documentation/NARK/Resources/econ-ark-logo-small.xbb b/Documentation/NARK/Resources/econ-ark-logo-small.xbb index dfd587c6f..3a34e07ff 100644 --- a/Documentation/NARK/Resources/econ-ark-logo-small.xbb +++ b/Documentation/NARK/Resources/econ-ark-logo-small.xbb @@ -3,4 +3,3 @@ %%BoundingBox: 0 0 140 96 %%HiResBoundingBox: 0.000000 0.000000 139.982502 95.988001 %%CreationDate: Tue Oct 27 17:55:36 2020 - diff --git a/Documentation/NARK/Resources/texmf-local/README.md b/Documentation/NARK/Resources/texmf-local/README.md index e740ea91f..c57d0c09f 100644 --- a/Documentation/NARK/Resources/texmf-local/README.md +++ b/Documentation/NARK/Resources/texmf-local/README.md @@ -17,5 +17,3 @@ Then you have two options: 1. Windows does not allow symbolic links. So on Windows machines you will need to modify the texmf.cnf configuration file so that it knows to look in the right place (your Dropbox path) for the texmf-local config files - - diff --git a/Documentation/NARK/Resources/texmf-local/bibtex/bib/economics.bib b/Documentation/NARK/Resources/texmf-local/bibtex/bib/economics.bib index 0dd37eeda..10bd9a6dc 100644 --- a/Documentation/NARK/Resources/texmf-local/bibtex/bib/economics.bib +++ b/Documentation/NARK/Resources/texmf-local/bibtex/bib/economics.bib @@ -26,7 +26,7 @@ @article{schmitt2003closing } @misc{maTodaRich, - title={A Theory of the Saving Rate of the Rich}, + title={A Theory of the Saving Rate of the Rich}, author={Qingyin Ma and Alexis Akira Toda}, year={2020}, eprint={2005.02379}, @@ -936,7 +936,7 @@ @article{khanMacroPru journal = {Department of Economics, Johns Hopkins University}, year = {2019}, url = {https://pdfs.semanticscholar.org/8e9d/dfe7c204bbfa8a23f42f4931461fb467fc08.pdf?_ga=2.95712860.1156899890.1563925023-1991616136.1563925023} -} +} @article{SSinHANK, title = {Monetary Policy Transmission with Many Agents}, @@ -944,8 +944,8 @@ @article{SSinHANK journal = {Manuscript, Johns Hopkins University}, year = {2019}, month = {March}, -} - +} + @article{blSolving, title = {Solving Heterogeneous Agent Models In Discrete Time With Many Idiosyncratic States By Perturbation Methods}, author = {Christian Bayer and Ralph Luetticke}, @@ -953,7 +953,7 @@ @article{blSolving volume = {Discussion Paper 13071}, year = 2018 } - + @article{carrollHeteroAndMacro, title = {Heterogeneity and Macro Modeling In Policymaking Institutions}, year = {2019}, @@ -1542,9 +1542,9 @@ @inproceedings{ParkerSoulelesCarroll Christopher D. Carroll}, title = {The Benefits of Panel Data in Consumer Expenditure Surveys}, - booktitle = {Improving the Measurement of Consumer Expenditures}, + booktitle = {Improving the Measurement of Consumer Expenditures}, chapter = {7}, - note = {Final version at + note = {Final version at \href{http://econ.jhu.edu/people/ccarroll/papers/ParkerSoulelesCarroll/}{\texttt{http://econ.jhu.edu/people/ccarroll/papers/ParkerSoulelesCarroll/}}}, url = {http://econ.jhu.edu/people/ccarroll/papers/ParkerSoulelesCarroll/} } @@ -2551,7 +2551,7 @@ @article{druedahlNEGM title = {A Fast Nested Endogenous Grid Method for Solving General Consumption-Saving Models}, author = {Druedahl, Jeppe}, journal = {Manuscript, University of Copenhagen} -} +} @Article{JBES1982, author={Perraudin, William R M and Sorensen, Bent E}, @@ -3220,7 +3220,7 @@ @techreport{akmwwInequality-Discuss institution = {NBER}, url = {http://www.econ2.jhu.edu/people/ccarroll/discuss/2017-04_NBER_Macro-Annual/akmwwInequality/} } - + @article{akmwwInequality, title = {When Inequality Matters for Macro and Macro Matters for Inequality}, author = {SeHyoun Ahn and Greg Kaplan and Benjamin Moll and Thomas Winberry and Christian Wolf}, @@ -3338,7 +3338,7 @@ @article{grodzickiCCC journal={The Pennsylvania State University}, year={2015} } - + @article{ausubelFailure, title={The failure of competition in the credit card market}, author={Ausubel, Lawrence M}, @@ -3444,7 +3444,7 @@ @article{samuelson1937note year={1937}, publisher={JSTOR} } - + @article{samuelson1979we, title={Why we should not make mean log of wealth big though years to act are long}, @@ -3457,7 +3457,7 @@ @article{samuelson1979we publisher={Elsevier}, doi= {http://dx.doi.org/10.1016/0378-4266(79)90023-2} } - + @article{BueraShin2009, title={Productivity Growth and Capital Flows: The Dynamics of Reform}, author={Buera, Francisco and Yongseok Shin}, @@ -3515,7 +3515,7 @@ @techreport{assMiddleClass URL = "http://www.nber.org/papers/w20848", abstract = {We provide new facts on the debt dynamics leading up to the financial crisis of 2007. Earlier research suggests that distortions in the supply of mortgage credit, evidenced by a decoupling of credit flow from income growth, may have caused the rise in house prices and the subsequent housing market collapse. This paper shows that the increase in mortgage originations was shared across the whole distribution of borrowers, and that middle- and high-income borrowers made up the majority of originations even at the peak of the boom. Compared to prior years, middle- and high-income borrowers (not the poor), as well as those with medium and high credit scores, made up a much larger share of delinquencies in the crisis relative to earlier years. We show that the relation between individual mortgage size and income growth during the housing boom was always strongly positive, also in line with previous periods (and independent of how income is measured). These results are most consistent with an expectations based view of the financial crisis in which both homebuyers and lenders were buying into increasing housing values and defaulted once prices dropped. }, } - + @TECHREPORT{aydinMPCLiq, title = {The Marginal Propensity to Consume out of Liquidity}, author = {Aydin, Deniz}, @@ -7064,7 +7064,7 @@ @Article{carrollBSTheory } % Updates here should sync with /Volumes/Data/Papers/BufferStockTheory/BufferStockTheory-Latest/LaTeX/BufferStockTheory-Self.bib and the corresponding public version -@article{BufferStockTheory, +@article{BufferStockTheory, author = {Christopher D. Carroll}, journal = {Quantitative Economics}, title = {Theoretical Foundations of Buffer Stock Saving}, @@ -11110,7 +11110,7 @@ @article{gross&souleles:creditcards year={2002}, publisher={Oxford University Press} } - + @ARTICLE{gross&souleles:bankruptcy, author = {Gross, David B. and Souleles, Nicholas S.}, title = {Explaining the Rise in Bankruptcy and Delinquency: @@ -12195,7 +12195,7 @@ @ARTICLE{ipsUnitHetero volume = 115, pages = {53--74} } - + @INBOOK{IMFweo2012, chapter = 3, title = {World Economic Outlook, 2012}, @@ -22355,4 +22355,3 @@ @string{restud @string{rfs = {review of financial studies}} @string{rje = {rand journal of economics}} - diff --git a/Documentation/NARK/Resources/texmf-local/bibtex/bst/unsrtnatTitlesFirst.bst b/Documentation/NARK/Resources/texmf-local/bibtex/bst/unsrtnatTitlesFirst.bst index 9c0acffd2..fb0bb89d8 100755 --- a/Documentation/NARK/Resources/texmf-local/bibtex/bst/unsrtnatTitlesFirst.bst +++ b/Documentation/NARK/Resources/texmf-local/bibtex/bst/unsrtnatTitlesFirst.bst @@ -7,7 +7,7 @@ %% natbst.mbs (with options: `name-full,atit-lower,month-full,jour-full') %% ---------------------------------------- %% *** Version of `abbrv.bst' for use with natbib package *** -%% +%% % The original source file contains the following version information: % \ProvidesFile{natbst.mbs}[1997/03/19 1.4 (PWD)] @@ -244,7 +244,7 @@ FUNCTION {format.editors} % Got the following code from document called btex101.pdf FUNCTION {format.title} -{ +{ title "``" swap$ * ".'' " * % Put article title in quotes } diff --git a/Documentation/NARK/Resources/texmf-local/tex/latex/ReadMe.texmf b/Documentation/NARK/Resources/texmf-local/tex/latex/ReadMe.texmf index 85d44dc6a..9485d0cf2 100644 --- a/Documentation/NARK/Resources/texmf-local/tex/latex/ReadMe.texmf +++ b/Documentation/NARK/Resources/texmf-local/tex/latex/ReadMe.texmf @@ -7,11 +7,11 @@ You will likely need the "full" distribution of TeXLive, as many obscure tex pac openout_any = a shell_escape = t -to your local texmf.cnf configuration file. On a standard MacTeX TeXLive distribution, this file is at +to your local texmf.cnf configuration file. On a standard MacTeX TeXLive distribution, this file is at /usr/local/texlive/[year]/texmf.cnf -while on a standard Windows 7 installation it is at +while on a standard Windows 7 installation it is at C:\texlive\[year]\texmf.cnf diff --git a/Documentation/NARK/Resources/texmf-local/tex/latex/articleNoRefHead.cls b/Documentation/NARK/Resources/texmf-local/tex/latex/articleNoRefHead.cls index e418b9cc2..6c7ed7683 100755 --- a/Documentation/NARK/Resources/texmf-local/tex/latex/articleNoRefHead.cls +++ b/Documentation/NARK/Resources/texmf-local/tex/latex/articleNoRefHead.cls @@ -1 +1 @@ -%% %% This is file `article.cls', %% generated with the docstrip utility. %% %% The original source files were: %% %% classes.dtx (with options: `article') %% %% This is a generated file. %% %% Copyright 1993 1994 1995 1996 1997 1998 1999 %% The LaTeX3 Project and any individual authors listed elsewhere %% in this file. %% %% This file is part of the LaTeX base system. %% ------------------------------------------- %% %% It may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.1 %% of this license or (at your option) any later version. %% The latest version of this license is in %% http://www.latex-project.org/lppl.txt %% and version 1.1 or later is part of all distributions of LaTeX %% version 1999/06/01 or later. %% %% The list of all files belonging to the LaTeX base distribution is %% given in the file `manifest.txt'. See also `legal.txt' for additional %% information. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z %% Digits \0\1\2\3\4\5\6\7\8\9 %% Exclamation \! Double quote \" Hash (number) \# %% Dollar \$ Percent \% Ampersand \& %% Acute accent \' Left paren \( Right paren \) %% Asterisk \* Plus \+ Comma \, %% Minus \- Point \. Solidus \/ %% Colon \: Semicolon \; Less than \< %% Equals \= Greater than \> Question mark \? %% Commercial at \@ Left bracket \[ Backslash \\ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesClass{articleNoRefHead} [1999/01/07 v1.4a Standard LaTeX document class] \newcommand\@ptsize{} \newif\if@restonecol \newif\if@titlepage \@titlepagefalse \if@compatibility\else \DeclareOption{a4paper} {\setlength\paperheight {297mm}% \setlength\paperwidth {210mm}} \DeclareOption{a5paper} {\setlength\paperheight {210mm}% \setlength\paperwidth {148mm}} \DeclareOption{b5paper} {\setlength\paperheight {250mm}% \setlength\paperwidth {176mm}} \DeclareOption{letterpaper} {\setlength\paperheight {11in}% \setlength\paperwidth {8.5in}} \DeclareOption{legalpaper} {\setlength\paperheight {14in}% \setlength\paperwidth {8.5in}} \DeclareOption{executivepaper} {\setlength\paperheight {10.5in}% \setlength\paperwidth {7.25in}} \DeclareOption{landscape} {\setlength\@tempdima {\paperheight}% \setlength\paperheight {\paperwidth}% \setlength\paperwidth {\@tempdima}} \fi \if@compatibility \renewcommand\@ptsize{0} \else \DeclareOption{10pt}{\renewcommand\@ptsize{0}} \fi \DeclareOption{11pt}{\renewcommand\@ptsize{1}} \DeclareOption{12pt}{\renewcommand\@ptsize{2}} \if@compatibility\else \DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse} \fi \DeclareOption{twoside}{\@twosidetrue \@mparswitchtrue} \DeclareOption{draft}{\setlength\overfullrule{5pt}} \if@compatibility\else \DeclareOption{final}{\setlength\overfullrule{0pt}} \fi \DeclareOption{titlepage}{\@titlepagetrue} \if@compatibility\else \DeclareOption{notitlepage}{\@titlepagefalse} \fi \if@compatibility\else \DeclareOption{onecolumn}{\@twocolumnfalse} \fi \DeclareOption{twocolumn}{\@twocolumntrue} \DeclareOption{leqno}{\input{leqno.clo}} \DeclareOption{fleqn}{\input{fleqn.clo}} \DeclareOption{openbib}{% \AtEndOfPackage{% \renewcommand\@openbib@code{% \advance\leftmargin\bibindent \itemindent -\bibindent \listparindent \itemindent \parsep \z@ }% \renewcommand\newblock{\par}}% } \ExecuteOptions{letterpaper,10pt,oneside,onecolumn,final} \ProcessOptions \input{size1\@ptsize.clo} \setlength\lineskip{1\p@} \setlength\normallineskip{1\p@} \renewcommand\baselinestretch{} \setlength\parskip{0\p@ \@plus \p@} \@lowpenalty 51 \@medpenalty 151 \@highpenalty 301 \setcounter{topnumber}{2} \renewcommand\topfraction{.7} \setcounter{bottomnumber}{1} \renewcommand\bottomfraction{.3} \setcounter{totalnumber}{3} \renewcommand\textfraction{.2} \renewcommand\floatpagefraction{.5} \setcounter{dbltopnumber}{2} \renewcommand\dbltopfraction{.7} \renewcommand\dblfloatpagefraction{.5} \if@twoside \def\ps@headings{% \let\@oddfoot\@empty\let\@evenfoot\@empty \def\@evenhead{\thepage\hfil\slshape\leftmark}% \def\@oddhead{{\slshape\rightmark}\hfil\thepage}% \let\@mkboth\markboth \def\sectionmark##1{% \markboth {\MakeUppercase{% \ifnum \c@secnumdepth >\z@ \thesection\quad \fi ##1}}{}}% \def\subsectionmark##1{% \markright {% \ifnum \c@secnumdepth >\@ne \thesubsection\quad \fi ##1}}} \else \def\ps@headings{% \let\@oddfoot\@empty \def\@oddhead{{\slshape\rightmark}\hfil\thepage}% \let\@mkboth\markboth \def\sectionmark##1{% \markright {\MakeUppercase{% \ifnum \c@secnumdepth >\m@ne \thesection\quad \fi ##1}}}} \fi \def\ps@myheadings{% \let\@oddfoot\@empty\let\@evenfoot\@empty \def\@evenhead{\thepage\hfil\slshape\leftmark}% \def\@oddhead{{\slshape\rightmark}\hfil\thepage}% \let\@mkboth\@gobbletwo \let\sectionmark\@gobble \let\subsectionmark\@gobble } \if@titlepage \newcommand\maketitle{\begin{titlepage}% \let\footnotesize\small \let\footnoterule\relax \let \footnote \thanks \null\vfil \vskip 60\p@ \begin{center}% {\LARGE \@title \par}% \vskip 3em% {\large \lineskip .75em% \begin{tabular}[t]{c}% \@author \end{tabular}\par}% \vskip 1.5em% {\large \@date \par}% % Set date in \large size. \end{center}\par \@thanks \vfil\null \end{titlepage}% \setcounter{footnote}{0}% \global\let\thanks\relax \global\let\maketitle\relax \global\let\@thanks\@empty \global\let\@author\@empty \global\let\@date\@empty \global\let\@title\@empty \global\let\title\relax \global\let\author\relax \global\let\date\relax \global\let\and\relax } \else \newcommand\maketitle{\par \begingroup \renewcommand\thefootnote{\@fnsymbol\c@footnote}% \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% \long\def\@makefntext##1{\parindent 1em\noindent \hb@xt@1.8em{% \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% \if@twocolumn \ifnum \col@number=\@ne \@maketitle \else \twocolumn[\@maketitle]% \fi \else \newpage \global\@topnum\z@ % Prevents figures from going at top of page. \@maketitle \fi \thispagestyle{plain}\@thanks \endgroup \setcounter{footnote}{0}% \global\let\thanks\relax \global\let\maketitle\relax \global\let\@maketitle\relax \global\let\@thanks\@empty \global\let\@author\@empty \global\let\@date\@empty \global\let\@title\@empty \global\let\title\relax \global\let\author\relax \global\let\date\relax \global\let\and\relax } \def\@maketitle{% \newpage \null \vskip 2em% \begin{center}% \let \footnote \thanks {\LARGE \@title \par}% \vskip 1.5em% {\large \lineskip .5em% \begin{tabular}[t]{c}% \@author \end{tabular}\par}% \vskip 1em% {\large \@date}% \end{center}% \par \vskip 1.5em} \fi \setcounter{secnumdepth}{3} \newcounter {part} \newcounter {section} \newcounter {subsection}[section] \newcounter {subsubsection}[subsection] \newcounter {paragraph}[subsubsection] \newcounter {subparagraph}[paragraph] \renewcommand \thepart {\@Roman\c@part} \renewcommand \thesection {}%\@arabic\c@section} \renewcommand\thesubsection {\thesection.\@arabic\c@subsection} \renewcommand\thesubsubsection{\thesubsection .\@arabic\c@subsubsection} \renewcommand\theparagraph {\thesubsubsection.\@arabic\c@paragraph} \renewcommand\thesubparagraph {\theparagraph.\@arabic\c@subparagraph} \newcommand\part{% \if@noskipsec \leavevmode \fi \par \addvspace{4ex}% \@afterindentfalse \secdef\@part\@spart} \def\@part[#1]#2{% \ifnum \c@secnumdepth >\m@ne \refstepcounter{part}% \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% \else \addcontentsline{toc}{part}{#1}% \fi {\parindent \z@ \raggedright \interlinepenalty \@M \normalfont \ifnum \c@secnumdepth >\m@ne \Large\bfseries \partname~\thepart \par\nobreak \fi \huge \bfseries #2% \markboth{}{}\par}% \nobreak \vskip 3ex \@afterheading} \def\@spart#1{% {\parindent \z@ \raggedright \interlinepenalty \@M \normalfont \huge \bfseries #1\par}% \nobreak \vskip 3ex \@afterheading} \newcommand\section{\@startsection{section}{1}{ \z@} % {-3.5ex \@plus -1ex \@minus -.2ex}% {2.3ex \@plus.2ex}% {\normalfont\Large\bfseries}} \newcommand\subsection{\@startsection{subsection}{2}{\z@}% {-3.25ex\@plus -1ex \@minus -.2ex}% {1.5ex \@plus .2ex}% {\normalfont\large\bfseries}} \newcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% {-3.25ex\@plus -1ex \@minus -.2ex}% {1.5ex \@plus .2ex}% {\normalfont\normalsize\bfseries}} \newcommand\paragraph{\@startsection{paragraph}{4}{\z@}% {3.25ex \@plus1ex \@minus.2ex}% {-1em}% {\normalfont\normalsize\bfseries}} \newcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}% {3.25ex \@plus1ex \@minus .2ex}% {-1em}% {\normalfont\normalsize\bfseries}} \if@twocolumn \setlength\leftmargini {2em} \else \setlength\leftmargini {2.5em} \fi \leftmargin \leftmargini \setlength\leftmarginii {2.2em} \setlength\leftmarginiii {1.87em} \setlength\leftmarginiv {1.7em} \if@twocolumn \setlength\leftmarginv {.5em} \setlength\leftmarginvi {.5em} \else \setlength\leftmarginv {1em} \setlength\leftmarginvi {1em} \fi \setlength \labelsep {.5em} \setlength \labelwidth{\leftmargini} \addtolength\labelwidth{-\labelsep} \@beginparpenalty -\@lowpenalty \@endparpenalty -\@lowpenalty \@itempenalty -\@lowpenalty \renewcommand\theenumi{\@arabic\c@enumi} \renewcommand\theenumii{\@alph\c@enumii} \renewcommand\theenumiii{\@roman\c@enumiii} \renewcommand\theenumiv{\@Alph\c@enumiv} \newcommand\labelenumi{\theenumi.} \newcommand\labelenumii{(\theenumii)} \newcommand\labelenumiii{\theenumiii.} \newcommand\labelenumiv{\theenumiv.} \renewcommand\p@enumii{\theenumi} \renewcommand\p@enumiii{\theenumi(\theenumii)} \renewcommand\p@enumiv{\p@enumiii\theenumiii} \newcommand\labelitemi{\textbullet} \newcommand\labelitemii{\normalfont\bfseries \textendash} \newcommand\labelitemiii{\textasteriskcentered} \newcommand\labelitemiv{\textperiodcentered} \newenvironment{description} {\list{}{\labelwidth\z@ \itemindent-\leftmargin \let\makelabel\descriptionlabel}} {\endlist} \newcommand*\descriptionlabel[1]{\hspace\labelsep \normalfont\bfseries #1} \if@titlepage \newenvironment{abstract}{% \titlepage \null\vfil \@beginparpenalty\@lowpenalty \begin{center}% \bfseries \abstractname \@endparpenalty\@M \end{center}}% {\par\vfil\null\endtitlepage} \else \newenvironment{abstract}{% \if@twocolumn \section*{\abstractname}% \else \small \begin{center}% {\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}% \end{center}% \quotation \fi} {\if@twocolumn\else\endquotation\fi} \fi \newenvironment{verse} {\let\\\@centercr \list{}{\itemsep \z@ \itemindent -1.5em% \listparindent\itemindent \rightmargin \leftmargin \advance\leftmargin 1.5em}% \item\relax} {\endlist} \newenvironment{quotation} {\list{}{\listparindent 1.5em% \itemindent \listparindent \rightmargin \leftmargin \parsep \z@ \@plus\p@}% \item\relax} {\endlist} \newenvironment{quote} {\list{}{\rightmargin\leftmargin}% \item\relax} {\endlist} \if@compatibility \newenvironment{titlepage} {% \if@twocolumn \@restonecoltrue\onecolumn \else \@restonecolfalse\newpage \fi \thispagestyle{empty}% \setcounter{page}\z@ }% {\if@restonecol\twocolumn \else \newpage \fi } \else \newenvironment{titlepage} {% \if@twocolumn \@restonecoltrue\onecolumn \else \@restonecolfalse\newpage \fi \thispagestyle{empty}% \setcounter{page}\@ne }% {\if@restonecol\twocolumn \else \newpage \fi \if@twoside\else \setcounter{page}\@ne \fi } \fi \newcommand\appendix{\par \setcounter{section}{0}% \setcounter{subsection}{0}% \gdef\thesection{\@Alph\c@section}} \setlength\arraycolsep{5\p@} \setlength\tabcolsep{6\p@} \setlength\arrayrulewidth{.4\p@} \setlength\doublerulesep{2\p@} \setlength\tabbingsep{\labelsep} \skip\@mpfootins = \skip\footins \setlength\fboxsep{3\p@} \setlength\fboxrule{.4\p@} \renewcommand \theequation {\@arabic\c@equation} \newcounter{figure} \renewcommand \thefigure {\@arabic\c@figure} \def\fps@figure{tbp} \def\ftype@figure{1} \def\ext@figure{lof} \def\fnum@figure{\figurename~\thefigure} \newenvironment{figure} {\@float{figure}} {\end@float} \newenvironment{figure*} {\@dblfloat{figure}} {\end@dblfloat} \newcounter{table} \renewcommand\thetable{\@arabic\c@table} \def\fps@table{tbp} \def\ftype@table{2} \def\ext@table{lot} \def\fnum@table{\tablename~\thetable} \newenvironment{table} {\@float{table}} {\end@float} \newenvironment{table*} {\@dblfloat{table}} {\end@dblfloat} \newlength\abovecaptionskip \newlength\belowcaptionskip \setlength\abovecaptionskip{10\p@} \setlength\belowcaptionskip{0\p@} \long\def\@makecaption#1#2{% \vskip\abovecaptionskip \sbox\@tempboxa{#1: #2}% \ifdim \wd\@tempboxa >\hsize #1: #2\par \else \global \@minipagefalse \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% \fi \vskip\belowcaptionskip} \DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm} \DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf} \DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt} \DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf} \DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit} \DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl} \DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc} \DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal} \DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal} \newcommand\@pnumwidth{1.55em} \newcommand\@tocrmarg{2.55em} \newcommand\@dotsep{4.5} \setcounter{tocdepth}{3} \newcommand\tableofcontents{% \section*{\contentsname \@mkboth{% \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}% \@starttoc{toc}% } \newcommand*\l@part[2]{% \ifnum \c@tocdepth >-2\relax \addpenalty\@secpenalty \addvspace{2.25em \@plus\p@}% \begingroup \parindent \z@ \rightskip \@pnumwidth \parfillskip -\@pnumwidth {\leavevmode \large \bfseries #1\hfil \hb@xt@\@pnumwidth{\hss #2}}\par \nobreak \if@compatibility \global\@nobreaktrue \everypar{\global\@nobreakfalse\everypar{}}% \fi \endgroup \fi} \newcommand*\l@section[2]{% \ifnum \c@tocdepth >\z@ \addpenalty\@secpenalty \addvspace{1.0em \@plus\p@}% \setlength\@tempdima{1.5em}% \begingroup \parindent \z@ \rightskip \@pnumwidth \parfillskip -\@pnumwidth \leavevmode \bfseries \advance\leftskip\@tempdima \hskip -\leftskip #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par \endgroup \fi} \newcommand*\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}} \newcommand*\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}} \newcommand*\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}} \newcommand*\l@subparagraph{\@dottedtocline{5}{10em}{5em}} \newcommand\listoffigures{% \section*{\listfigurename \@mkboth{\MakeUppercase\listfigurename}% {\MakeUppercase\listfigurename}}% \@starttoc{lof}% } \newcommand*\l@figure{\@dottedtocline{1}{1.5em}{2.3em}} \newcommand\listoftables{% \section*{\listtablename \@mkboth{% \MakeUppercase\listtablename}{\MakeUppercase\listtablename}}% \@starttoc{lot}% } \let\l@table\l@figure \newdimen\bibindent \setlength\bibindent{1.5em} \newenvironment{thebibliography}[1] { \section{\refname} % \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}}% \list{}%\@biblabel{\@arabic\c@enumiv} {\settowidth\labelwidth{\@biblabel{#1}}% \leftmargin\labelwidth \advance\leftmargin\labelsep \@openbib@code \usecounter{enumiv}% \let\p@enumiv\@empty \renewcommand\theenumiv{}}%\@arabic\c@enumiv \sloppy \clubpenalty4000 \@clubpenalty \clubpenalty \widowpenalty4000% \sfcode`\.\@m} {\def\@noitemerr {\@latex@warning{Empty `thebibliography' environment}}% \endlist} \newcommand\newblock{\hskip .11em\@plus.33em\@minus.07em} \let\@openbib@code\@empty \newenvironment{theindex} {\if@twocolumn \@restonecolfalse \else \@restonecoltrue \fi \columnseprule \z@ \columnsep 35\p@ \twocolumn[\section*{\indexname}]% \@mkboth{\MakeUppercase\indexname}% {\MakeUppercase\indexname}% \thispagestyle{plain}\parindent\z@ \parskip\z@ \@plus .3\p@\relax \let\item\@idxitem} {\if@restonecol\onecolumn\else\clearpage\fi} \newcommand\@idxitem{\par\hangindent 40\p@} \newcommand\subitem{\@idxitem \hspace*{20\p@}} \newcommand\subsubitem{\@idxitem \hspace*{30\p@}} \newcommand\indexspace{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax} \renewcommand\footnoterule{% \kern-3\p@ \hrule\@width.4\columnwidth \kern2.6\p@} \newcommand\@makefntext[1]{% \parindent 1em% \noindent \hb@xt@1.8em{\hss\@makefnmark}#1} \newcommand\contentsname{Contents} \newcommand\listfigurename{List of Figures} \newcommand\listtablename{List of Tables} \newcommand\refname{} \newcommand\indexname{Index} \newcommand\figurename{Figure} \newcommand\tablename{Table} \newcommand\partname{Part} \newcommand\appendixname{Appendix} \newcommand\abstractname{Abstract} \def\today{\ifcase\month\or January\or February\or March\or April\or May\or June\or July\or August\or September\or October\or November\or December\fi \space\number\day, \number\year} \setlength\columnsep{10\p@} \setlength\columnseprule{0\p@} \pagestyle{plain} \pagenumbering{arabic} \if@twoside \else \raggedbottom \fi \if@twocolumn \twocolumn \sloppy \flushbottom \else \onecolumn \fi \endinput %% %% End of file `article.cls'. \ No newline at end of file +%% %% This is file `article.cls', %% generated with the docstrip utility. %% %% The original source files were: %% %% classes.dtx (with options: `article') %% %% This is a generated file. %% %% Copyright 1993 1994 1995 1996 1997 1998 1999 %% The LaTeX3 Project and any individual authors listed elsewhere %% in this file. %% %% This file is part of the LaTeX base system. %% ------------------------------------------- %% %% It may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.1 %% of this license or (at your option) any later version. %% The latest version of this license is in %% http://www.latex-project.org/lppl.txt %% and version 1.1 or later is part of all distributions of LaTeX %% version 1999/06/01 or later. %% %% The list of all files belonging to the LaTeX base distribution is %% given in the file `manifest.txt'. See also `legal.txt' for additional %% information. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z %% Digits \0\1\2\3\4\5\6\7\8\9 %% Exclamation \! Double quote \" Hash (number) \# %% Dollar \$ Percent \% Ampersand \& %% Acute accent \' Left paren \( Right paren \) %% Asterisk \* Plus \+ Comma \, %% Minus \- Point \. Solidus \/ %% Colon \: Semicolon \; Less than \< %% Equals \= Greater than \> Question mark \? %% Commercial at \@ Left bracket \[ Backslash \\ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesClass{articleNoRefHead} [1999/01/07 v1.4a Standard LaTeX document class] \newcommand\@ptsize{} \newif\if@restonecol \newif\if@titlepage \@titlepagefalse \if@compatibility\else \DeclareOption{a4paper} {\setlength\paperheight {297mm}% \setlength\paperwidth {210mm}} \DeclareOption{a5paper} {\setlength\paperheight {210mm}% \setlength\paperwidth {148mm}} \DeclareOption{b5paper} {\setlength\paperheight {250mm}% \setlength\paperwidth {176mm}} \DeclareOption{letterpaper} {\setlength\paperheight {11in}% \setlength\paperwidth {8.5in}} \DeclareOption{legalpaper} {\setlength\paperheight {14in}% \setlength\paperwidth {8.5in}} \DeclareOption{executivepaper} {\setlength\paperheight {10.5in}% \setlength\paperwidth {7.25in}} \DeclareOption{landscape} {\setlength\@tempdima {\paperheight}% \setlength\paperheight {\paperwidth}% \setlength\paperwidth {\@tempdima}} \fi \if@compatibility \renewcommand\@ptsize{0} \else \DeclareOption{10pt}{\renewcommand\@ptsize{0}} \fi \DeclareOption{11pt}{\renewcommand\@ptsize{1}} \DeclareOption{12pt}{\renewcommand\@ptsize{2}} \if@compatibility\else \DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse} \fi \DeclareOption{twoside}{\@twosidetrue \@mparswitchtrue} \DeclareOption{draft}{\setlength\overfullrule{5pt}} \if@compatibility\else \DeclareOption{final}{\setlength\overfullrule{0pt}} \fi \DeclareOption{titlepage}{\@titlepagetrue} \if@compatibility\else \DeclareOption{notitlepage}{\@titlepagefalse} \fi \if@compatibility\else \DeclareOption{onecolumn}{\@twocolumnfalse} \fi \DeclareOption{twocolumn}{\@twocolumntrue} \DeclareOption{leqno}{\input{leqno.clo}} \DeclareOption{fleqn}{\input{fleqn.clo}} \DeclareOption{openbib}{% \AtEndOfPackage{% \renewcommand\@openbib@code{% \advance\leftmargin\bibindent \itemindent -\bibindent \listparindent \itemindent \parsep \z@ }% \renewcommand\newblock{\par}}% } \ExecuteOptions{letterpaper,10pt,oneside,onecolumn,final} \ProcessOptions \input{size1\@ptsize.clo} \setlength\lineskip{1\p@} \setlength\normallineskip{1\p@} \renewcommand\baselinestretch{} \setlength\parskip{0\p@ \@plus \p@} \@lowpenalty 51 \@medpenalty 151 \@highpenalty 301 \setcounter{topnumber}{2} \renewcommand\topfraction{.7} \setcounter{bottomnumber}{1} \renewcommand\bottomfraction{.3} \setcounter{totalnumber}{3} \renewcommand\textfraction{.2} \renewcommand\floatpagefraction{.5} \setcounter{dbltopnumber}{2} \renewcommand\dbltopfraction{.7} \renewcommand\dblfloatpagefraction{.5} \if@twoside \def\ps@headings{% \let\@oddfoot\@empty\let\@evenfoot\@empty \def\@evenhead{\thepage\hfil\slshape\leftmark}% \def\@oddhead{{\slshape\rightmark}\hfil\thepage}% \let\@mkboth\markboth \def\sectionmark##1{% \markboth {\MakeUppercase{% \ifnum \c@secnumdepth >\z@ \thesection\quad \fi ##1}}{}}% \def\subsectionmark##1{% \markright {% \ifnum \c@secnumdepth >\@ne \thesubsection\quad \fi ##1}}} \else \def\ps@headings{% \let\@oddfoot\@empty \def\@oddhead{{\slshape\rightmark}\hfil\thepage}% \let\@mkboth\markboth \def\sectionmark##1{% \markright {\MakeUppercase{% \ifnum \c@secnumdepth >\m@ne \thesection\quad \fi ##1}}}} \fi \def\ps@myheadings{% \let\@oddfoot\@empty\let\@evenfoot\@empty \def\@evenhead{\thepage\hfil\slshape\leftmark}% \def\@oddhead{{\slshape\rightmark}\hfil\thepage}% \let\@mkboth\@gobbletwo \let\sectionmark\@gobble \let\subsectionmark\@gobble } \if@titlepage \newcommand\maketitle{\begin{titlepage}% \let\footnotesize\small \let\footnoterule\relax \let \footnote \thanks \null\vfil \vskip 60\p@ \begin{center}% {\LARGE \@title \par}% \vskip 3em% {\large \lineskip .75em% \begin{tabular}[t]{c}% \@author \end{tabular}\par}% \vskip 1.5em% {\large \@date \par}% % Set date in \large size. \end{center}\par \@thanks \vfil\null \end{titlepage}% \setcounter{footnote}{0}% \global\let\thanks\relax \global\let\maketitle\relax \global\let\@thanks\@empty \global\let\@author\@empty \global\let\@date\@empty \global\let\@title\@empty \global\let\title\relax \global\let\author\relax \global\let\date\relax \global\let\and\relax } \else \newcommand\maketitle{\par \begingroup \renewcommand\thefootnote{\@fnsymbol\c@footnote}% \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% \long\def\@makefntext##1{\parindent 1em\noindent \hb@xt@1.8em{% \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% \if@twocolumn \ifnum \col@number=\@ne \@maketitle \else \twocolumn[\@maketitle]% \fi \else \newpage \global\@topnum\z@ % Prevents figures from going at top of page. \@maketitle \fi \thispagestyle{plain}\@thanks \endgroup \setcounter{footnote}{0}% \global\let\thanks\relax \global\let\maketitle\relax \global\let\@maketitle\relax \global\let\@thanks\@empty \global\let\@author\@empty \global\let\@date\@empty \global\let\@title\@empty \global\let\title\relax \global\let\author\relax \global\let\date\relax \global\let\and\relax } \def\@maketitle{% \newpage \null \vskip 2em% \begin{center}% \let \footnote \thanks {\LARGE \@title \par}% \vskip 1.5em% {\large \lineskip .5em% \begin{tabular}[t]{c}% \@author \end{tabular}\par}% \vskip 1em% {\large \@date}% \end{center}% \par \vskip 1.5em} \fi \setcounter{secnumdepth}{3} \newcounter {part} \newcounter {section} \newcounter {subsection}[section] \newcounter {subsubsection}[subsection] \newcounter {paragraph}[subsubsection] \newcounter {subparagraph}[paragraph] \renewcommand \thepart {\@Roman\c@part} \renewcommand \thesection {}%\@arabic\c@section} \renewcommand\thesubsection {\thesection.\@arabic\c@subsection} \renewcommand\thesubsubsection{\thesubsection .\@arabic\c@subsubsection} \renewcommand\theparagraph {\thesubsubsection.\@arabic\c@paragraph} \renewcommand\thesubparagraph {\theparagraph.\@arabic\c@subparagraph} \newcommand\part{% \if@noskipsec \leavevmode \fi \par \addvspace{4ex}% \@afterindentfalse \secdef\@part\@spart} \def\@part[#1]#2{% \ifnum \c@secnumdepth >\m@ne \refstepcounter{part}% \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% \else \addcontentsline{toc}{part}{#1}% \fi {\parindent \z@ \raggedright \interlinepenalty \@M \normalfont \ifnum \c@secnumdepth >\m@ne \Large\bfseries \partname~\thepart \par\nobreak \fi \huge \bfseries #2% \markboth{}{}\par}% \nobreak \vskip 3ex \@afterheading} \def\@spart#1{% {\parindent \z@ \raggedright \interlinepenalty \@M \normalfont \huge \bfseries #1\par}% \nobreak \vskip 3ex \@afterheading} \newcommand\section{\@startsection{section}{1}{ \z@} % {-3.5ex \@plus -1ex \@minus -.2ex}% {2.3ex \@plus.2ex}% {\normalfont\Large\bfseries}} \newcommand\subsection{\@startsection{subsection}{2}{\z@}% {-3.25ex\@plus -1ex \@minus -.2ex}% {1.5ex \@plus .2ex}% {\normalfont\large\bfseries}} \newcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% {-3.25ex\@plus -1ex \@minus -.2ex}% {1.5ex \@plus .2ex}% {\normalfont\normalsize\bfseries}} \newcommand\paragraph{\@startsection{paragraph}{4}{\z@}% {3.25ex \@plus1ex \@minus.2ex}% {-1em}% {\normalfont\normalsize\bfseries}} \newcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}% {3.25ex \@plus1ex \@minus .2ex}% {-1em}% {\normalfont\normalsize\bfseries}} \if@twocolumn \setlength\leftmargini {2em} \else \setlength\leftmargini {2.5em} \fi \leftmargin \leftmargini \setlength\leftmarginii {2.2em} \setlength\leftmarginiii {1.87em} \setlength\leftmarginiv {1.7em} \if@twocolumn \setlength\leftmarginv {.5em} \setlength\leftmarginvi {.5em} \else \setlength\leftmarginv {1em} \setlength\leftmarginvi {1em} \fi \setlength \labelsep {.5em} \setlength \labelwidth{\leftmargini} \addtolength\labelwidth{-\labelsep} \@beginparpenalty -\@lowpenalty \@endparpenalty -\@lowpenalty \@itempenalty -\@lowpenalty \renewcommand\theenumi{\@arabic\c@enumi} \renewcommand\theenumii{\@alph\c@enumii} \renewcommand\theenumiii{\@roman\c@enumiii} \renewcommand\theenumiv{\@Alph\c@enumiv} \newcommand\labelenumi{\theenumi.} \newcommand\labelenumii{(\theenumii)} \newcommand\labelenumiii{\theenumiii.} \newcommand\labelenumiv{\theenumiv.} \renewcommand\p@enumii{\theenumi} \renewcommand\p@enumiii{\theenumi(\theenumii)} \renewcommand\p@enumiv{\p@enumiii\theenumiii} \newcommand\labelitemi{\textbullet} \newcommand\labelitemii{\normalfont\bfseries \textendash} \newcommand\labelitemiii{\textasteriskcentered} \newcommand\labelitemiv{\textperiodcentered} \newenvironment{description} {\list{}{\labelwidth\z@ \itemindent-\leftmargin \let\makelabel\descriptionlabel}} {\endlist} \newcommand*\descriptionlabel[1]{\hspace\labelsep \normalfont\bfseries #1} \if@titlepage \newenvironment{abstract}{% \titlepage \null\vfil \@beginparpenalty\@lowpenalty \begin{center}% \bfseries \abstractname \@endparpenalty\@M \end{center}}% {\par\vfil\null\endtitlepage} \else \newenvironment{abstract}{% \if@twocolumn \section*{\abstractname}% \else \small \begin{center}% {\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}% \end{center}% \quotation \fi} {\if@twocolumn\else\endquotation\fi} \fi \newenvironment{verse} {\let\\\@centercr \list{}{\itemsep \z@ \itemindent -1.5em% \listparindent\itemindent \rightmargin \leftmargin \advance\leftmargin 1.5em}% \item\relax} {\endlist} \newenvironment{quotation} {\list{}{\listparindent 1.5em% \itemindent \listparindent \rightmargin \leftmargin \parsep \z@ \@plus\p@}% \item\relax} {\endlist} \newenvironment{quote} {\list{}{\rightmargin\leftmargin}% \item\relax} {\endlist} \if@compatibility \newenvironment{titlepage} {% \if@twocolumn \@restonecoltrue\onecolumn \else \@restonecolfalse\newpage \fi \thispagestyle{empty}% \setcounter{page}\z@ }% {\if@restonecol\twocolumn \else \newpage \fi } \else \newenvironment{titlepage} {% \if@twocolumn \@restonecoltrue\onecolumn \else \@restonecolfalse\newpage \fi \thispagestyle{empty}% \setcounter{page}\@ne }% {\if@restonecol\twocolumn \else \newpage \fi \if@twoside\else \setcounter{page}\@ne \fi } \fi \newcommand\appendix{\par \setcounter{section}{0}% \setcounter{subsection}{0}% \gdef\thesection{\@Alph\c@section}} \setlength\arraycolsep{5\p@} \setlength\tabcolsep{6\p@} \setlength\arrayrulewidth{.4\p@} \setlength\doublerulesep{2\p@} \setlength\tabbingsep{\labelsep} \skip\@mpfootins = \skip\footins \setlength\fboxsep{3\p@} \setlength\fboxrule{.4\p@} \renewcommand \theequation {\@arabic\c@equation} \newcounter{figure} \renewcommand \thefigure {\@arabic\c@figure} \def\fps@figure{tbp} \def\ftype@figure{1} \def\ext@figure{lof} \def\fnum@figure{\figurename~\thefigure} \newenvironment{figure} {\@float{figure}} {\end@float} \newenvironment{figure*} {\@dblfloat{figure}} {\end@dblfloat} \newcounter{table} \renewcommand\thetable{\@arabic\c@table} \def\fps@table{tbp} \def\ftype@table{2} \def\ext@table{lot} \def\fnum@table{\tablename~\thetable} \newenvironment{table} {\@float{table}} {\end@float} \newenvironment{table*} {\@dblfloat{table}} {\end@dblfloat} \newlength\abovecaptionskip \newlength\belowcaptionskip \setlength\abovecaptionskip{10\p@} \setlength\belowcaptionskip{0\p@} \long\def\@makecaption#1#2{% \vskip\abovecaptionskip \sbox\@tempboxa{#1: #2}% \ifdim \wd\@tempboxa >\hsize #1: #2\par \else \global \@minipagefalse \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% \fi \vskip\belowcaptionskip} \DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm} \DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf} \DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt} \DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf} \DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit} \DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl} \DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc} \DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal} \DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal} \newcommand\@pnumwidth{1.55em} \newcommand\@tocrmarg{2.55em} \newcommand\@dotsep{4.5} \setcounter{tocdepth}{3} \newcommand\tableofcontents{% \section*{\contentsname \@mkboth{% \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}% \@starttoc{toc}% } \newcommand*\l@part[2]{% \ifnum \c@tocdepth >-2\relax \addpenalty\@secpenalty \addvspace{2.25em \@plus\p@}% \begingroup \parindent \z@ \rightskip \@pnumwidth \parfillskip -\@pnumwidth {\leavevmode \large \bfseries #1\hfil \hb@xt@\@pnumwidth{\hss #2}}\par \nobreak \if@compatibility \global\@nobreaktrue \everypar{\global\@nobreakfalse\everypar{}}% \fi \endgroup \fi} \newcommand*\l@section[2]{% \ifnum \c@tocdepth >\z@ \addpenalty\@secpenalty \addvspace{1.0em \@plus\p@}% \setlength\@tempdima{1.5em}% \begingroup \parindent \z@ \rightskip \@pnumwidth \parfillskip -\@pnumwidth \leavevmode \bfseries \advance\leftskip\@tempdima \hskip -\leftskip #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par \endgroup \fi} \newcommand*\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}} \newcommand*\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}} \newcommand*\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}} \newcommand*\l@subparagraph{\@dottedtocline{5}{10em}{5em}} \newcommand\listoffigures{% \section*{\listfigurename \@mkboth{\MakeUppercase\listfigurename}% {\MakeUppercase\listfigurename}}% \@starttoc{lof}% } \newcommand*\l@figure{\@dottedtocline{1}{1.5em}{2.3em}} \newcommand\listoftables{% \section*{\listtablename \@mkboth{% \MakeUppercase\listtablename}{\MakeUppercase\listtablename}}% \@starttoc{lot}% } \let\l@table\l@figure \newdimen\bibindent \setlength\bibindent{1.5em} \newenvironment{thebibliography}[1] { \section{\refname} % \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}}% \list{}%\@biblabel{\@arabic\c@enumiv} {\settowidth\labelwidth{\@biblabel{#1}}% \leftmargin\labelwidth \advance\leftmargin\labelsep \@openbib@code \usecounter{enumiv}% \let\p@enumiv\@empty \renewcommand\theenumiv{}}%\@arabic\c@enumiv \sloppy \clubpenalty4000 \@clubpenalty \clubpenalty \widowpenalty4000% \sfcode`\.\@m} {\def\@noitemerr {\@latex@warning{Empty `thebibliography' environment}}% \endlist} \newcommand\newblock{\hskip .11em\@plus.33em\@minus.07em} \let\@openbib@code\@empty \newenvironment{theindex} {\if@twocolumn \@restonecolfalse \else \@restonecoltrue \fi \columnseprule \z@ \columnsep 35\p@ \twocolumn[\section*{\indexname}]% \@mkboth{\MakeUppercase\indexname}% {\MakeUppercase\indexname}% \thispagestyle{plain}\parindent\z@ \parskip\z@ \@plus .3\p@\relax \let\item\@idxitem} {\if@restonecol\onecolumn\else\clearpage\fi} \newcommand\@idxitem{\par\hangindent 40\p@} \newcommand\subitem{\@idxitem \hspace*{20\p@}} \newcommand\subsubitem{\@idxitem \hspace*{30\p@}} \newcommand\indexspace{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax} \renewcommand\footnoterule{% \kern-3\p@ \hrule\@width.4\columnwidth \kern2.6\p@} \newcommand\@makefntext[1]{% \parindent 1em% \noindent \hb@xt@1.8em{\hss\@makefnmark}#1} \newcommand\contentsname{Contents} \newcommand\listfigurename{List of Figures} \newcommand\listtablename{List of Tables} \newcommand\refname{} \newcommand\indexname{Index} \newcommand\figurename{Figure} \newcommand\tablename{Table} \newcommand\partname{Part} \newcommand\appendixname{Appendix} \newcommand\abstractname{Abstract} \def\today{\ifcase\month\or January\or February\or March\or April\or May\or June\or July\or August\or September\or October\or November\or December\fi \space\number\day, \number\year} \setlength\columnsep{10\p@} \setlength\columnseprule{0\p@} \pagestyle{plain} \pagenumbering{arabic} \if@twoside \else \raggedbottom \fi \if@twocolumn \twocolumn \sloppy \flushbottom \else \onecolumn \fi \endinput %% %% End of file `article.cls'. diff --git a/Documentation/NARK/Resources/texmf-local/tex/latex/cvBibMake.tex b/Documentation/NARK/Resources/texmf-local/tex/latex/cvBibMake.tex index dc63a1623..7d20b200c 100644 --- a/Documentation/NARK/Resources/texmf-local/tex/latex/cvBibMake.tex +++ b/Documentation/NARK/Resources/texmf-local/tex/latex/cvBibMake.tex @@ -1,5 +1,5 @@ -%\write18{if [ `kpsewhich economics.bib` != '' ]; then touch economics.bib ; fi} # This should be done only for final versions AFTER bibexport has occurred and \jobname.bib is populated +%\write18{if [ `kpsewhich economics.bib` != '' ]; then touch economics.bib ; fi} # This should be done only for final versions AFTER bibexport has occurred and \jobname.bib is populated %\write18{if [ ! -f \jobname.bib ]; then touch \jobname.bib ; fi} %\write18{if [ ! -f \jobname-Add.bib ]; then touch \jobname-Add.bib ; fi} diff --git a/Documentation/NARK/Resources/texmf-local/tex/latex/econtex.cls b/Documentation/NARK/Resources/texmf-local/tex/latex/econtex.cls index 78210b420..1a7291c71 100644 --- a/Documentation/NARK/Resources/texmf-local/tex/latex/econtex.cls +++ b/Documentation/NARK/Resources/texmf-local/tex/latex/econtex.cls @@ -1,11 +1,11 @@ %%% LaTeX class for economics %%% %%% author: Christopher Carroll -%%% license: LaTeX Project Public License +%%% license: LaTeX Project Public License %%% %%% Modified from style itaxpf by Arne Henningsen %%% version: 1.0 (09 July 2007) -%%% license: LaTeX Project Public License +%%% license: LaTeX Project Public License %%% %%% Further information is available at %%% http://www.uni-kiel.de/agrarpol/ahenningsen/latex-bibtex.html @@ -73,8 +73,8 @@ %% Added the above info to the definition of normalsize \def\normalsize{\@setfontsize \normalsize \@xiipt {14.5} - \abovedisplayskip 6\p@ \@plus 3\p@ \@minus 3\p@ - \belowdisplayskip \abovedisplayskip + \abovedisplayskip 6\p@ \@plus 3\p@ \@minus 3\p@ + \belowdisplayskip \abovedisplayskip \abovedisplayshortskip 6pt \belowdisplayshortskip 6pt \let \@listi \@listI} \normalsize @@ -110,7 +110,7 @@ ,moreverb ,hhline % Allow double hlines ,tipa % Define more characters, in particular the \textthorn character - ,xcolor % Superceded color, which is WAY out of date + ,xcolor % Superceded color, which is WAY out of date ,accents ,appendix } @@ -126,8 +126,8 @@ % ---------------Custom Definitions-------------- -\def\liminf{\mathop{\rm lim\, inf}\limits} -\DeclareMathOperator{\Ex}{\mathbb{E}} % Expectations operator +\def\liminf{\mathop{\rm lim\, inf}\limits} +\DeclareMathOperator{\Ex}{\mathbb{E}} % Expectations operator \def\var{\operatorname{var}} % variance \def\cov{\operatorname{cov}} % covariance \def\std{\operatorname{std}} % standard deviation @@ -150,7 +150,7 @@ % To prevent breaking math formula \relpenalty=4000 %from 0 to 10000, default is 500 -% To prevent breaking math formula after binary operator +% To prevent breaking math formula after binary operator \binoppenalty=10000 %from 0 to 10000, default is 700 % -------------------------------------------------------- @@ -220,7 +220,7 @@ \let\footnotesize\scriptsize \thispagestyle{empty} \vspace*{0mm} - \enlargethispage{0.4in} + \enlargethispage{0.4in} }{} \begin{center} \begin{LARGE} @@ -228,7 +228,7 @@ \textbf{\@title} \end{spacing} \end{LARGE}\medskip\medskip\medskip - {\normalsize \@date \par} + {\normalsize \@date \par} {\tiny{~}\par} \ifthenelse{\equal{\theIncludeTitlePage}{1}}{ \vspace*{3mm} @@ -249,7 +249,7 @@ \let\footnotesize\scriptsize \thispagestyle{empty} \vspace*{0mm} - \enlargethispage{0.4in} + \enlargethispage{0.4in} }{} \begin{center} \begin{LARGE} @@ -257,7 +257,7 @@ \textbf{\@title} \end{spacing} \end{LARGE}\medskip\medskip\medskip - {\normalsize #1 \par} + {\normalsize #1 \par} {\tiny{~}\par} \ifthenelse{\equal{\theIncludeTitlePage}{1}}{ \vspace*{3mm} @@ -286,7 +286,7 @@ \vspace*{4mm} \abstractSizeDefault \noindent \textbf{Abstract}\\ - \indent + \indent }{% \noindent {\tiny \phantom{.}} \\ % Trick to get proper spacing in html \ifdvi @@ -338,7 +338,7 @@ \pagestyle{plain} \thispagestyle{empty} -\newcommand{\titlepagefinish}{\newpage +\newcommand{\titlepagefinish}{\newpage \renewcommand\@makefnmark {\mbox{\textsuperscript{\tiny\@thefnmark}}} } @@ -359,11 +359,11 @@ %%% the original code. %% Sample use: -%% \author{Christopher D. Carroll\authNum \\ +%% \author{Christopher D. Carroll\authNum \\ %% \and -%% Jiri Slacalek\authNum \\ +%% Jiri Slacalek\authNum \\ %% \and -%% Martin Sommer\authNum \\ +%% Martin Sommer\authNum \\ %% \and %% Another Name\authNum %% \and diff --git a/Documentation/NARK/Resources/texmf-local/tex/latex/econtex.sty b/Documentation/NARK/Resources/texmf-local/tex/latex/econtex.sty index fcefb5736..1147b1e85 100644 --- a/Documentation/NARK/Resources/texmf-local/tex/latex/econtex.sty +++ b/Documentation/NARK/Resources/texmf-local/tex/latex/econtex.sty @@ -1,7 +1,7 @@ %---------------Custom Definitions-------------- -\def\liminf{\mathop{\rm lim\, inf}\limits} -\DeclareMathOperator{\Ex}{\mathbb{E}} % Expectations operator +\def\liminf{\mathop{\rm lim\, inf}\limits} +\DeclareMathOperator{\Ex}{\mathbb{E}} % Expectations operator \def\var{\operatorname{var}} % variance \def\cov{\operatorname{cov}} % covariance \def\std{\operatorname{std}} % standard deviation @@ -24,11 +24,7 @@ %To prevent breaking math formula \relpenalty=4000 %from 0 to 10000, default is 500 -%To prevent breaking math formula after binary operator +%To prevent breaking math formula after binary operator \binoppenalty=10000 %from 0 to 10000, default is 700 %-------------------------------------------------------- - - - - diff --git a/Documentation/NARK/Resources/texmf-local/tex/latex/econtexBibMake.tex b/Documentation/NARK/Resources/texmf-local/tex/latex/econtexBibMake.tex index ad524e192..cb5ae56f5 100644 --- a/Documentation/NARK/Resources/texmf-local/tex/latex/econtexBibMake.tex +++ b/Documentation/NARK/Resources/texmf-local/tex/latex/econtexBibMake.tex @@ -1,5 +1,5 @@ -%\write18{if [ `kpsewhich economics.bib` != '' ]; then touch economics.bib ; fi} # This should be done only for final versions AFTER bibexport has occurred and \jobname.bib is populated +%\write18{if [ `kpsewhich economics.bib` != '' ]; then touch economics.bib ; fi} # This should be done only for final versions AFTER bibexport has occurred and \jobname.bib is populated \write18{if [ ! -f \jobname.bib ]; then touch \jobname.bib ; fi} \write18{if [ ! -f \jobname-Add.bib ]; then touch \jobname-Add.bib ; fi} diff --git a/Documentation/NARK/Resources/texmf-local/tex/latex/econtexSetup.sty b/Documentation/NARK/Resources/texmf-local/tex/latex/econtexSetup.sty index f7a4f6183..544e1ab31 100644 --- a/Documentation/NARK/Resources/texmf-local/tex/latex/econtexSetup.sty +++ b/Documentation/NARK/Resources/texmf-local/tex/latex/econtexSetup.sty @@ -1,7 +1,7 @@ \RequirePackage{wasysym -,psibycus % Greek language package, including koppa +,psibycus % Greek language package, including koppa ,ushort -%,lscape % Pages in landscape mode go inside \begin{landscape}\end{landscape} % CONFLICTS WITH EPSTOPDF +%,lscape % Pages in landscape mode go inside \begin{landscape}\end{landscape} % CONFLICTS WITH EPSTOPDF } \newenvironment{CDCPrivate} % Environment for extra material not wanted in the public document @@ -22,7 +22,7 @@ \setboolean{BigAndWide}{true} \setboolean{BigAndWide}{false} -% Options to set if being run from the shell (so autocompiled) +% Options to set if being run from the shell (so autocompiled) \opt{FromShell}{ \setboolean{bigPrint}{false} \setboolean{wideMargins}{false} @@ -60,7 +60,7 @@ } % Keep the elements in the argument #1 together on the same page -\newcommand{\together}[1]{\noindent\parbox{\linewidth}{#1}} +\newcommand{\together}[1]{\noindent\parbox{\linewidth}{#1}} % html version of document must be constructed by running pdflatex in % dvi output mode; code below creates an ifdvi construct that detects @@ -74,7 +74,7 @@ % dvi compilation only occurs if making the html version \ifdvi - \setboolean{Web}{true} + \setboolean{Web}{true} \RequirePackage{tex4ht} \RequirePackage{graphicx} \RequirePackage[tex4ht]{hyperref} @@ -123,7 +123,7 @@ % \RequirePackage[pdftex]{graphicx} \RequirePackage{graphicx} % requiring [pdftex] seems to interfere with Pandemic build % \RequirePackage[plainpages=false]{hyperref} - \RequirePackage{hyperref} % plainpages seems to mess up BST + \RequirePackage{hyperref} % plainpages seems to mess up BST \hypersetup{ pdffitwindow = false, % Don't rescale to fit size of window pdfpagemode=UseThumbs, @@ -145,7 +145,7 @@ \definecolor{darkred}{rgb}{0.3,0,0} \hypersetup{colorlinks=true, % put a box around links linkbordercolor = {1 0 0}, % the box will be red - pdfborder = {1 0 0}, % + pdfborder = {1 0 0}, % % bookmarks=true, % PDF will contain an index on the RHS urlcolor=darkred, citecolor=darkblue, @@ -174,7 +174,7 @@ \newcommand{\Aggregation}{\href{https://www.econ2.jhu.edu/people/ccarroll/public/lecturenotes/MathFacts/Aggregation.pdf}{\texttt{Aggregation}}} -% If doing a web version, renewcommands link to the html versions of handouts +% If doing a web version, renewcommands link to the html versions of handouts \ifdvi \renewcommand{\handoutC}[1]{\href{https://www.econ2.jhu.edu/people/ccarroll/public/lecturenotes/consumption/#1}{\texttt{#1}}} \renewcommand{\handoutA}[1]{\href{https://www.econ2.jhu.edu/people/ccarroll/public/lecturenotes/AssetPricing/#1}{\texttt{#1}}} @@ -235,8 +235,3 @@ \end{quote} } {#2}} - - - - - diff --git a/Documentation/NARK/Resources/texmf-local/tex/latex/econtexShortcuts.sty b/Documentation/NARK/Resources/texmf-local/tex/latex/econtexShortcuts.sty index de56b7def..d2e7f24f3 100755 --- a/Documentation/NARK/Resources/texmf-local/tex/latex/econtexShortcuts.sty +++ b/Documentation/NARK/Resources/texmf-local/tex/latex/econtexShortcuts.sty @@ -75,7 +75,7 @@ \providecommand{\CLev}{\ensuremath{C}} \providecommand{\Cons}{\ensuremath{C}} \providecommand{\cons}{\ensuremath{c}} -\providecommand{\corr}{\varrho} +\providecommand{\corr}{\varrho} \providecommand{\cPDVFunc}{\ensuremath{\mathbb{C}}} \providecommand{\CPDV}{\ensuremath{\text{PDV($C$)}}} \providecommand{\cPPP}{\cons^{\prime\prime\prime}} @@ -105,7 +105,7 @@ \providecommand{\DeprFac}{\ensuremath{\daleth}} \providecommand{\Depr}{\ensuremath{\daleth}} \providecommand{\depr}{\ensuremath{\delta}} -\providecommand{\deprRte}{\ensuremath{\delta}} % New +\providecommand{\deprRte}{\ensuremath{\delta}} % New \providecommand{\DiscAltuAdj}{\ensuremath{\underline{\underline{\beth}}}} \providecommand{\DiscAlt}{\ensuremath{\beth}} \providecommand{\Discount}{\ensuremath{\beta}} @@ -116,7 +116,7 @@ \providecommand{\DivGro}{\ensuremath{\mathrm{G}}} \providecommand{\divGro}{\ensuremath{\mathsf{g}}} \providecommand{\Div}{\ensuremath{D}} -% \providecommand{\div}{\ensuremath{d}} reserved for divide +% \providecommand{\div}{\ensuremath{d}} reserved for divide \providecommand{\DLev}{\ensuremath{D}} \providecommand{\Dvdnd}{\ensuremath{\mathbf{D}}} \providecommand{\dvdnd}{\ensuremath{d}} @@ -128,7 +128,7 @@ \providecommand{\ek}{\ensuremath{\lambda}} \providecommand{\EmpGro}{\ensuremath{\Xi}} \providecommand{\empGro}{\ensuremath{\xi}} -\providecommand{\empState}{\xi} % employment state indicator variable +\providecommand{\empState}{\xi} % employment state indicator variable \providecommand{\EpremLog}{\varphi} % Not using regular \eprem because want to distinguish between \varphi = log E_{t}[\Phi_{t+1}] and \phi_{t} = E[\log \Phi_{t}] \providecommand{\EPrem}{\Phi} % equity premium \providecommand{\eprem}{\phi} % log equity premium @@ -194,7 +194,7 @@ \providecommand{\inv}{{i}} \providecommand{\IRat}{\ensuremath{I}} \providecommand{\iRat}{\ensuremath{i}} -\providecommand{\itc}{\ensuremath{\zeta}} +\providecommand{\itc}{\ensuremath{\zeta}} \providecommand{\jFunc}{\ensuremath{\mathrm{j}}} \providecommand{\JLev}{\ensuremath{J}} \providecommand{\kapRent}{\ensuremath{\varkappa}} @@ -213,12 +213,12 @@ \providecommand{\kRat}{\ensuremath{k}} \providecommand{\kTargE}{\ensuremath{\Target{k}^{e}}} \providecommand{\kTarg}{\ensuremath{\Target{k}}} -\providecommand{\labor}{\ensuremath{\ell}} % +\providecommand{\labor}{\ensuremath{\ell}} % \providecommand{\Labor}{\ensuremath{L}} \providecommand{\labShare}{\ensuremath{\nu}} -\providecommand{\Leisure}{Z} % -\providecommand{\leisure}{z} % -\providecommand{\leiShare}{\ensuremath{\zeta}} % +\providecommand{\Leisure}{Z} % +\providecommand{\leisure}{z} % +\providecommand{\leiShare}{\ensuremath{\zeta}} % \providecommand{\LGro}{\ensuremath{\Lambda}} \providecommand{\lGro}{\ensuremath{\lambda}} \providecommand{\LLevBF}{\ensuremath{\mathbf{L}}} @@ -265,7 +265,7 @@ %\providecommand{\m}{\ensuremath{m}} %\providecommand{\M}{\ensuremath{M}} %\providecommand{\next}{2} % via search-and-replace -\providecommand{\Next}{t+1} % +\providecommand{\Next}{t+1} % \providecommand{\nFunc}{\ensuremath{\mathrm{n}}} \providecommand{\NLev}{\ensuremath{N}} \providecommand{\nLev}{\ensuremath{n}} @@ -296,9 +296,9 @@ \providecommand{\pDeadRate}{\ensuremath{\grave{\cancel{\mathsf{d}}}}} \providecommand{\pDead}{\ensuremath{\mathfrak{D}}} \providecommand{\pDieRate}{\ensuremath{\grave{\mathsf{d}}}} -\providecommand{\pDies}{\ensuremath{\mathsf{d}}} % Continuous time death rate +\providecommand{\pDies}{\ensuremath{\mathsf{d}}} % Continuous time death rate \providecommand{\PDies}{\ensuremath{\mathsf{D}}} % Discrete-time one-period death rate -\providecommand{\diePrb}{\ensuremath{\mathsf{d}}} % Continuous time death rate +\providecommand{\diePrb}{\ensuremath{\mathsf{d}}} % Continuous time death rate \providecommand{\DiePrb}{\ensuremath{\mathsf{D}}} % Discrete-time one-period death rate \providecommand{\PDV}{\ensuremath{\mathbb{P}}} % PDV \providecommand{\PGroAdj}{\ensuremath{\underline{\PGro}}} @@ -333,7 +333,7 @@ \providecommand{\PopLev}{\ensuremath{\pmb{N}}} \providecommand{\PopU}{\mathcal{U}} \providecommand{\Pop}{\ensuremath{L}} -\providecommand{\PostITC}{\ensuremath{\cancel{\zeta}}} +\providecommand{\PostITC}{\ensuremath{\cancel{\zeta}}} \providecommand{\power}{\ensuremath{\eta}} \providecommand{\pPDVFunc}{\ensuremath{\mathbb{P}}} \providecommand{\PPDV}{\ensuremath{\text{PDV($P$)}}} @@ -345,17 +345,17 @@ \providecommand{\prudEx}{\ensuremath{\omega}} \providecommand{\prud}{\ensuremath{\eta}} \providecommand{\pSav}{\ensuremath{\phi}} -\providecommand{\pShkMin}{\underline{\psi}} % -\providecommand{\PShk}{\Psi} % +\providecommand{\pShkMin}{\underline{\psi}} % +\providecommand{\PShk}{\Psi} % \providecommand{\PermShkAgg}{\Psi} % New \providecommand{\PermShk}{\Psi} % New \providecommand{\permShk}{\psi} % New -\providecommand{\pShk}{\psi} % +\providecommand{\pShk}{\psi} % \providecommand{\permShkInd}{\psi} % New -\providecommand{\pshk}{\psi} % +\providecommand{\pshk}{\psi} % \providecommand{\PtyGro}{\ensuremath{\Phi}} \providecommand{\ptyGro}{\ensuremath{\phi}} -\providecommand{\PtyLab}{\ensuremath{\mathrm{Z}}} % Labor productivity +\providecommand{\PtyLab}{\ensuremath{\mathrm{Z}}} % Labor productivity \providecommand{\ptyLab}{\ensuremath{z}} % usually, log of \PtyLab \providecommand{\PtyLev}{\ensuremath{A}} % Multiplies overall production function \providecommand{\ptyLev}{\ensuremath{a}} % Usually, log of \PtyLev @@ -368,7 +368,7 @@ \providecommand{\Rev}{\ensuremath{\Pi}} \providecommand{\rev}{\ensuremath{\pi}} \providecommand{\rfree}{\ensuremath{\mathsf{r}}} % The net return on the safe asset at an annual rate -\providecommand{\Rfree}{\ensuremath{\mathsf{R}}} % The return factor on the safe asset - unfortunately mathfrak fonts don't come through for tth +\providecommand{\Rfree}{\ensuremath{\mathsf{R}}} % The return factor on the safe asset - unfortunately mathfrak fonts don't come through for tth \providecommand{\RFunc}{\ensuremath{\mathrm{R}}} \providecommand{\RGross}{\ensuremath{\breve{\mathsf{R}}}} \providecommand{\rGross}{\ensuremath{\breve{\mathsf{r}}}} @@ -378,14 +378,14 @@ \providecommand{\riskyAlt}{\ensuremath{\pmb{\mathfrak{r}}}} % The net return on the risky asset annual rate \providecommand{\riskyshare}{\ensuremath{\varsigma}} \providecommand{\Risky}{\ensuremath{\mathbf{R}}} % The return on the risky asset -\providecommand{\risky}{\ensuremath{\mathbf{r}}} % The net return on the risky asset annual rate +\providecommand{\risky}{\ensuremath{\mathbf{r}}} % The net return on the risky asset annual rate \providecommand{\RLev}{\ensuremath{R}} % Rate of return (but better to use \Rfree or \Risky or something else more specific \providecommand{\RnormWGro}{\ensuremath{\mathcal{R}_{\WGro}}} % Normalized version of riskless return factor \providecommand{\rnormwGro}{\ensuremath{\mathit{r}_{\wGro}}} % Normalized version of riskless rate of return \providecommand{\Rnorm}{\ensuremath{\mathcal{R}}} % Normalized version of riskless return factor \providecommand{\rnorm}{\ensuremath{\mathit{r}}} % Normalized version of riskless rate of return \providecommand{\Rport}{\ensuremath{\mathbbmss{R}}} % Portfolio -weighted return -\providecommand{\rport}{\ensuremath{\mathbbmss{r}}} +\providecommand{\rport}{\ensuremath{\mathbbmss{r}}} \providecommand{\Rprod}{\ensuremath{\mathscr{R}}} \providecommand{\rprod}{\ensuremath{\mathscr{r}}} \providecommand{\rProd}{\ensuremath{\mathsf{r}}} @@ -396,8 +396,8 @@ \providecommand{\rboro}{\ensuremath{\bar{\rfree}}} %\providecommand{\R}{\Rfree} \providecommand{\saveRate}{\grave{s}} % saving (income minus consumption) over income -\providecommand{\Save}{S} % Saving (income minus consumption) -\providecommand{\save}{s} % saving (income minus consumption) +\providecommand{\Save}{S} % Saving (income minus consumption) +\providecommand{\save}{s} % saving (income minus consumption) \providecommand{\SDF}{\MLev} % Stochastic Discount Factor \providecommand{\sdr}{\mRat} % Stochastic Discount rate \providecommand{\Seniority}{\ensuremath{\mathsf{X}}} @@ -411,9 +411,9 @@ \providecommand{\sFunc}{\ensuremath{\mathrm{s}}} \providecommand{\shk}{\phi} \providecommand{\Shk}{\Phi} -\providecommand{\ShkLogZeroLogStd}{\sigma_{\cancel{\ShkMeanOneLog}}} % Std of that shock -\providecommand{\ShkLogZeroLogVar}{\sigma_{\cancel{\ShkMeanOneLog}}^{2}} % Variance of that shock -\providecommand{\ShkLogZeroLog}{\cancel{\ShkMeanOneLog}} % Log of that shock +\providecommand{\ShkLogZeroLogStd}{\sigma_{\cancel{\ShkMeanOneLog}}} % Std of that shock +\providecommand{\ShkLogZeroLogVar}{\sigma_{\cancel{\ShkMeanOneLog}}^{2}} % Variance of that shock +\providecommand{\ShkLogZeroLog}{\cancel{\ShkMeanOneLog}} % Log of that shock \providecommand{\ShkLogZero}{\cancel{\ShkMeanOne}} % A shock whose expectation in logs is zero; cancellation of the nonzero mean for the mean one shock \providecommand{\ShkMeanOneLogStd}{\sigma_{\ShkMeanOneLog}} % Std of that shock \providecommand{\ShkMeanOneLogVar}{\sigma^{2}_{\ShkMeanOneLog}} % Log of that shock @@ -477,16 +477,16 @@ \providecommand{\TLev}{\ensuremath{T}} \providecommand{\TMap}{\mathscr{T}} \providecommand{\tNow}{\ensuremath{t}} -\providecommand{\tShkAll}{\xi} % -\providecommand{\tShkEmpMin}{\underline{\theta}} % -\providecommand{\TShkEmp}{\Theta} % -\providecommand{\tShkEmp}{\theta} % -\providecommand{\tShkEmp}{\theta} % +\providecommand{\tShkAll}{\xi} % +\providecommand{\tShkEmpMin}{\underline{\theta}} % +\providecommand{\TShkEmp}{\Theta} % +\providecommand{\tShkEmp}{\theta} % +\providecommand{\tShkEmp}{\theta} % \providecommand{\tranShkInd}{\theta} % New \providecommand{\TranShkAgg}{\Theta} % New -\providecommand{\TShk}{\Xi} % -\providecommand{\tShk}{\xi} % -\providecommand{\tshk}{\xi} % +\providecommand{\TShk}{\Xi} % +\providecommand{\tShk}{\xi} % +\providecommand{\tshk}{\xi} % \providecommand{\tSS}{\ensuremath{t}} \providecommand{\tThen}{\ensuremath{\tau}} \providecommand{\uFunc}{{\ensuremath{\mathrm{u}}}} @@ -545,8 +545,8 @@ \providecommand{\wBeg}{\kLev} % wealth as of the beginning of the period (before R is received, not including Y) \providecommand{\Wealth}{\ensuremath{O}} \providecommand{\wealth}{\ensuremath{o}} -\providecommand{\WEndRat}{\ARat} % -\providecommand{\wEndRat}{\aRat} % +\providecommand{\WEndRat}{\ARat} % +\providecommand{\wEndRat}{\aRat} % \providecommand{\WEnd}{\ALev} % Wealth as of the end of the period (after C has been chosen) \providecommand{\wEnd}{\aLev} % wealth as of the end of the period (after C has been taken) \providecommand{\Wend}{\ARat} % Wealth as of the end of the period (after C has been chosen) @@ -556,9 +556,9 @@ \providecommand{\WGro}{\ensuremath{\mathrm{G}}} \providecommand{\wGro}{\ensuremath{\mathsf{g}}} \providecommand{\whumMin}{\underline{\hRat}} % human wealth -- individual -\providecommand{\WHum}{\HLev} % Human wealth -- aggregate +\providecommand{\WHum}{\HLev} % Human wealth -- aggregate \providecommand{\wHum}{\hLev} % human wealth -- individual -\providecommand{\Whum}{\HRat} % Human wealth -- aggregate +\providecommand{\Whum}{\HRat} % Human wealth -- aggregate \providecommand{\whum}{\hRat} % human wealth -- individual \providecommand{\WLev}{\ensuremath{W}} \providecommand{\wLev}{\pmb{w}} @@ -570,15 +570,15 @@ \providecommand{\WMkt}{\MLev} % Wealth as of the middle of the period (after R is received, including Y) \providecommand{\wMkt}{\mLev} % wealth as of the middle of the period (after R is received, including Y) \providecommand{\wmkt}{\mLev} % wealth as of the middle of the period (after R is received, including Y) -\providecommand{\wNet}{\ensuremath{x}} % +\providecommand{\wNet}{\ensuremath{x}} % \providecommand{\WNet}{\ensuremath{X}} % Total wealth \providecommand{\WPre}{{K}} \providecommand{\wPre}{{k}} -\providecommand{\wRat}{\ensuremath{o}} % +\providecommand{\wRat}{\ensuremath{o}} % \providecommand{\WRat}{\ensuremath{O}} % Ratio to permanent income -\providecommand{\wTot}{\ensuremath{\mathbf{o}}} % +\providecommand{\wTot}{\ensuremath{\mathbf{o}}} % \providecommand{\WTot}{\ensuremath{\mathbf{O}}} % Total wealth -\providecommand{\wtot}{\ensuremath{o}} % +\providecommand{\wtot}{\ensuremath{o}} % \providecommand{\Wtot}{\ensuremath{O}} % Total wealth \providecommand{\xFer}{\chi} \providecommand{\XFer}{X} @@ -660,4 +660,3 @@ \newcommand{\GPF}{{\mbox{GPF}}} \newcommand{\GPFAgg}{{\mbox{GPF-Agg}}} \newcommand{\FHWF}{\mbox{FHWF}} - diff --git a/Documentation/NARK/Resources/texmf-local/tex/latex/handout.cls b/Documentation/NARK/Resources/texmf-local/tex/latex/handout.cls index 886d44d1e..a972f7865 100644 --- a/Documentation/NARK/Resources/texmf-local/tex/latex/handout.cls +++ b/Documentation/NARK/Resources/texmf-local/tex/latex/handout.cls @@ -1,11 +1,11 @@ %%% LaTeX class for economics %%% %%% author: Christopher Carroll -%%% license: LaTeX Project Public License +%%% license: LaTeX Project Public License %%% %%% Modified from style itaxpf by Arne Henningsen %%% version: 1.0 (09 July 2007) -%%% license: LaTeX Project Public License +%%% license: LaTeX Project Public License %%% %%% Further information is available at %%% http://www.uni-kiel.de/agrarpol/ahenningsen/latex-bibtex.html @@ -74,8 +74,8 @@ %% Added the above info to the definition of normalsize \def\normalsize{\@setfontsize \normalsize \@xiipt {14.5} - \abovedisplayskip 6\p@ \@plus 3\p@ \@minus 3\p@ - \belowdisplayskip \abovedisplayskip + \abovedisplayskip 6\p@ \@plus 3\p@ \@minus 3\p@ + \belowdisplayskip \abovedisplayskip \abovedisplayshortskip 6pt \belowdisplayshortskip 6pt \let \@listi \@listI} \normalsize @@ -111,7 +111,7 @@ ,moreverb ,hhline % Allow double hlines ,tipa % Define more characters, in particular the \textthorn character - ,xcolor % Superceded color, which is WAY out of date + ,xcolor % Superceded color, which is WAY out of date ,accents ,appendix } @@ -127,8 +127,8 @@ % ---------------Custom Definitions-------------- -\def\liminf{\mathop{\rm lim\, inf}\limits} -\DeclareMathOperator{\Ex}{\mathbb{E}} % Expectations operator +\def\liminf{\mathop{\rm lim\, inf}\limits} +\DeclareMathOperator{\Ex}{\mathbb{E}} % Expectations operator \def\var{\operatorname{var}} % variance \def\cov{\operatorname{cov}} % covariance \def\std{\operatorname{std}} % standard deviation @@ -151,7 +151,7 @@ % To prevent breaking math formula \relpenalty=4000 %from 0 to 10000, default is 500 -% To prevent breaking math formula after binary operator +% To prevent breaking math formula after binary operator \binoppenalty=10000 %from 0 to 10000, default is 700 % -------------------------------------------------------- @@ -221,7 +221,7 @@ \let\footnotesize\scriptsize \thispagestyle{empty} \vspace*{0mm} - \enlargethispage{0.4in} + \enlargethispage{0.4in} }{} \begin{center} \begin{LARGE} @@ -229,7 +229,7 @@ \textbf{\@title} \end{spacing} \end{LARGE}\medskip\medskip\medskip - {\normalsize \@date \par} + {\normalsize \@date \par} {\tiny{~}\par} \ifthenelse{\equal{\theIncludeTitlePage}{1}}{ \vspace*{3mm} @@ -250,7 +250,7 @@ \let\footnotesize\scriptsize \thispagestyle{empty} \vspace*{0mm} - \enlargethispage{0.4in} + \enlargethispage{0.4in} }{} \begin{center} \begin{LARGE} @@ -258,7 +258,7 @@ \textbf{\@title} \end{spacing} \end{LARGE}\medskip\medskip\medskip - {\normalsize #1 \par} + {\normalsize #1 \par} {\tiny{~}\par} \ifthenelse{\equal{\theIncludeTitlePage}{1}}{ \vspace*{3mm} @@ -287,7 +287,7 @@ \vspace*{4mm} \abstractSizeDefault \noindent \textbf{Abstract}\\ - \indent + \indent }{% \noindent {\tiny \phantom{.}} \\ % Trick to get proper spacing in html \ifdvi @@ -339,7 +339,7 @@ \pagestyle{plain} \thispagestyle{empty} -\newcommand{\titlepagefinish}{\newpage +\newcommand{\titlepagefinish}{\newpage \renewcommand\@makefnmark {\mbox{\textsuperscript{\tiny\@thefnmark}}} } @@ -360,11 +360,11 @@ %%% the original code. %% Sample use: -%% \author{Christopher D. Carroll\authNum \\ +%% \author{Christopher D. Carroll\authNum \\ %% \and -%% Jiri Slacalek\authNum \\ +%% Jiri Slacalek\authNum \\ %% \and -%% Martin Sommer\authNum \\ +%% Martin Sommer\authNum \\ %% \and %% Another Name\authNum %% \and diff --git a/Documentation/NARK/Resources/texmf-local/tex/latex/handout.sty b/Documentation/NARK/Resources/texmf-local/tex/latex/handout.sty index fcefb5736..1147b1e85 100755 --- a/Documentation/NARK/Resources/texmf-local/tex/latex/handout.sty +++ b/Documentation/NARK/Resources/texmf-local/tex/latex/handout.sty @@ -1,7 +1,7 @@ %---------------Custom Definitions-------------- -\def\liminf{\mathop{\rm lim\, inf}\limits} -\DeclareMathOperator{\Ex}{\mathbb{E}} % Expectations operator +\def\liminf{\mathop{\rm lim\, inf}\limits} +\DeclareMathOperator{\Ex}{\mathbb{E}} % Expectations operator \def\var{\operatorname{var}} % variance \def\cov{\operatorname{cov}} % covariance \def\std{\operatorname{std}} % standard deviation @@ -24,11 +24,7 @@ %To prevent breaking math formula \relpenalty=4000 %from 0 to 10000, default is 500 -%To prevent breaking math formula after binary operator +%To prevent breaking math formula after binary operator \binoppenalty=10000 %from 0 to 10000, default is 700 %-------------------------------------------------------- - - - - diff --git a/Documentation/NARK/Resources/texmf-local/tex/latex/handoutSetup.sty b/Documentation/NARK/Resources/texmf-local/tex/latex/handoutSetup.sty index f1328eb97..4c450334f 100644 --- a/Documentation/NARK/Resources/texmf-local/tex/latex/handoutSetup.sty +++ b/Documentation/NARK/Resources/texmf-local/tex/latex/handoutSetup.sty @@ -1,8 +1,8 @@ \usepackage{handoutShortcuts} \RequirePackage{wasysym -,psibycus % Greek language package, including koppa +,psibycus % Greek language package, including koppa ,ushort -%,lscape % Pages in landscape mode go inside \begin{landscape}\end{landscape} % CONFLICTS WITH EPSTOPDF +%,lscape % Pages in landscape mode go inside \begin{landscape}\end{landscape} % CONFLICTS WITH EPSTOPDF } \newenvironment{CDCPrivate} % Environment for extra material not wanted in the public document @@ -23,7 +23,7 @@ \setboolean{BigAndWide}{true} \setboolean{BigAndWide}{false} -% Options to set if being run from the shell (so autocompiled) +% Options to set if being run from the shell (so autocompiled) \opt{FromShell}{ \setboolean{bigPrint}{false} \setboolean{wideMargins}{false} @@ -61,7 +61,7 @@ } % Keep the elements in the argument #1 together on the same page -\newcommand{\together}[1]{\noindent\parbox{\linewidth}{#1}} +\newcommand{\together}[1]{\noindent\parbox{\linewidth}{#1}} % html version of document must be constructed by running pdflatex in % dvi output mode; code below creates an ifdvi construct that detects @@ -75,7 +75,7 @@ % dvi compilation only occurs if making the html version \ifdvi - \setboolean{Web}{true} + \setboolean{Web}{true} \RequirePackage{tex4ht} \RequirePackage{graphicx} \RequirePackage[tex4ht]{hyperref} @@ -144,7 +144,7 @@ \definecolor{darkred}{rgb}{0.6,0,0} \hypersetup{colorlinks=true, % put a box around links linkbordercolor = {1 0 0}, % the box will be red - pdfborder = {1 0 0}, % + pdfborder = {1 0 0}, % % bookmarks=true, % PDF will contain an index on the RHS urlcolor=darkred, citecolor=darkblue, @@ -179,7 +179,7 @@ \newcommand{\Aggregation}{\href{https://www.econ2.jhu.edu/people/ccarroll/public/lecturenotes/MathFacts/Aggregation.pdf}{\texttt{Aggregation}}} -% If doing a web version, renewcommands link to the html versions of handouts +% If doing a web version, renewcommands link to the html versions of handouts \ifdvi \renewcommand{\handoutC}[1]{\href{https://www.econ2.jhu.edu/people/ccarroll/public/lecturenotes/consumption/#1}{\texttt{#1}}} \renewcommand{\handoutA}[1]{\href{https://www.econ2.jhu.edu/people/ccarroll/public/lecturenotes/AssetPricing/#1}{\texttt{#1}}} diff --git a/Documentation/NARK/Resources/texmf-local/tex/latex/handoutShortcuts.sty b/Documentation/NARK/Resources/texmf-local/tex/latex/handoutShortcuts.sty index 1afa58937..214238be7 100644 --- a/Documentation/NARK/Resources/texmf-local/tex/latex/handoutShortcuts.sty +++ b/Documentation/NARK/Resources/texmf-local/tex/latex/handoutShortcuts.sty @@ -76,7 +76,7 @@ \providecommand{\CLev}{\ensuremath{C}} \providecommand{\Cons}{\ensuremath{C}} \providecommand{\cons}{\ensuremath{c}} -\providecommand{\corr}{\varrho} +\providecommand{\corr}{\varrho} \providecommand{\cPDVFunc}{\ensuremath{\mathbb{C}}} \providecommand{\CPDV}{\ensuremath{\text{PDV($C$)}}} \providecommand{\cPPP}{\cons^{\prime\prime\prime}} @@ -106,7 +106,7 @@ \providecommand{\DeprFac}{\ensuremath{\daleth}} \providecommand{\Depr}{\ensuremath{\daleth}} \providecommand{\depr}{\ensuremath{\delta}} -\providecommand{\deprRte}{\ensuremath{\delta}} % New +\providecommand{\deprRte}{\ensuremath{\delta}} % New \providecommand{\DiscAltuAdj}{\ensuremath{\underline{\underline{\beth}}}} \providecommand{\DiscAlt}{\ensuremath{\beth}} \providecommand{\Discount}{\ensuremath{\beta}} @@ -117,7 +117,7 @@ \providecommand{\DivGro}{\ensuremath{\mathrm{G}}} \providecommand{\divGro}{\ensuremath{\mathsf{g}}} \providecommand{\Div}{\ensuremath{D}} -% \providecommand{\div}{\ensuremath{d}} reserved for divide +% \providecommand{\div}{\ensuremath{d}} reserved for divide \providecommand{\DLev}{\ensuremath{D}} \providecommand{\Dvdnd}{\ensuremath{\mathbf{D}}} \providecommand{\dvdnd}{\ensuremath{d}} @@ -129,7 +129,7 @@ \providecommand{\ek}{\ensuremath{\lambda}} \providecommand{\EmpGro}{\ensuremath{\Xi}} \providecommand{\empGro}{\ensuremath{\xi}} -\providecommand{\empState}{\xi} % employment state indicator variable +\providecommand{\empState}{\xi} % employment state indicator variable \providecommand{\EpremLog}{\varphi} % Not using regular \eprem because want to distinguish between \varphi = log E_{t}[\Phi_{t+1}] and \phi_{t} = E[\log \Phi_{t}] \providecommand{\EPrem}{\Phi} % equity premium \providecommand{\eprem}{\phi} % log equity premium @@ -195,7 +195,7 @@ \providecommand{\inv}{{i}} \providecommand{\IRat}{\ensuremath{I}} \providecommand{\iRat}{\ensuremath{i}} -\providecommand{\itc}{\ensuremath{\zeta}} +\providecommand{\itc}{\ensuremath{\zeta}} \providecommand{\jFunc}{\ensuremath{\mathrm{j}}} \providecommand{\JLev}{\ensuremath{J}} \providecommand{\kapRent}{\ensuremath{\varkappa}} @@ -214,12 +214,12 @@ \providecommand{\kRat}{\ensuremath{k}} \providecommand{\kTargE}{\ensuremath{\Target{k}^{e}}} \providecommand{\kTarg}{\ensuremath{\Target{k}}} -\providecommand{\labor}{\ensuremath{\ell}} % +\providecommand{\labor}{\ensuremath{\ell}} % \providecommand{\Labor}{\ensuremath{L}} \providecommand{\labShare}{\ensuremath{\nu}} -\providecommand{\Leisure}{Z} % -\providecommand{\leisure}{z} % -\providecommand{\leiShare}{\ensuremath{\zeta}} % +\providecommand{\Leisure}{Z} % +\providecommand{\leisure}{z} % +\providecommand{\leiShare}{\ensuremath{\zeta}} % \providecommand{\LGro}{\ensuremath{\Lambda}} \providecommand{\lGro}{\ensuremath{\lambda}} \providecommand{\LLevBF}{\ensuremath{\mathbf{L}}} @@ -266,7 +266,7 @@ %\providecommand{\m}{\ensuremath{m}} %\providecommand{\M}{\ensuremath{M}} %\providecommand{\next}{2} % via search-and-replace -\providecommand{\Next}{t+1} % +\providecommand{\Next}{t+1} % \providecommand{\nFunc}{\ensuremath{\mathrm{n}}} \providecommand{\NLev}{\ensuremath{N}} \providecommand{\nLev}{\ensuremath{n}} @@ -297,9 +297,9 @@ \providecommand{\pDeadRate}{\ensuremath{\grave{\cancel{\mathsf{d}}}}} \providecommand{\pDead}{\ensuremath{\mathfrak{D}}} \providecommand{\pDieRate}{\ensuremath{\grave{\mathsf{d}}}} -\providecommand{\pDies}{\ensuremath{\mathsf{d}}} % Continuous time death rate +\providecommand{\pDies}{\ensuremath{\mathsf{d}}} % Continuous time death rate \providecommand{\PDies}{\ensuremath{\mathsf{D}}} % Discrete-time one-period death rate -\providecommand{\diePrb}{\ensuremath{\mathsf{d}}} % Continuous time death rate +\providecommand{\diePrb}{\ensuremath{\mathsf{d}}} % Continuous time death rate \providecommand{\DiePrb}{\ensuremath{\mathsf{D}}} % Discrete-time one-period death rate \providecommand{\PDV}{\ensuremath{\mathbb{P}}} % PDV \providecommand{\PGroAdj}{\ensuremath{\underline{\PGro}}} @@ -334,7 +334,7 @@ \providecommand{\PopLev}{\ensuremath{\pmb{N}}} \providecommand{\PopU}{\mathcal{U}} \providecommand{\Pop}{\ensuremath{L}} -\providecommand{\PostITC}{\ensuremath{\cancel{\zeta}}} +\providecommand{\PostITC}{\ensuremath{\cancel{\zeta}}} \providecommand{\power}{\ensuremath{\eta}} \providecommand{\pPDVFunc}{\ensuremath{\mathbb{P}}} \providecommand{\PPDV}{\ensuremath{\text{PDV($P$)}}} @@ -346,17 +346,17 @@ \providecommand{\prudEx}{\ensuremath{\omega}} \providecommand{\prud}{\ensuremath{\eta}} \providecommand{\pSav}{\ensuremath{\phi}} -\providecommand{\pShkMin}{\underline{\psi}} % -\providecommand{\PShk}{\Psi} % +\providecommand{\pShkMin}{\underline{\psi}} % +\providecommand{\PShk}{\Psi} % \providecommand{\PermShkAgg}{\Psi} % New \providecommand{\PermShk}{\Psi} % New \providecommand{\permShk}{\psi} % New -\providecommand{\pShk}{\psi} % +\providecommand{\pShk}{\psi} % \providecommand{\permShkInd}{\psi} % New -\providecommand{\pshk}{\psi} % +\providecommand{\pshk}{\psi} % \providecommand{\PtyGro}{\ensuremath{\Phi}} \providecommand{\ptyGro}{\ensuremath{\phi}} -\providecommand{\PtyLab}{\ensuremath{\mathrm{Z}}} % Labor productivity +\providecommand{\PtyLab}{\ensuremath{\mathrm{Z}}} % Labor productivity \providecommand{\ptyLab}{\ensuremath{z}} % usually, log of \PtyLab \providecommand{\PtyLev}{\ensuremath{A}} % Multiplies overall production function \providecommand{\ptyLev}{\ensuremath{a}} % Usually, log of \PtyLev @@ -369,7 +369,7 @@ \providecommand{\Rev}{\ensuremath{\Pi}} \providecommand{\rev}{\ensuremath{\pi}} \providecommand{\rfree}{\ensuremath{\mathsf{r}}} % The net return on the safe asset at an annual rate -\providecommand{\Rfree}{\ensuremath{\mathsf{R}}} % The return factor on the safe asset - unfortunately mathfrak fonts don't come through for tth +\providecommand{\Rfree}{\ensuremath{\mathsf{R}}} % The return factor on the safe asset - unfortunately mathfrak fonts don't come through for tth \providecommand{\RFunc}{\ensuremath{\mathrm{R}}} \providecommand{\RGross}{\ensuremath{\breve{\mathsf{R}}}} \providecommand{\rGross}{\ensuremath{\breve{\mathsf{r}}}} @@ -379,14 +379,14 @@ \providecommand{\riskyAlt}{\ensuremath{\pmb{\mathfrak{r}}}} % The net return on the risky asset annual rate \providecommand{\riskyshare}{\ensuremath{\varsigma}} \providecommand{\Risky}{\ensuremath{\mathbf{R}}} % The return on the risky asset -\providecommand{\risky}{\ensuremath{\mathbf{r}}} % The net return on the risky asset annual rate +\providecommand{\risky}{\ensuremath{\mathbf{r}}} % The net return on the risky asset annual rate \providecommand{\RLev}{\ensuremath{R}} % Rate of return (but better to use \Rfree or \Risky or something else more specific \providecommand{\RnormWGro}{\ensuremath{\mathcal{R}_{\WGro}}} % Normalized version of riskless return factor \providecommand{\rnormwGro}{\ensuremath{\mathit{r}_{\wGro}}} % Normalized version of riskless rate of return \providecommand{\Rnorm}{\ensuremath{\mathcal{R}}} % Normalized version of riskless return factor \providecommand{\rnorm}{\ensuremath{\mathit{r}}} % Normalized version of riskless rate of return \providecommand{\Rport}{\ensuremath{\mathbbmss{R}}} % Portfolio -weighted return -\providecommand{\rport}{\ensuremath{\mathbbmss{r}}} +\providecommand{\rport}{\ensuremath{\mathbbmss{r}}} \providecommand{\Rprod}{\ensuremath{\mathscr{R}}} \providecommand{\rprod}{\ensuremath{\mathscr{r}}} \providecommand{\rProd}{\ensuremath{\mathsf{r}}} @@ -397,8 +397,8 @@ \providecommand{\rboro}{\ensuremath{\bar{\rfree}}} %\providecommand{\R}{\Rfree} \providecommand{\saveRate}{\grave{s}} % saving (income minus consumption) over income -\providecommand{\Save}{S} % Saving (income minus consumption) -\providecommand{\save}{s} % saving (income minus consumption) +\providecommand{\Save}{S} % Saving (income minus consumption) +\providecommand{\save}{s} % saving (income minus consumption) \providecommand{\SDF}{\MLev} % Stochastic Discount Factor \providecommand{\sdr}{\mRat} % Stochastic Discount rate \providecommand{\Seniority}{\ensuremath{\mathsf{X}}} @@ -412,9 +412,9 @@ \providecommand{\sFunc}{\ensuremath{\mathrm{s}}} \providecommand{\shk}{\phi} \providecommand{\Shk}{\Phi} -\providecommand{\ShkLogZeroLogStd}{\sigma_{\cancel{\ShkMeanOneLog}}} % Std of that shock -\providecommand{\ShkLogZeroLogVar}{\sigma_{\cancel{\ShkMeanOneLog}}^{2}} % Variance of that shock -\providecommand{\ShkLogZeroLog}{\cancel{\ShkMeanOneLog}} % Log of that shock +\providecommand{\ShkLogZeroLogStd}{\sigma_{\cancel{\ShkMeanOneLog}}} % Std of that shock +\providecommand{\ShkLogZeroLogVar}{\sigma_{\cancel{\ShkMeanOneLog}}^{2}} % Variance of that shock +\providecommand{\ShkLogZeroLog}{\cancel{\ShkMeanOneLog}} % Log of that shock \providecommand{\ShkLogZero}{\cancel{\ShkMeanOne}} % A shock whose expectation in logs is zero; cancellation of the nonzero mean for the mean one shock \providecommand{\ShkMeanOneLogStd}{\sigma_{\ShkMeanOneLog}} % Std of that shock \providecommand{\ShkMeanOneLogVar}{\sigma^{2}_{\ShkMeanOneLog}} % Log of that shock @@ -478,16 +478,16 @@ \providecommand{\TLev}{\ensuremath{T}} \providecommand{\TMap}{\mathscr{T}} \providecommand{\tNow}{\ensuremath{t}} -\providecommand{\tShkAll}{\xi} % -\providecommand{\tShkEmpMin}{\underline{\theta}} % -\providecommand{\TShkEmp}{\Theta} % -\providecommand{\tShkEmp}{\theta} % -\providecommand{\tShkEmp}{\theta} % +\providecommand{\tShkAll}{\xi} % +\providecommand{\tShkEmpMin}{\underline{\theta}} % +\providecommand{\TShkEmp}{\Theta} % +\providecommand{\tShkEmp}{\theta} % +\providecommand{\tShkEmp}{\theta} % \providecommand{\tranShkInd}{\theta} % New \providecommand{\TranShkAgg}{\Theta} % New -\providecommand{\TShk}{\Xi} % -\providecommand{\tShk}{\xi} % -\providecommand{\tshk}{\xi} % +\providecommand{\TShk}{\Xi} % +\providecommand{\tShk}{\xi} % +\providecommand{\tshk}{\xi} % \providecommand{\tSS}{\ensuremath{t}} \providecommand{\tThen}{\ensuremath{\tau}} \providecommand{\uFunc}{{\ensuremath{\mathrm{u}}}} @@ -546,8 +546,8 @@ \providecommand{\wBeg}{\kLev} % wealth as of the beginning of the period (before R is received, not including Y) \providecommand{\Wealth}{\ensuremath{O}} \providecommand{\wealth}{\ensuremath{o}} -\providecommand{\WEndRat}{\ARat} % -\providecommand{\wEndRat}{\aRat} % +\providecommand{\WEndRat}{\ARat} % +\providecommand{\wEndRat}{\aRat} % \providecommand{\WEnd}{\ALev} % Wealth as of the end of the period (after C has been chosen) \providecommand{\wEnd}{\aLev} % wealth as of the end of the period (after C has been taken) \providecommand{\Wend}{\ARat} % Wealth as of the end of the period (after C has been chosen) @@ -557,9 +557,9 @@ \providecommand{\WGro}{\ensuremath{\mathrm{G}}} \providecommand{\wGro}{\ensuremath{\mathsf{g}}} \providecommand{\whumMin}{\underline{\hRat}} % human wealth -- individual -\providecommand{\WHum}{\HLev} % Human wealth -- aggregate +\providecommand{\WHum}{\HLev} % Human wealth -- aggregate \providecommand{\wHum}{\hLev} % human wealth -- individual -\providecommand{\Whum}{\HRat} % Human wealth -- aggregate +\providecommand{\Whum}{\HRat} % Human wealth -- aggregate \providecommand{\whum}{\hRat} % human wealth -- individual \providecommand{\WLev}{\ensuremath{W}} \providecommand{\wLev}{\pmb{w}} @@ -571,15 +571,15 @@ \providecommand{\WMkt}{\MLev} % Wealth as of the middle of the period (after R is received, including Y) \providecommand{\wMkt}{\mLev} % wealth as of the middle of the period (after R is received, including Y) \providecommand{\wmkt}{\mLev} % wealth as of the middle of the period (after R is received, including Y) -\providecommand{\wNet}{\ensuremath{x}} % +\providecommand{\wNet}{\ensuremath{x}} % \providecommand{\WNet}{\ensuremath{X}} % Total wealth \providecommand{\WPre}{{K}} \providecommand{\wPre}{{k}} -\providecommand{\wRat}{\ensuremath{o}} % +\providecommand{\wRat}{\ensuremath{o}} % \providecommand{\WRat}{\ensuremath{O}} % Ratio to permanent income -\providecommand{\wTot}{\ensuremath{\mathbf{o}}} % +\providecommand{\wTot}{\ensuremath{\mathbf{o}}} % \providecommand{\WTot}{\ensuremath{\mathbf{O}}} % Total wealth -\providecommand{\wtot}{\ensuremath{o}} % +\providecommand{\wtot}{\ensuremath{o}} % \providecommand{\Wtot}{\ensuremath{O}} % Total wealth \providecommand{\xFer}{\chi} \providecommand{\XFer}{X} @@ -661,4 +661,3 @@ \newcommand{\GPF}{{\mbox{GPF}}} \newcommand{\GPFAgg}{{\mbox{GPF-Agg}}} \newcommand{\FHWF}{\mbox{FHWF}} - diff --git a/Documentation/NARK/Resources/texmf-local/tex/latex/printvrb.sty b/Documentation/NARK/Resources/texmf-local/tex/latex/printvrb.sty index de4fd564a..b8757b3d4 100755 --- a/Documentation/NARK/Resources/texmf-local/tex/latex/printvrb.sty +++ b/Documentation/NARK/Resources/texmf-local/tex/latex/printvrb.sty @@ -6,9 +6,9 @@ %%% revised version, April 8, 2011 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% Uses moreverb.sty, Rainer Schopf author, +%%% Uses moreverb.sty, Rainer Schopf author, %%% as method to send verbatim text to -%%% another file, +%%% another file, %%% These commands allow user to type in text or math and %%% have it print in more than one document, @@ -18,7 +18,7 @@ %%% Each fragment will have a unique name given as an argument %%% to writetofile. -%%% +%%% \usepackage{moreverb} \newwrite\verbatimout @@ -54,10 +54,10 @@ \vskip1sp \ifnum\definitionnumber=0 \expandafter\openin1 \jobname.vrb -\ifeof1 +\ifeof1 \else \input \jobname.vrb -\fi%% to get the previous definitions +\fi%% to get the previous definitions \immediate\openout\verbatimout=\jobname.vrb \fi %% @@ -91,7 +91,7 @@ file one more time!\else %%% Using fragments in new file: %%% \input jobname.vrb will bring in the definitions -%%% for the fragments. +%%% for the fragments. %%% (jobname is the same as the filename of the source document) %%% \namesinmargin will make names print as well as as printing @@ -100,7 +100,7 @@ file one more time!\else %%% \printfrag{name} will bring in fragment defined in source file, %%% and sent to jobname.vrb. -%%% \printfrag will save the problem of remembering to use +%%% \printfrag will save the problem of remembering to use %%% \csname ...\endcsname, and will check to see if fragment is defined \def\printfrag#1{\expandafter\ifx\csname #1\endcsname\relax\vskip12pt diff --git a/Documentation/NARK/Resources/texmf-local/tex/latex/snapshot.sty b/Documentation/NARK/Resources/texmf-local/tex/latex/snapshot.sty index 23d4a505a..311018ebe 100644 --- a/Documentation/NARK/Resources/texmf-local/tex/latex/snapshot.sty +++ b/Documentation/NARK/Resources/texmf-local/tex/latex/snapshot.sty @@ -4,8 +4,8 @@ %% %% The original source files were: %% -%% snapshot.dtx -%% +%% snapshot.dtx +%% %%% ==================================================================== %%% @LaTeX-doc-source-file{ %%% filename = "snapshot.dtx", diff --git a/Documentation/NARK/Resources/texmf-local/tex/latex/tex4ht/pictureenv.4ht b/Documentation/NARK/Resources/texmf-local/tex/latex/tex4ht/pictureenv.4ht index 1dcae3abc..b51123edc 100644 --- a/Documentation/NARK/Resources/texmf-local/tex/latex/tex4ht/pictureenv.4ht +++ b/Documentation/NARK/Resources/texmf-local/tex/latex/tex4ht/pictureenv.4ht @@ -1,3 +1,3 @@ % pictureenv.4ht from https://tex.stackexchange.com/questions/448300/tex4ht-conflict-with-math-in-table-vs-outside-table-when-using-svg -\ConfigureEnv{pictureenv}{\Picture*{}}{\EndPicture}{}{} \ No newline at end of file +\ConfigureEnv{pictureenv}{\Picture*{}}{\EndPicture}{}{} diff --git a/Documentation/NARK/Resources/texmf-local/tex/latex/tex4ht/svg-math-and-subfigures-README.md b/Documentation/NARK/Resources/texmf-local/tex/latex/tex4ht/svg-math-and-subfigures-README.md index 5bd1328d8..5dffe22ed 100644 --- a/Documentation/NARK/Resources/texmf-local/tex/latex/tex4ht/svg-math-and-subfigures-README.md +++ b/Documentation/NARK/Resources/texmf-local/tex/latex/tex4ht/svg-math-and-subfigures-README.md @@ -4,8 +4,6 @@ The current version works There seem to be two options: -1. If you never set a specified size of a figure (like \includegraphics[width=6in]) then the method discussed [here](https://tug.org/pipermail/tex4ht/2015q2/001166.html) works. But dies with a division by zero error whenever the size has been explicitly set. It can be resurrected by uncommenting the \Configure{graphics*}{svg} portion of the file +1. If you never set a specified size of a figure (like \includegraphics[width=6in]) then the method discussed [here](https://tug.org/pipermail/tex4ht/2015q2/001166.html) works. But dies with a division by zero error whenever the size has been explicitly set. It can be resurrected by uncommenting the \Configure{graphics\*}{svg} portion of the file 1. In cases where the size is set (as is frequently the case), the current version obtains the dimensions directly from the svg file - * This might have problems with an svg file without explicit dimensions - - + - This might have problems with an svg file without explicit dimensions diff --git a/Documentation/NARK/Resources/texmf-local/tex/latex/tex4ht/svg-math-and-subfigures.cfg b/Documentation/NARK/Resources/texmf-local/tex/latex/tex4ht/svg-math-and-subfigures.cfg index fd5d66f3d..14147bc19 100644 --- a/Documentation/NARK/Resources/texmf-local/tex/latex/tex4ht/svg-math-and-subfigures.cfg +++ b/Documentation/NARK/Resources/texmf-local/tex/latex/tex4ht/svg-math-and-subfigures.cfg @@ -1,12 +1,12 @@ -\Preamble{charset="latin1",p-width,pic-align,pic-tabular} +\Preamble{charset="latin1",p-width,pic-align,pic-tabular} \DeclareGraphicsExtensions{.svg,.png,.jpg} % change to %\DeclareGraphicsExtensions{.png,.svg,.jpg} to prefer png pix -%\Configure{Picture}{.svg} +%\Configure{Picture}{.svg} -\Configure{VERSION}{} +\Configure{VERSION}{} \DeclareGraphicsRule{.png}{bmp}{.xbb}{} -%\DeclareGraphicsRule{.svg}{svg}{.xbb}{} % Uncomment if you want to use the commented-out method of configuring svg files to get the size from a boundingbox created by ebb -x *.png +%\DeclareGraphicsRule{.svg}{svg}{.xbb}{} % Uncomment if you want to use the commented-out method of configuring svg files to get the size from a boundingbox created by ebb -x *.png \ConfigureEnv{figure} {\ifvmode\IgnorePar\fi\EndP\HCode{
}% @@ -41,16 +41,16 @@ \Css{.subfigure img{display:block; margin-left:auto; margin-right:auto}} % Should, but does not seem to, center captions % This is for figures in png format -\Configure{graphics*} -{png} -{%the special command below so it will copy the png over -\special{t4ht+@File: \csname Gin@base\endcsname.png} -\Picture[pict]{\csname Gin@base\endcsname .png -\space width="\expandafter\the\csname Gin@req@width\endcsname" -}% -}% +\Configure{graphics*} +{png} +{%the special command below so it will copy the png over +\special{t4ht+@File: \csname Gin@base\endcsname.png} +\Picture[pict]{\csname Gin@base\endcsname .png +\space width="\expandafter\the\csname Gin@req@width\endcsname" +}% +}% -\Configure{Picture}{.svg} +\Configure{Picture}{.svg} \makeatletter \Configure{graphics*} @@ -76,11 +76,11 @@ \Css{.equation td{text-align:center; }} \Css{td.equation { margin-top:5em; margin-bottom:5em; }} -%These to tell tex4ht to make inline math images also +%These to tell tex4ht to make inline math images also \begin{document} -\Configure{$}{\PicMath}{\EndPicMath}{} -\Configure{PicMath}{}{}{}{class="math";align="absmiddle"} +\Configure{$}{\PicMath}{\EndPicMath}{} +\Configure{PicMath}{}{}{}{class="math";align="absmiddle"} \EndPreamble diff --git a/Documentation/NARK/Resources/texmf-local/tex/latex/tex4ht/svg-math-and-subfigures.tex b/Documentation/NARK/Resources/texmf-local/tex/latex/tex4ht/svg-math-and-subfigures.tex index b9f4c34ec..bd2dd2016 100644 --- a/Documentation/NARK/Resources/texmf-local/tex/latex/tex4ht/svg-math-and-subfigures.tex +++ b/Documentation/NARK/Resources/texmf-local/tex/latex/tex4ht/svg-math-and-subfigures.tex @@ -1,12 +1,12 @@ -\Preamble{charset="latin1",p-width,pic-align,pic-tabular} +\Preamble{charset="latin1",p-width,pic-align,pic-tabular} \DeclareGraphicsExtensions{.svg,.png,.jpg} % change to %\DeclareGraphicsExtensions{.png,.svg,.jpg} to prefer png pix -%\Configure{Picture}{.svg} +%\Configure{Picture}{.svg} -\Configure{VERSION}{} +\Configure{VERSION}{} \DeclareGraphicsRule{.png}{bmp}{.xbb}{} -%\DeclareGraphicsRule{.svg}{svg}{.xbb}{} % Uncomment if you want to use the commented-out method of configuring svg files to get the size from a boundingbox created by ebb -x *.png +%\DeclareGraphicsRule{.svg}{svg}{.xbb}{} % Uncomment if you want to use the commented-out method of configuring svg files to get the size from a boundingbox created by ebb -x *.png \ConfigureEnv{figure} {\ifvmode\IgnorePar\fi\EndP\HCode{
}% @@ -41,16 +41,16 @@ \Css{.subfigure img{display:block; margin-left:auto; margin-right:auto}} % Should, but does not seem to, center captions % This is for figures in png format -\Configure{graphics*} - {png} - {%the special command below so it will copy the png over - \special{t4ht+@File: \csname Gin@base\endcsname.png} - \Picture[pict]{\csname Gin@base\endcsname .png - \space width="\expandafter\the\csname Gin@req@width\endcsname" -}% -}% +\Configure{graphics*} + {png} + {%the special command below so it will copy the png over + \special{t4ht+@File: \csname Gin@base\endcsname.png} + \Picture[pict]{\csname Gin@base\endcsname .png + \space width="\expandafter\the\csname Gin@req@width\endcsname" +}% +}% -\Configure{Picture}{.svg} +\Configure{Picture}{.svg} \makeatletter \Configure{graphics*} @@ -68,11 +68,11 @@ % https://tex.stackexchange.com/questions/563276/graphics-scaling-in-tex4ht -%These to tell tex4ht to make inline math images also +%These to tell tex4ht to make inline math images also \begin{document} -\Configure{$}{\PicMath}{\EndPicMath}{} -\Configure{PicMath}{}{}{}{class="math";align="absmiddle"} +\Configure{$}{\PicMath}{\EndPicMath}{} +\Configure{PicMath}{}{}{}{class="math";align="absmiddle"} \EndPreamble diff --git a/Documentation/NARK/Resources/texmf-local/tex/latex/tex4htMakeCFG.sh b/Documentation/NARK/Resources/texmf-local/tex/latex/tex4htMakeCFG.sh index ea5e9e310..36ad5667c 100755 --- a/Documentation/NARK/Resources/texmf-local/tex/latex/tex4htMakeCFG.sh +++ b/Documentation/NARK/Resources/texmf-local/tex/latex/tex4htMakeCFG.sh @@ -19,5 +19,3 @@ cmd="cp `kpsewhich svg-set-size-to-1p0.mk4` $handoutName.mk4" #cmd="cp `kpsewhich svg-set-size-to-1p2x1p0.mk4` $handoutName.mk4" #cmd="cp `kpsewhich svg-set-size-to-1p1x1p0.mk4` $handoutName.mk4" # Tried this to achieve bold; does not look good echo "$cmd" ; eval "$cmd" - - diff --git a/Documentation/NARK/Resources/texmf-local/texmf-local/README.md b/Documentation/NARK/Resources/texmf-local/texmf-local/README.md index e740ea91f..c57d0c09f 100644 --- a/Documentation/NARK/Resources/texmf-local/texmf-local/README.md +++ b/Documentation/NARK/Resources/texmf-local/texmf-local/README.md @@ -17,5 +17,3 @@ Then you have two options: 1. Windows does not allow symbolic links. So on Windows machines you will need to modify the texmf.cnf configuration file so that it knows to look in the right place (your Dropbox path) for the texmf-local config files - - diff --git a/Documentation/NARK/Resources/texmf-local/texmf-local/bibtex/bib/economics.bib b/Documentation/NARK/Resources/texmf-local/texmf-local/bibtex/bib/economics.bib index 0dd37eeda..10bd9a6dc 100644 --- a/Documentation/NARK/Resources/texmf-local/texmf-local/bibtex/bib/economics.bib +++ b/Documentation/NARK/Resources/texmf-local/texmf-local/bibtex/bib/economics.bib @@ -26,7 +26,7 @@ @article{schmitt2003closing } @misc{maTodaRich, - title={A Theory of the Saving Rate of the Rich}, + title={A Theory of the Saving Rate of the Rich}, author={Qingyin Ma and Alexis Akira Toda}, year={2020}, eprint={2005.02379}, @@ -936,7 +936,7 @@ @article{khanMacroPru journal = {Department of Economics, Johns Hopkins University}, year = {2019}, url = {https://pdfs.semanticscholar.org/8e9d/dfe7c204bbfa8a23f42f4931461fb467fc08.pdf?_ga=2.95712860.1156899890.1563925023-1991616136.1563925023} -} +} @article{SSinHANK, title = {Monetary Policy Transmission with Many Agents}, @@ -944,8 +944,8 @@ @article{SSinHANK journal = {Manuscript, Johns Hopkins University}, year = {2019}, month = {March}, -} - +} + @article{blSolving, title = {Solving Heterogeneous Agent Models In Discrete Time With Many Idiosyncratic States By Perturbation Methods}, author = {Christian Bayer and Ralph Luetticke}, @@ -953,7 +953,7 @@ @article{blSolving volume = {Discussion Paper 13071}, year = 2018 } - + @article{carrollHeteroAndMacro, title = {Heterogeneity and Macro Modeling In Policymaking Institutions}, year = {2019}, @@ -1542,9 +1542,9 @@ @inproceedings{ParkerSoulelesCarroll Christopher D. Carroll}, title = {The Benefits of Panel Data in Consumer Expenditure Surveys}, - booktitle = {Improving the Measurement of Consumer Expenditures}, + booktitle = {Improving the Measurement of Consumer Expenditures}, chapter = {7}, - note = {Final version at + note = {Final version at \href{http://econ.jhu.edu/people/ccarroll/papers/ParkerSoulelesCarroll/}{\texttt{http://econ.jhu.edu/people/ccarroll/papers/ParkerSoulelesCarroll/}}}, url = {http://econ.jhu.edu/people/ccarroll/papers/ParkerSoulelesCarroll/} } @@ -2551,7 +2551,7 @@ @article{druedahlNEGM title = {A Fast Nested Endogenous Grid Method for Solving General Consumption-Saving Models}, author = {Druedahl, Jeppe}, journal = {Manuscript, University of Copenhagen} -} +} @Article{JBES1982, author={Perraudin, William R M and Sorensen, Bent E}, @@ -3220,7 +3220,7 @@ @techreport{akmwwInequality-Discuss institution = {NBER}, url = {http://www.econ2.jhu.edu/people/ccarroll/discuss/2017-04_NBER_Macro-Annual/akmwwInequality/} } - + @article{akmwwInequality, title = {When Inequality Matters for Macro and Macro Matters for Inequality}, author = {SeHyoun Ahn and Greg Kaplan and Benjamin Moll and Thomas Winberry and Christian Wolf}, @@ -3338,7 +3338,7 @@ @article{grodzickiCCC journal={The Pennsylvania State University}, year={2015} } - + @article{ausubelFailure, title={The failure of competition in the credit card market}, author={Ausubel, Lawrence M}, @@ -3444,7 +3444,7 @@ @article{samuelson1937note year={1937}, publisher={JSTOR} } - + @article{samuelson1979we, title={Why we should not make mean log of wealth big though years to act are long}, @@ -3457,7 +3457,7 @@ @article{samuelson1979we publisher={Elsevier}, doi= {http://dx.doi.org/10.1016/0378-4266(79)90023-2} } - + @article{BueraShin2009, title={Productivity Growth and Capital Flows: The Dynamics of Reform}, author={Buera, Francisco and Yongseok Shin}, @@ -3515,7 +3515,7 @@ @techreport{assMiddleClass URL = "http://www.nber.org/papers/w20848", abstract = {We provide new facts on the debt dynamics leading up to the financial crisis of 2007. Earlier research suggests that distortions in the supply of mortgage credit, evidenced by a decoupling of credit flow from income growth, may have caused the rise in house prices and the subsequent housing market collapse. This paper shows that the increase in mortgage originations was shared across the whole distribution of borrowers, and that middle- and high-income borrowers made up the majority of originations even at the peak of the boom. Compared to prior years, middle- and high-income borrowers (not the poor), as well as those with medium and high credit scores, made up a much larger share of delinquencies in the crisis relative to earlier years. We show that the relation between individual mortgage size and income growth during the housing boom was always strongly positive, also in line with previous periods (and independent of how income is measured). These results are most consistent with an expectations based view of the financial crisis in which both homebuyers and lenders were buying into increasing housing values and defaulted once prices dropped. }, } - + @TECHREPORT{aydinMPCLiq, title = {The Marginal Propensity to Consume out of Liquidity}, author = {Aydin, Deniz}, @@ -7064,7 +7064,7 @@ @Article{carrollBSTheory } % Updates here should sync with /Volumes/Data/Papers/BufferStockTheory/BufferStockTheory-Latest/LaTeX/BufferStockTheory-Self.bib and the corresponding public version -@article{BufferStockTheory, +@article{BufferStockTheory, author = {Christopher D. Carroll}, journal = {Quantitative Economics}, title = {Theoretical Foundations of Buffer Stock Saving}, @@ -11110,7 +11110,7 @@ @article{gross&souleles:creditcards year={2002}, publisher={Oxford University Press} } - + @ARTICLE{gross&souleles:bankruptcy, author = {Gross, David B. and Souleles, Nicholas S.}, title = {Explaining the Rise in Bankruptcy and Delinquency: @@ -12195,7 +12195,7 @@ @ARTICLE{ipsUnitHetero volume = 115, pages = {53--74} } - + @INBOOK{IMFweo2012, chapter = 3, title = {World Economic Outlook, 2012}, @@ -22355,4 +22355,3 @@ @string{restud @string{rfs = {review of financial studies}} @string{rje = {rand journal of economics}} - diff --git a/Documentation/NARK/Resources/texmf-local/texmf-local/bibtex/bst/unsrtnatTitlesFirst.bst b/Documentation/NARK/Resources/texmf-local/texmf-local/bibtex/bst/unsrtnatTitlesFirst.bst index 9c0acffd2..fb0bb89d8 100755 --- a/Documentation/NARK/Resources/texmf-local/texmf-local/bibtex/bst/unsrtnatTitlesFirst.bst +++ b/Documentation/NARK/Resources/texmf-local/texmf-local/bibtex/bst/unsrtnatTitlesFirst.bst @@ -7,7 +7,7 @@ %% natbst.mbs (with options: `name-full,atit-lower,month-full,jour-full') %% ---------------------------------------- %% *** Version of `abbrv.bst' for use with natbib package *** -%% +%% % The original source file contains the following version information: % \ProvidesFile{natbst.mbs}[1997/03/19 1.4 (PWD)] @@ -244,7 +244,7 @@ FUNCTION {format.editors} % Got the following code from document called btex101.pdf FUNCTION {format.title} -{ +{ title "``" swap$ * ".'' " * % Put article title in quotes } diff --git a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/ReadMe.texmf b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/ReadMe.texmf index 85d44dc6a..9485d0cf2 100644 --- a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/ReadMe.texmf +++ b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/ReadMe.texmf @@ -7,11 +7,11 @@ You will likely need the "full" distribution of TeXLive, as many obscure tex pac openout_any = a shell_escape = t -to your local texmf.cnf configuration file. On a standard MacTeX TeXLive distribution, this file is at +to your local texmf.cnf configuration file. On a standard MacTeX TeXLive distribution, this file is at /usr/local/texlive/[year]/texmf.cnf -while on a standard Windows 7 installation it is at +while on a standard Windows 7 installation it is at C:\texlive\[year]\texmf.cnf diff --git a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/articleNoRefHead.cls b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/articleNoRefHead.cls index e418b9cc2..6c7ed7683 100755 --- a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/articleNoRefHead.cls +++ b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/articleNoRefHead.cls @@ -1 +1 @@ -%% %% This is file `article.cls', %% generated with the docstrip utility. %% %% The original source files were: %% %% classes.dtx (with options: `article') %% %% This is a generated file. %% %% Copyright 1993 1994 1995 1996 1997 1998 1999 %% The LaTeX3 Project and any individual authors listed elsewhere %% in this file. %% %% This file is part of the LaTeX base system. %% ------------------------------------------- %% %% It may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.1 %% of this license or (at your option) any later version. %% The latest version of this license is in %% http://www.latex-project.org/lppl.txt %% and version 1.1 or later is part of all distributions of LaTeX %% version 1999/06/01 or later. %% %% The list of all files belonging to the LaTeX base distribution is %% given in the file `manifest.txt'. See also `legal.txt' for additional %% information. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z %% Digits \0\1\2\3\4\5\6\7\8\9 %% Exclamation \! Double quote \" Hash (number) \# %% Dollar \$ Percent \% Ampersand \& %% Acute accent \' Left paren \( Right paren \) %% Asterisk \* Plus \+ Comma \, %% Minus \- Point \. Solidus \/ %% Colon \: Semicolon \; Less than \< %% Equals \= Greater than \> Question mark \? %% Commercial at \@ Left bracket \[ Backslash \\ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesClass{articleNoRefHead} [1999/01/07 v1.4a Standard LaTeX document class] \newcommand\@ptsize{} \newif\if@restonecol \newif\if@titlepage \@titlepagefalse \if@compatibility\else \DeclareOption{a4paper} {\setlength\paperheight {297mm}% \setlength\paperwidth {210mm}} \DeclareOption{a5paper} {\setlength\paperheight {210mm}% \setlength\paperwidth {148mm}} \DeclareOption{b5paper} {\setlength\paperheight {250mm}% \setlength\paperwidth {176mm}} \DeclareOption{letterpaper} {\setlength\paperheight {11in}% \setlength\paperwidth {8.5in}} \DeclareOption{legalpaper} {\setlength\paperheight {14in}% \setlength\paperwidth {8.5in}} \DeclareOption{executivepaper} {\setlength\paperheight {10.5in}% \setlength\paperwidth {7.25in}} \DeclareOption{landscape} {\setlength\@tempdima {\paperheight}% \setlength\paperheight {\paperwidth}% \setlength\paperwidth {\@tempdima}} \fi \if@compatibility \renewcommand\@ptsize{0} \else \DeclareOption{10pt}{\renewcommand\@ptsize{0}} \fi \DeclareOption{11pt}{\renewcommand\@ptsize{1}} \DeclareOption{12pt}{\renewcommand\@ptsize{2}} \if@compatibility\else \DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse} \fi \DeclareOption{twoside}{\@twosidetrue \@mparswitchtrue} \DeclareOption{draft}{\setlength\overfullrule{5pt}} \if@compatibility\else \DeclareOption{final}{\setlength\overfullrule{0pt}} \fi \DeclareOption{titlepage}{\@titlepagetrue} \if@compatibility\else \DeclareOption{notitlepage}{\@titlepagefalse} \fi \if@compatibility\else \DeclareOption{onecolumn}{\@twocolumnfalse} \fi \DeclareOption{twocolumn}{\@twocolumntrue} \DeclareOption{leqno}{\input{leqno.clo}} \DeclareOption{fleqn}{\input{fleqn.clo}} \DeclareOption{openbib}{% \AtEndOfPackage{% \renewcommand\@openbib@code{% \advance\leftmargin\bibindent \itemindent -\bibindent \listparindent \itemindent \parsep \z@ }% \renewcommand\newblock{\par}}% } \ExecuteOptions{letterpaper,10pt,oneside,onecolumn,final} \ProcessOptions \input{size1\@ptsize.clo} \setlength\lineskip{1\p@} \setlength\normallineskip{1\p@} \renewcommand\baselinestretch{} \setlength\parskip{0\p@ \@plus \p@} \@lowpenalty 51 \@medpenalty 151 \@highpenalty 301 \setcounter{topnumber}{2} \renewcommand\topfraction{.7} \setcounter{bottomnumber}{1} \renewcommand\bottomfraction{.3} \setcounter{totalnumber}{3} \renewcommand\textfraction{.2} \renewcommand\floatpagefraction{.5} \setcounter{dbltopnumber}{2} \renewcommand\dbltopfraction{.7} \renewcommand\dblfloatpagefraction{.5} \if@twoside \def\ps@headings{% \let\@oddfoot\@empty\let\@evenfoot\@empty \def\@evenhead{\thepage\hfil\slshape\leftmark}% \def\@oddhead{{\slshape\rightmark}\hfil\thepage}% \let\@mkboth\markboth \def\sectionmark##1{% \markboth {\MakeUppercase{% \ifnum \c@secnumdepth >\z@ \thesection\quad \fi ##1}}{}}% \def\subsectionmark##1{% \markright {% \ifnum \c@secnumdepth >\@ne \thesubsection\quad \fi ##1}}} \else \def\ps@headings{% \let\@oddfoot\@empty \def\@oddhead{{\slshape\rightmark}\hfil\thepage}% \let\@mkboth\markboth \def\sectionmark##1{% \markright {\MakeUppercase{% \ifnum \c@secnumdepth >\m@ne \thesection\quad \fi ##1}}}} \fi \def\ps@myheadings{% \let\@oddfoot\@empty\let\@evenfoot\@empty \def\@evenhead{\thepage\hfil\slshape\leftmark}% \def\@oddhead{{\slshape\rightmark}\hfil\thepage}% \let\@mkboth\@gobbletwo \let\sectionmark\@gobble \let\subsectionmark\@gobble } \if@titlepage \newcommand\maketitle{\begin{titlepage}% \let\footnotesize\small \let\footnoterule\relax \let \footnote \thanks \null\vfil \vskip 60\p@ \begin{center}% {\LARGE \@title \par}% \vskip 3em% {\large \lineskip .75em% \begin{tabular}[t]{c}% \@author \end{tabular}\par}% \vskip 1.5em% {\large \@date \par}% % Set date in \large size. \end{center}\par \@thanks \vfil\null \end{titlepage}% \setcounter{footnote}{0}% \global\let\thanks\relax \global\let\maketitle\relax \global\let\@thanks\@empty \global\let\@author\@empty \global\let\@date\@empty \global\let\@title\@empty \global\let\title\relax \global\let\author\relax \global\let\date\relax \global\let\and\relax } \else \newcommand\maketitle{\par \begingroup \renewcommand\thefootnote{\@fnsymbol\c@footnote}% \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% \long\def\@makefntext##1{\parindent 1em\noindent \hb@xt@1.8em{% \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% \if@twocolumn \ifnum \col@number=\@ne \@maketitle \else \twocolumn[\@maketitle]% \fi \else \newpage \global\@topnum\z@ % Prevents figures from going at top of page. \@maketitle \fi \thispagestyle{plain}\@thanks \endgroup \setcounter{footnote}{0}% \global\let\thanks\relax \global\let\maketitle\relax \global\let\@maketitle\relax \global\let\@thanks\@empty \global\let\@author\@empty \global\let\@date\@empty \global\let\@title\@empty \global\let\title\relax \global\let\author\relax \global\let\date\relax \global\let\and\relax } \def\@maketitle{% \newpage \null \vskip 2em% \begin{center}% \let \footnote \thanks {\LARGE \@title \par}% \vskip 1.5em% {\large \lineskip .5em% \begin{tabular}[t]{c}% \@author \end{tabular}\par}% \vskip 1em% {\large \@date}% \end{center}% \par \vskip 1.5em} \fi \setcounter{secnumdepth}{3} \newcounter {part} \newcounter {section} \newcounter {subsection}[section] \newcounter {subsubsection}[subsection] \newcounter {paragraph}[subsubsection] \newcounter {subparagraph}[paragraph] \renewcommand \thepart {\@Roman\c@part} \renewcommand \thesection {}%\@arabic\c@section} \renewcommand\thesubsection {\thesection.\@arabic\c@subsection} \renewcommand\thesubsubsection{\thesubsection .\@arabic\c@subsubsection} \renewcommand\theparagraph {\thesubsubsection.\@arabic\c@paragraph} \renewcommand\thesubparagraph {\theparagraph.\@arabic\c@subparagraph} \newcommand\part{% \if@noskipsec \leavevmode \fi \par \addvspace{4ex}% \@afterindentfalse \secdef\@part\@spart} \def\@part[#1]#2{% \ifnum \c@secnumdepth >\m@ne \refstepcounter{part}% \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% \else \addcontentsline{toc}{part}{#1}% \fi {\parindent \z@ \raggedright \interlinepenalty \@M \normalfont \ifnum \c@secnumdepth >\m@ne \Large\bfseries \partname~\thepart \par\nobreak \fi \huge \bfseries #2% \markboth{}{}\par}% \nobreak \vskip 3ex \@afterheading} \def\@spart#1{% {\parindent \z@ \raggedright \interlinepenalty \@M \normalfont \huge \bfseries #1\par}% \nobreak \vskip 3ex \@afterheading} \newcommand\section{\@startsection{section}{1}{ \z@} % {-3.5ex \@plus -1ex \@minus -.2ex}% {2.3ex \@plus.2ex}% {\normalfont\Large\bfseries}} \newcommand\subsection{\@startsection{subsection}{2}{\z@}% {-3.25ex\@plus -1ex \@minus -.2ex}% {1.5ex \@plus .2ex}% {\normalfont\large\bfseries}} \newcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% {-3.25ex\@plus -1ex \@minus -.2ex}% {1.5ex \@plus .2ex}% {\normalfont\normalsize\bfseries}} \newcommand\paragraph{\@startsection{paragraph}{4}{\z@}% {3.25ex \@plus1ex \@minus.2ex}% {-1em}% {\normalfont\normalsize\bfseries}} \newcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}% {3.25ex \@plus1ex \@minus .2ex}% {-1em}% {\normalfont\normalsize\bfseries}} \if@twocolumn \setlength\leftmargini {2em} \else \setlength\leftmargini {2.5em} \fi \leftmargin \leftmargini \setlength\leftmarginii {2.2em} \setlength\leftmarginiii {1.87em} \setlength\leftmarginiv {1.7em} \if@twocolumn \setlength\leftmarginv {.5em} \setlength\leftmarginvi {.5em} \else \setlength\leftmarginv {1em} \setlength\leftmarginvi {1em} \fi \setlength \labelsep {.5em} \setlength \labelwidth{\leftmargini} \addtolength\labelwidth{-\labelsep} \@beginparpenalty -\@lowpenalty \@endparpenalty -\@lowpenalty \@itempenalty -\@lowpenalty \renewcommand\theenumi{\@arabic\c@enumi} \renewcommand\theenumii{\@alph\c@enumii} \renewcommand\theenumiii{\@roman\c@enumiii} \renewcommand\theenumiv{\@Alph\c@enumiv} \newcommand\labelenumi{\theenumi.} \newcommand\labelenumii{(\theenumii)} \newcommand\labelenumiii{\theenumiii.} \newcommand\labelenumiv{\theenumiv.} \renewcommand\p@enumii{\theenumi} \renewcommand\p@enumiii{\theenumi(\theenumii)} \renewcommand\p@enumiv{\p@enumiii\theenumiii} \newcommand\labelitemi{\textbullet} \newcommand\labelitemii{\normalfont\bfseries \textendash} \newcommand\labelitemiii{\textasteriskcentered} \newcommand\labelitemiv{\textperiodcentered} \newenvironment{description} {\list{}{\labelwidth\z@ \itemindent-\leftmargin \let\makelabel\descriptionlabel}} {\endlist} \newcommand*\descriptionlabel[1]{\hspace\labelsep \normalfont\bfseries #1} \if@titlepage \newenvironment{abstract}{% \titlepage \null\vfil \@beginparpenalty\@lowpenalty \begin{center}% \bfseries \abstractname \@endparpenalty\@M \end{center}}% {\par\vfil\null\endtitlepage} \else \newenvironment{abstract}{% \if@twocolumn \section*{\abstractname}% \else \small \begin{center}% {\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}% \end{center}% \quotation \fi} {\if@twocolumn\else\endquotation\fi} \fi \newenvironment{verse} {\let\\\@centercr \list{}{\itemsep \z@ \itemindent -1.5em% \listparindent\itemindent \rightmargin \leftmargin \advance\leftmargin 1.5em}% \item\relax} {\endlist} \newenvironment{quotation} {\list{}{\listparindent 1.5em% \itemindent \listparindent \rightmargin \leftmargin \parsep \z@ \@plus\p@}% \item\relax} {\endlist} \newenvironment{quote} {\list{}{\rightmargin\leftmargin}% \item\relax} {\endlist} \if@compatibility \newenvironment{titlepage} {% \if@twocolumn \@restonecoltrue\onecolumn \else \@restonecolfalse\newpage \fi \thispagestyle{empty}% \setcounter{page}\z@ }% {\if@restonecol\twocolumn \else \newpage \fi } \else \newenvironment{titlepage} {% \if@twocolumn \@restonecoltrue\onecolumn \else \@restonecolfalse\newpage \fi \thispagestyle{empty}% \setcounter{page}\@ne }% {\if@restonecol\twocolumn \else \newpage \fi \if@twoside\else \setcounter{page}\@ne \fi } \fi \newcommand\appendix{\par \setcounter{section}{0}% \setcounter{subsection}{0}% \gdef\thesection{\@Alph\c@section}} \setlength\arraycolsep{5\p@} \setlength\tabcolsep{6\p@} \setlength\arrayrulewidth{.4\p@} \setlength\doublerulesep{2\p@} \setlength\tabbingsep{\labelsep} \skip\@mpfootins = \skip\footins \setlength\fboxsep{3\p@} \setlength\fboxrule{.4\p@} \renewcommand \theequation {\@arabic\c@equation} \newcounter{figure} \renewcommand \thefigure {\@arabic\c@figure} \def\fps@figure{tbp} \def\ftype@figure{1} \def\ext@figure{lof} \def\fnum@figure{\figurename~\thefigure} \newenvironment{figure} {\@float{figure}} {\end@float} \newenvironment{figure*} {\@dblfloat{figure}} {\end@dblfloat} \newcounter{table} \renewcommand\thetable{\@arabic\c@table} \def\fps@table{tbp} \def\ftype@table{2} \def\ext@table{lot} \def\fnum@table{\tablename~\thetable} \newenvironment{table} {\@float{table}} {\end@float} \newenvironment{table*} {\@dblfloat{table}} {\end@dblfloat} \newlength\abovecaptionskip \newlength\belowcaptionskip \setlength\abovecaptionskip{10\p@} \setlength\belowcaptionskip{0\p@} \long\def\@makecaption#1#2{% \vskip\abovecaptionskip \sbox\@tempboxa{#1: #2}% \ifdim \wd\@tempboxa >\hsize #1: #2\par \else \global \@minipagefalse \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% \fi \vskip\belowcaptionskip} \DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm} \DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf} \DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt} \DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf} \DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit} \DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl} \DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc} \DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal} \DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal} \newcommand\@pnumwidth{1.55em} \newcommand\@tocrmarg{2.55em} \newcommand\@dotsep{4.5} \setcounter{tocdepth}{3} \newcommand\tableofcontents{% \section*{\contentsname \@mkboth{% \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}% \@starttoc{toc}% } \newcommand*\l@part[2]{% \ifnum \c@tocdepth >-2\relax \addpenalty\@secpenalty \addvspace{2.25em \@plus\p@}% \begingroup \parindent \z@ \rightskip \@pnumwidth \parfillskip -\@pnumwidth {\leavevmode \large \bfseries #1\hfil \hb@xt@\@pnumwidth{\hss #2}}\par \nobreak \if@compatibility \global\@nobreaktrue \everypar{\global\@nobreakfalse\everypar{}}% \fi \endgroup \fi} \newcommand*\l@section[2]{% \ifnum \c@tocdepth >\z@ \addpenalty\@secpenalty \addvspace{1.0em \@plus\p@}% \setlength\@tempdima{1.5em}% \begingroup \parindent \z@ \rightskip \@pnumwidth \parfillskip -\@pnumwidth \leavevmode \bfseries \advance\leftskip\@tempdima \hskip -\leftskip #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par \endgroup \fi} \newcommand*\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}} \newcommand*\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}} \newcommand*\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}} \newcommand*\l@subparagraph{\@dottedtocline{5}{10em}{5em}} \newcommand\listoffigures{% \section*{\listfigurename \@mkboth{\MakeUppercase\listfigurename}% {\MakeUppercase\listfigurename}}% \@starttoc{lof}% } \newcommand*\l@figure{\@dottedtocline{1}{1.5em}{2.3em}} \newcommand\listoftables{% \section*{\listtablename \@mkboth{% \MakeUppercase\listtablename}{\MakeUppercase\listtablename}}% \@starttoc{lot}% } \let\l@table\l@figure \newdimen\bibindent \setlength\bibindent{1.5em} \newenvironment{thebibliography}[1] { \section{\refname} % \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}}% \list{}%\@biblabel{\@arabic\c@enumiv} {\settowidth\labelwidth{\@biblabel{#1}}% \leftmargin\labelwidth \advance\leftmargin\labelsep \@openbib@code \usecounter{enumiv}% \let\p@enumiv\@empty \renewcommand\theenumiv{}}%\@arabic\c@enumiv \sloppy \clubpenalty4000 \@clubpenalty \clubpenalty \widowpenalty4000% \sfcode`\.\@m} {\def\@noitemerr {\@latex@warning{Empty `thebibliography' environment}}% \endlist} \newcommand\newblock{\hskip .11em\@plus.33em\@minus.07em} \let\@openbib@code\@empty \newenvironment{theindex} {\if@twocolumn \@restonecolfalse \else \@restonecoltrue \fi \columnseprule \z@ \columnsep 35\p@ \twocolumn[\section*{\indexname}]% \@mkboth{\MakeUppercase\indexname}% {\MakeUppercase\indexname}% \thispagestyle{plain}\parindent\z@ \parskip\z@ \@plus .3\p@\relax \let\item\@idxitem} {\if@restonecol\onecolumn\else\clearpage\fi} \newcommand\@idxitem{\par\hangindent 40\p@} \newcommand\subitem{\@idxitem \hspace*{20\p@}} \newcommand\subsubitem{\@idxitem \hspace*{30\p@}} \newcommand\indexspace{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax} \renewcommand\footnoterule{% \kern-3\p@ \hrule\@width.4\columnwidth \kern2.6\p@} \newcommand\@makefntext[1]{% \parindent 1em% \noindent \hb@xt@1.8em{\hss\@makefnmark}#1} \newcommand\contentsname{Contents} \newcommand\listfigurename{List of Figures} \newcommand\listtablename{List of Tables} \newcommand\refname{} \newcommand\indexname{Index} \newcommand\figurename{Figure} \newcommand\tablename{Table} \newcommand\partname{Part} \newcommand\appendixname{Appendix} \newcommand\abstractname{Abstract} \def\today{\ifcase\month\or January\or February\or March\or April\or May\or June\or July\or August\or September\or October\or November\or December\fi \space\number\day, \number\year} \setlength\columnsep{10\p@} \setlength\columnseprule{0\p@} \pagestyle{plain} \pagenumbering{arabic} \if@twoside \else \raggedbottom \fi \if@twocolumn \twocolumn \sloppy \flushbottom \else \onecolumn \fi \endinput %% %% End of file `article.cls'. \ No newline at end of file +%% %% This is file `article.cls', %% generated with the docstrip utility. %% %% The original source files were: %% %% classes.dtx (with options: `article') %% %% This is a generated file. %% %% Copyright 1993 1994 1995 1996 1997 1998 1999 %% The LaTeX3 Project and any individual authors listed elsewhere %% in this file. %% %% This file is part of the LaTeX base system. %% ------------------------------------------- %% %% It may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.1 %% of this license or (at your option) any later version. %% The latest version of this license is in %% http://www.latex-project.org/lppl.txt %% and version 1.1 or later is part of all distributions of LaTeX %% version 1999/06/01 or later. %% %% The list of all files belonging to the LaTeX base distribution is %% given in the file `manifest.txt'. See also `legal.txt' for additional %% information. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z %% Digits \0\1\2\3\4\5\6\7\8\9 %% Exclamation \! Double quote \" Hash (number) \# %% Dollar \$ Percent \% Ampersand \& %% Acute accent \' Left paren \( Right paren \) %% Asterisk \* Plus \+ Comma \, %% Minus \- Point \. Solidus \/ %% Colon \: Semicolon \; Less than \< %% Equals \= Greater than \> Question mark \? %% Commercial at \@ Left bracket \[ Backslash \\ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesClass{articleNoRefHead} [1999/01/07 v1.4a Standard LaTeX document class] \newcommand\@ptsize{} \newif\if@restonecol \newif\if@titlepage \@titlepagefalse \if@compatibility\else \DeclareOption{a4paper} {\setlength\paperheight {297mm}% \setlength\paperwidth {210mm}} \DeclareOption{a5paper} {\setlength\paperheight {210mm}% \setlength\paperwidth {148mm}} \DeclareOption{b5paper} {\setlength\paperheight {250mm}% \setlength\paperwidth {176mm}} \DeclareOption{letterpaper} {\setlength\paperheight {11in}% \setlength\paperwidth {8.5in}} \DeclareOption{legalpaper} {\setlength\paperheight {14in}% \setlength\paperwidth {8.5in}} \DeclareOption{executivepaper} {\setlength\paperheight {10.5in}% \setlength\paperwidth {7.25in}} \DeclareOption{landscape} {\setlength\@tempdima {\paperheight}% \setlength\paperheight {\paperwidth}% \setlength\paperwidth {\@tempdima}} \fi \if@compatibility \renewcommand\@ptsize{0} \else \DeclareOption{10pt}{\renewcommand\@ptsize{0}} \fi \DeclareOption{11pt}{\renewcommand\@ptsize{1}} \DeclareOption{12pt}{\renewcommand\@ptsize{2}} \if@compatibility\else \DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse} \fi \DeclareOption{twoside}{\@twosidetrue \@mparswitchtrue} \DeclareOption{draft}{\setlength\overfullrule{5pt}} \if@compatibility\else \DeclareOption{final}{\setlength\overfullrule{0pt}} \fi \DeclareOption{titlepage}{\@titlepagetrue} \if@compatibility\else \DeclareOption{notitlepage}{\@titlepagefalse} \fi \if@compatibility\else \DeclareOption{onecolumn}{\@twocolumnfalse} \fi \DeclareOption{twocolumn}{\@twocolumntrue} \DeclareOption{leqno}{\input{leqno.clo}} \DeclareOption{fleqn}{\input{fleqn.clo}} \DeclareOption{openbib}{% \AtEndOfPackage{% \renewcommand\@openbib@code{% \advance\leftmargin\bibindent \itemindent -\bibindent \listparindent \itemindent \parsep \z@ }% \renewcommand\newblock{\par}}% } \ExecuteOptions{letterpaper,10pt,oneside,onecolumn,final} \ProcessOptions \input{size1\@ptsize.clo} \setlength\lineskip{1\p@} \setlength\normallineskip{1\p@} \renewcommand\baselinestretch{} \setlength\parskip{0\p@ \@plus \p@} \@lowpenalty 51 \@medpenalty 151 \@highpenalty 301 \setcounter{topnumber}{2} \renewcommand\topfraction{.7} \setcounter{bottomnumber}{1} \renewcommand\bottomfraction{.3} \setcounter{totalnumber}{3} \renewcommand\textfraction{.2} \renewcommand\floatpagefraction{.5} \setcounter{dbltopnumber}{2} \renewcommand\dbltopfraction{.7} \renewcommand\dblfloatpagefraction{.5} \if@twoside \def\ps@headings{% \let\@oddfoot\@empty\let\@evenfoot\@empty \def\@evenhead{\thepage\hfil\slshape\leftmark}% \def\@oddhead{{\slshape\rightmark}\hfil\thepage}% \let\@mkboth\markboth \def\sectionmark##1{% \markboth {\MakeUppercase{% \ifnum \c@secnumdepth >\z@ \thesection\quad \fi ##1}}{}}% \def\subsectionmark##1{% \markright {% \ifnum \c@secnumdepth >\@ne \thesubsection\quad \fi ##1}}} \else \def\ps@headings{% \let\@oddfoot\@empty \def\@oddhead{{\slshape\rightmark}\hfil\thepage}% \let\@mkboth\markboth \def\sectionmark##1{% \markright {\MakeUppercase{% \ifnum \c@secnumdepth >\m@ne \thesection\quad \fi ##1}}}} \fi \def\ps@myheadings{% \let\@oddfoot\@empty\let\@evenfoot\@empty \def\@evenhead{\thepage\hfil\slshape\leftmark}% \def\@oddhead{{\slshape\rightmark}\hfil\thepage}% \let\@mkboth\@gobbletwo \let\sectionmark\@gobble \let\subsectionmark\@gobble } \if@titlepage \newcommand\maketitle{\begin{titlepage}% \let\footnotesize\small \let\footnoterule\relax \let \footnote \thanks \null\vfil \vskip 60\p@ \begin{center}% {\LARGE \@title \par}% \vskip 3em% {\large \lineskip .75em% \begin{tabular}[t]{c}% \@author \end{tabular}\par}% \vskip 1.5em% {\large \@date \par}% % Set date in \large size. \end{center}\par \@thanks \vfil\null \end{titlepage}% \setcounter{footnote}{0}% \global\let\thanks\relax \global\let\maketitle\relax \global\let\@thanks\@empty \global\let\@author\@empty \global\let\@date\@empty \global\let\@title\@empty \global\let\title\relax \global\let\author\relax \global\let\date\relax \global\let\and\relax } \else \newcommand\maketitle{\par \begingroup \renewcommand\thefootnote{\@fnsymbol\c@footnote}% \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% \long\def\@makefntext##1{\parindent 1em\noindent \hb@xt@1.8em{% \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% \if@twocolumn \ifnum \col@number=\@ne \@maketitle \else \twocolumn[\@maketitle]% \fi \else \newpage \global\@topnum\z@ % Prevents figures from going at top of page. \@maketitle \fi \thispagestyle{plain}\@thanks \endgroup \setcounter{footnote}{0}% \global\let\thanks\relax \global\let\maketitle\relax \global\let\@maketitle\relax \global\let\@thanks\@empty \global\let\@author\@empty \global\let\@date\@empty \global\let\@title\@empty \global\let\title\relax \global\let\author\relax \global\let\date\relax \global\let\and\relax } \def\@maketitle{% \newpage \null \vskip 2em% \begin{center}% \let \footnote \thanks {\LARGE \@title \par}% \vskip 1.5em% {\large \lineskip .5em% \begin{tabular}[t]{c}% \@author \end{tabular}\par}% \vskip 1em% {\large \@date}% \end{center}% \par \vskip 1.5em} \fi \setcounter{secnumdepth}{3} \newcounter {part} \newcounter {section} \newcounter {subsection}[section] \newcounter {subsubsection}[subsection] \newcounter {paragraph}[subsubsection] \newcounter {subparagraph}[paragraph] \renewcommand \thepart {\@Roman\c@part} \renewcommand \thesection {}%\@arabic\c@section} \renewcommand\thesubsection {\thesection.\@arabic\c@subsection} \renewcommand\thesubsubsection{\thesubsection .\@arabic\c@subsubsection} \renewcommand\theparagraph {\thesubsubsection.\@arabic\c@paragraph} \renewcommand\thesubparagraph {\theparagraph.\@arabic\c@subparagraph} \newcommand\part{% \if@noskipsec \leavevmode \fi \par \addvspace{4ex}% \@afterindentfalse \secdef\@part\@spart} \def\@part[#1]#2{% \ifnum \c@secnumdepth >\m@ne \refstepcounter{part}% \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% \else \addcontentsline{toc}{part}{#1}% \fi {\parindent \z@ \raggedright \interlinepenalty \@M \normalfont \ifnum \c@secnumdepth >\m@ne \Large\bfseries \partname~\thepart \par\nobreak \fi \huge \bfseries #2% \markboth{}{}\par}% \nobreak \vskip 3ex \@afterheading} \def\@spart#1{% {\parindent \z@ \raggedright \interlinepenalty \@M \normalfont \huge \bfseries #1\par}% \nobreak \vskip 3ex \@afterheading} \newcommand\section{\@startsection{section}{1}{ \z@} % {-3.5ex \@plus -1ex \@minus -.2ex}% {2.3ex \@plus.2ex}% {\normalfont\Large\bfseries}} \newcommand\subsection{\@startsection{subsection}{2}{\z@}% {-3.25ex\@plus -1ex \@minus -.2ex}% {1.5ex \@plus .2ex}% {\normalfont\large\bfseries}} \newcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% {-3.25ex\@plus -1ex \@minus -.2ex}% {1.5ex \@plus .2ex}% {\normalfont\normalsize\bfseries}} \newcommand\paragraph{\@startsection{paragraph}{4}{\z@}% {3.25ex \@plus1ex \@minus.2ex}% {-1em}% {\normalfont\normalsize\bfseries}} \newcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}% {3.25ex \@plus1ex \@minus .2ex}% {-1em}% {\normalfont\normalsize\bfseries}} \if@twocolumn \setlength\leftmargini {2em} \else \setlength\leftmargini {2.5em} \fi \leftmargin \leftmargini \setlength\leftmarginii {2.2em} \setlength\leftmarginiii {1.87em} \setlength\leftmarginiv {1.7em} \if@twocolumn \setlength\leftmarginv {.5em} \setlength\leftmarginvi {.5em} \else \setlength\leftmarginv {1em} \setlength\leftmarginvi {1em} \fi \setlength \labelsep {.5em} \setlength \labelwidth{\leftmargini} \addtolength\labelwidth{-\labelsep} \@beginparpenalty -\@lowpenalty \@endparpenalty -\@lowpenalty \@itempenalty -\@lowpenalty \renewcommand\theenumi{\@arabic\c@enumi} \renewcommand\theenumii{\@alph\c@enumii} \renewcommand\theenumiii{\@roman\c@enumiii} \renewcommand\theenumiv{\@Alph\c@enumiv} \newcommand\labelenumi{\theenumi.} \newcommand\labelenumii{(\theenumii)} \newcommand\labelenumiii{\theenumiii.} \newcommand\labelenumiv{\theenumiv.} \renewcommand\p@enumii{\theenumi} \renewcommand\p@enumiii{\theenumi(\theenumii)} \renewcommand\p@enumiv{\p@enumiii\theenumiii} \newcommand\labelitemi{\textbullet} \newcommand\labelitemii{\normalfont\bfseries \textendash} \newcommand\labelitemiii{\textasteriskcentered} \newcommand\labelitemiv{\textperiodcentered} \newenvironment{description} {\list{}{\labelwidth\z@ \itemindent-\leftmargin \let\makelabel\descriptionlabel}} {\endlist} \newcommand*\descriptionlabel[1]{\hspace\labelsep \normalfont\bfseries #1} \if@titlepage \newenvironment{abstract}{% \titlepage \null\vfil \@beginparpenalty\@lowpenalty \begin{center}% \bfseries \abstractname \@endparpenalty\@M \end{center}}% {\par\vfil\null\endtitlepage} \else \newenvironment{abstract}{% \if@twocolumn \section*{\abstractname}% \else \small \begin{center}% {\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}% \end{center}% \quotation \fi} {\if@twocolumn\else\endquotation\fi} \fi \newenvironment{verse} {\let\\\@centercr \list{}{\itemsep \z@ \itemindent -1.5em% \listparindent\itemindent \rightmargin \leftmargin \advance\leftmargin 1.5em}% \item\relax} {\endlist} \newenvironment{quotation} {\list{}{\listparindent 1.5em% \itemindent \listparindent \rightmargin \leftmargin \parsep \z@ \@plus\p@}% \item\relax} {\endlist} \newenvironment{quote} {\list{}{\rightmargin\leftmargin}% \item\relax} {\endlist} \if@compatibility \newenvironment{titlepage} {% \if@twocolumn \@restonecoltrue\onecolumn \else \@restonecolfalse\newpage \fi \thispagestyle{empty}% \setcounter{page}\z@ }% {\if@restonecol\twocolumn \else \newpage \fi } \else \newenvironment{titlepage} {% \if@twocolumn \@restonecoltrue\onecolumn \else \@restonecolfalse\newpage \fi \thispagestyle{empty}% \setcounter{page}\@ne }% {\if@restonecol\twocolumn \else \newpage \fi \if@twoside\else \setcounter{page}\@ne \fi } \fi \newcommand\appendix{\par \setcounter{section}{0}% \setcounter{subsection}{0}% \gdef\thesection{\@Alph\c@section}} \setlength\arraycolsep{5\p@} \setlength\tabcolsep{6\p@} \setlength\arrayrulewidth{.4\p@} \setlength\doublerulesep{2\p@} \setlength\tabbingsep{\labelsep} \skip\@mpfootins = \skip\footins \setlength\fboxsep{3\p@} \setlength\fboxrule{.4\p@} \renewcommand \theequation {\@arabic\c@equation} \newcounter{figure} \renewcommand \thefigure {\@arabic\c@figure} \def\fps@figure{tbp} \def\ftype@figure{1} \def\ext@figure{lof} \def\fnum@figure{\figurename~\thefigure} \newenvironment{figure} {\@float{figure}} {\end@float} \newenvironment{figure*} {\@dblfloat{figure}} {\end@dblfloat} \newcounter{table} \renewcommand\thetable{\@arabic\c@table} \def\fps@table{tbp} \def\ftype@table{2} \def\ext@table{lot} \def\fnum@table{\tablename~\thetable} \newenvironment{table} {\@float{table}} {\end@float} \newenvironment{table*} {\@dblfloat{table}} {\end@dblfloat} \newlength\abovecaptionskip \newlength\belowcaptionskip \setlength\abovecaptionskip{10\p@} \setlength\belowcaptionskip{0\p@} \long\def\@makecaption#1#2{% \vskip\abovecaptionskip \sbox\@tempboxa{#1: #2}% \ifdim \wd\@tempboxa >\hsize #1: #2\par \else \global \@minipagefalse \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% \fi \vskip\belowcaptionskip} \DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm} \DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf} \DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt} \DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf} \DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit} \DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl} \DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc} \DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal} \DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal} \newcommand\@pnumwidth{1.55em} \newcommand\@tocrmarg{2.55em} \newcommand\@dotsep{4.5} \setcounter{tocdepth}{3} \newcommand\tableofcontents{% \section*{\contentsname \@mkboth{% \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}% \@starttoc{toc}% } \newcommand*\l@part[2]{% \ifnum \c@tocdepth >-2\relax \addpenalty\@secpenalty \addvspace{2.25em \@plus\p@}% \begingroup \parindent \z@ \rightskip \@pnumwidth \parfillskip -\@pnumwidth {\leavevmode \large \bfseries #1\hfil \hb@xt@\@pnumwidth{\hss #2}}\par \nobreak \if@compatibility \global\@nobreaktrue \everypar{\global\@nobreakfalse\everypar{}}% \fi \endgroup \fi} \newcommand*\l@section[2]{% \ifnum \c@tocdepth >\z@ \addpenalty\@secpenalty \addvspace{1.0em \@plus\p@}% \setlength\@tempdima{1.5em}% \begingroup \parindent \z@ \rightskip \@pnumwidth \parfillskip -\@pnumwidth \leavevmode \bfseries \advance\leftskip\@tempdima \hskip -\leftskip #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par \endgroup \fi} \newcommand*\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}} \newcommand*\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}} \newcommand*\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}} \newcommand*\l@subparagraph{\@dottedtocline{5}{10em}{5em}} \newcommand\listoffigures{% \section*{\listfigurename \@mkboth{\MakeUppercase\listfigurename}% {\MakeUppercase\listfigurename}}% \@starttoc{lof}% } \newcommand*\l@figure{\@dottedtocline{1}{1.5em}{2.3em}} \newcommand\listoftables{% \section*{\listtablename \@mkboth{% \MakeUppercase\listtablename}{\MakeUppercase\listtablename}}% \@starttoc{lot}% } \let\l@table\l@figure \newdimen\bibindent \setlength\bibindent{1.5em} \newenvironment{thebibliography}[1] { \section{\refname} % \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}}% \list{}%\@biblabel{\@arabic\c@enumiv} {\settowidth\labelwidth{\@biblabel{#1}}% \leftmargin\labelwidth \advance\leftmargin\labelsep \@openbib@code \usecounter{enumiv}% \let\p@enumiv\@empty \renewcommand\theenumiv{}}%\@arabic\c@enumiv \sloppy \clubpenalty4000 \@clubpenalty \clubpenalty \widowpenalty4000% \sfcode`\.\@m} {\def\@noitemerr {\@latex@warning{Empty `thebibliography' environment}}% \endlist} \newcommand\newblock{\hskip .11em\@plus.33em\@minus.07em} \let\@openbib@code\@empty \newenvironment{theindex} {\if@twocolumn \@restonecolfalse \else \@restonecoltrue \fi \columnseprule \z@ \columnsep 35\p@ \twocolumn[\section*{\indexname}]% \@mkboth{\MakeUppercase\indexname}% {\MakeUppercase\indexname}% \thispagestyle{plain}\parindent\z@ \parskip\z@ \@plus .3\p@\relax \let\item\@idxitem} {\if@restonecol\onecolumn\else\clearpage\fi} \newcommand\@idxitem{\par\hangindent 40\p@} \newcommand\subitem{\@idxitem \hspace*{20\p@}} \newcommand\subsubitem{\@idxitem \hspace*{30\p@}} \newcommand\indexspace{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax} \renewcommand\footnoterule{% \kern-3\p@ \hrule\@width.4\columnwidth \kern2.6\p@} \newcommand\@makefntext[1]{% \parindent 1em% \noindent \hb@xt@1.8em{\hss\@makefnmark}#1} \newcommand\contentsname{Contents} \newcommand\listfigurename{List of Figures} \newcommand\listtablename{List of Tables} \newcommand\refname{} \newcommand\indexname{Index} \newcommand\figurename{Figure} \newcommand\tablename{Table} \newcommand\partname{Part} \newcommand\appendixname{Appendix} \newcommand\abstractname{Abstract} \def\today{\ifcase\month\or January\or February\or March\or April\or May\or June\or July\or August\or September\or October\or November\or December\fi \space\number\day, \number\year} \setlength\columnsep{10\p@} \setlength\columnseprule{0\p@} \pagestyle{plain} \pagenumbering{arabic} \if@twoside \else \raggedbottom \fi \if@twocolumn \twocolumn \sloppy \flushbottom \else \onecolumn \fi \endinput %% %% End of file `article.cls'. diff --git a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/cvBibMake.tex b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/cvBibMake.tex index dc63a1623..7d20b200c 100644 --- a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/cvBibMake.tex +++ b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/cvBibMake.tex @@ -1,5 +1,5 @@ -%\write18{if [ `kpsewhich economics.bib` != '' ]; then touch economics.bib ; fi} # This should be done only for final versions AFTER bibexport has occurred and \jobname.bib is populated +%\write18{if [ `kpsewhich economics.bib` != '' ]; then touch economics.bib ; fi} # This should be done only for final versions AFTER bibexport has occurred and \jobname.bib is populated %\write18{if [ ! -f \jobname.bib ]; then touch \jobname.bib ; fi} %\write18{if [ ! -f \jobname-Add.bib ]; then touch \jobname-Add.bib ; fi} diff --git a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/econtex.cls b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/econtex.cls index 78210b420..1a7291c71 100644 --- a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/econtex.cls +++ b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/econtex.cls @@ -1,11 +1,11 @@ %%% LaTeX class for economics %%% %%% author: Christopher Carroll -%%% license: LaTeX Project Public License +%%% license: LaTeX Project Public License %%% %%% Modified from style itaxpf by Arne Henningsen %%% version: 1.0 (09 July 2007) -%%% license: LaTeX Project Public License +%%% license: LaTeX Project Public License %%% %%% Further information is available at %%% http://www.uni-kiel.de/agrarpol/ahenningsen/latex-bibtex.html @@ -73,8 +73,8 @@ %% Added the above info to the definition of normalsize \def\normalsize{\@setfontsize \normalsize \@xiipt {14.5} - \abovedisplayskip 6\p@ \@plus 3\p@ \@minus 3\p@ - \belowdisplayskip \abovedisplayskip + \abovedisplayskip 6\p@ \@plus 3\p@ \@minus 3\p@ + \belowdisplayskip \abovedisplayskip \abovedisplayshortskip 6pt \belowdisplayshortskip 6pt \let \@listi \@listI} \normalsize @@ -110,7 +110,7 @@ ,moreverb ,hhline % Allow double hlines ,tipa % Define more characters, in particular the \textthorn character - ,xcolor % Superceded color, which is WAY out of date + ,xcolor % Superceded color, which is WAY out of date ,accents ,appendix } @@ -126,8 +126,8 @@ % ---------------Custom Definitions-------------- -\def\liminf{\mathop{\rm lim\, inf}\limits} -\DeclareMathOperator{\Ex}{\mathbb{E}} % Expectations operator +\def\liminf{\mathop{\rm lim\, inf}\limits} +\DeclareMathOperator{\Ex}{\mathbb{E}} % Expectations operator \def\var{\operatorname{var}} % variance \def\cov{\operatorname{cov}} % covariance \def\std{\operatorname{std}} % standard deviation @@ -150,7 +150,7 @@ % To prevent breaking math formula \relpenalty=4000 %from 0 to 10000, default is 500 -% To prevent breaking math formula after binary operator +% To prevent breaking math formula after binary operator \binoppenalty=10000 %from 0 to 10000, default is 700 % -------------------------------------------------------- @@ -220,7 +220,7 @@ \let\footnotesize\scriptsize \thispagestyle{empty} \vspace*{0mm} - \enlargethispage{0.4in} + \enlargethispage{0.4in} }{} \begin{center} \begin{LARGE} @@ -228,7 +228,7 @@ \textbf{\@title} \end{spacing} \end{LARGE}\medskip\medskip\medskip - {\normalsize \@date \par} + {\normalsize \@date \par} {\tiny{~}\par} \ifthenelse{\equal{\theIncludeTitlePage}{1}}{ \vspace*{3mm} @@ -249,7 +249,7 @@ \let\footnotesize\scriptsize \thispagestyle{empty} \vspace*{0mm} - \enlargethispage{0.4in} + \enlargethispage{0.4in} }{} \begin{center} \begin{LARGE} @@ -257,7 +257,7 @@ \textbf{\@title} \end{spacing} \end{LARGE}\medskip\medskip\medskip - {\normalsize #1 \par} + {\normalsize #1 \par} {\tiny{~}\par} \ifthenelse{\equal{\theIncludeTitlePage}{1}}{ \vspace*{3mm} @@ -286,7 +286,7 @@ \vspace*{4mm} \abstractSizeDefault \noindent \textbf{Abstract}\\ - \indent + \indent }{% \noindent {\tiny \phantom{.}} \\ % Trick to get proper spacing in html \ifdvi @@ -338,7 +338,7 @@ \pagestyle{plain} \thispagestyle{empty} -\newcommand{\titlepagefinish}{\newpage +\newcommand{\titlepagefinish}{\newpage \renewcommand\@makefnmark {\mbox{\textsuperscript{\tiny\@thefnmark}}} } @@ -359,11 +359,11 @@ %%% the original code. %% Sample use: -%% \author{Christopher D. Carroll\authNum \\ +%% \author{Christopher D. Carroll\authNum \\ %% \and -%% Jiri Slacalek\authNum \\ +%% Jiri Slacalek\authNum \\ %% \and -%% Martin Sommer\authNum \\ +%% Martin Sommer\authNum \\ %% \and %% Another Name\authNum %% \and diff --git a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/econtex.sty b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/econtex.sty index fcefb5736..1147b1e85 100644 --- a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/econtex.sty +++ b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/econtex.sty @@ -1,7 +1,7 @@ %---------------Custom Definitions-------------- -\def\liminf{\mathop{\rm lim\, inf}\limits} -\DeclareMathOperator{\Ex}{\mathbb{E}} % Expectations operator +\def\liminf{\mathop{\rm lim\, inf}\limits} +\DeclareMathOperator{\Ex}{\mathbb{E}} % Expectations operator \def\var{\operatorname{var}} % variance \def\cov{\operatorname{cov}} % covariance \def\std{\operatorname{std}} % standard deviation @@ -24,11 +24,7 @@ %To prevent breaking math formula \relpenalty=4000 %from 0 to 10000, default is 500 -%To prevent breaking math formula after binary operator +%To prevent breaking math formula after binary operator \binoppenalty=10000 %from 0 to 10000, default is 700 %-------------------------------------------------------- - - - - diff --git a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/econtexBibMake.tex b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/econtexBibMake.tex index ad524e192..cb5ae56f5 100644 --- a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/econtexBibMake.tex +++ b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/econtexBibMake.tex @@ -1,5 +1,5 @@ -%\write18{if [ `kpsewhich economics.bib` != '' ]; then touch economics.bib ; fi} # This should be done only for final versions AFTER bibexport has occurred and \jobname.bib is populated +%\write18{if [ `kpsewhich economics.bib` != '' ]; then touch economics.bib ; fi} # This should be done only for final versions AFTER bibexport has occurred and \jobname.bib is populated \write18{if [ ! -f \jobname.bib ]; then touch \jobname.bib ; fi} \write18{if [ ! -f \jobname-Add.bib ]; then touch \jobname-Add.bib ; fi} diff --git a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/econtexSetup.sty b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/econtexSetup.sty index f7a4f6183..544e1ab31 100644 --- a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/econtexSetup.sty +++ b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/econtexSetup.sty @@ -1,7 +1,7 @@ \RequirePackage{wasysym -,psibycus % Greek language package, including koppa +,psibycus % Greek language package, including koppa ,ushort -%,lscape % Pages in landscape mode go inside \begin{landscape}\end{landscape} % CONFLICTS WITH EPSTOPDF +%,lscape % Pages in landscape mode go inside \begin{landscape}\end{landscape} % CONFLICTS WITH EPSTOPDF } \newenvironment{CDCPrivate} % Environment for extra material not wanted in the public document @@ -22,7 +22,7 @@ \setboolean{BigAndWide}{true} \setboolean{BigAndWide}{false} -% Options to set if being run from the shell (so autocompiled) +% Options to set if being run from the shell (so autocompiled) \opt{FromShell}{ \setboolean{bigPrint}{false} \setboolean{wideMargins}{false} @@ -60,7 +60,7 @@ } % Keep the elements in the argument #1 together on the same page -\newcommand{\together}[1]{\noindent\parbox{\linewidth}{#1}} +\newcommand{\together}[1]{\noindent\parbox{\linewidth}{#1}} % html version of document must be constructed by running pdflatex in % dvi output mode; code below creates an ifdvi construct that detects @@ -74,7 +74,7 @@ % dvi compilation only occurs if making the html version \ifdvi - \setboolean{Web}{true} + \setboolean{Web}{true} \RequirePackage{tex4ht} \RequirePackage{graphicx} \RequirePackage[tex4ht]{hyperref} @@ -123,7 +123,7 @@ % \RequirePackage[pdftex]{graphicx} \RequirePackage{graphicx} % requiring [pdftex] seems to interfere with Pandemic build % \RequirePackage[plainpages=false]{hyperref} - \RequirePackage{hyperref} % plainpages seems to mess up BST + \RequirePackage{hyperref} % plainpages seems to mess up BST \hypersetup{ pdffitwindow = false, % Don't rescale to fit size of window pdfpagemode=UseThumbs, @@ -145,7 +145,7 @@ \definecolor{darkred}{rgb}{0.3,0,0} \hypersetup{colorlinks=true, % put a box around links linkbordercolor = {1 0 0}, % the box will be red - pdfborder = {1 0 0}, % + pdfborder = {1 0 0}, % % bookmarks=true, % PDF will contain an index on the RHS urlcolor=darkred, citecolor=darkblue, @@ -174,7 +174,7 @@ \newcommand{\Aggregation}{\href{https://www.econ2.jhu.edu/people/ccarroll/public/lecturenotes/MathFacts/Aggregation.pdf}{\texttt{Aggregation}}} -% If doing a web version, renewcommands link to the html versions of handouts +% If doing a web version, renewcommands link to the html versions of handouts \ifdvi \renewcommand{\handoutC}[1]{\href{https://www.econ2.jhu.edu/people/ccarroll/public/lecturenotes/consumption/#1}{\texttt{#1}}} \renewcommand{\handoutA}[1]{\href{https://www.econ2.jhu.edu/people/ccarroll/public/lecturenotes/AssetPricing/#1}{\texttt{#1}}} @@ -235,8 +235,3 @@ \end{quote} } {#2}} - - - - - diff --git a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/econtexShortcuts.sty b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/econtexShortcuts.sty index de56b7def..d2e7f24f3 100755 --- a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/econtexShortcuts.sty +++ b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/econtexShortcuts.sty @@ -75,7 +75,7 @@ \providecommand{\CLev}{\ensuremath{C}} \providecommand{\Cons}{\ensuremath{C}} \providecommand{\cons}{\ensuremath{c}} -\providecommand{\corr}{\varrho} +\providecommand{\corr}{\varrho} \providecommand{\cPDVFunc}{\ensuremath{\mathbb{C}}} \providecommand{\CPDV}{\ensuremath{\text{PDV($C$)}}} \providecommand{\cPPP}{\cons^{\prime\prime\prime}} @@ -105,7 +105,7 @@ \providecommand{\DeprFac}{\ensuremath{\daleth}} \providecommand{\Depr}{\ensuremath{\daleth}} \providecommand{\depr}{\ensuremath{\delta}} -\providecommand{\deprRte}{\ensuremath{\delta}} % New +\providecommand{\deprRte}{\ensuremath{\delta}} % New \providecommand{\DiscAltuAdj}{\ensuremath{\underline{\underline{\beth}}}} \providecommand{\DiscAlt}{\ensuremath{\beth}} \providecommand{\Discount}{\ensuremath{\beta}} @@ -116,7 +116,7 @@ \providecommand{\DivGro}{\ensuremath{\mathrm{G}}} \providecommand{\divGro}{\ensuremath{\mathsf{g}}} \providecommand{\Div}{\ensuremath{D}} -% \providecommand{\div}{\ensuremath{d}} reserved for divide +% \providecommand{\div}{\ensuremath{d}} reserved for divide \providecommand{\DLev}{\ensuremath{D}} \providecommand{\Dvdnd}{\ensuremath{\mathbf{D}}} \providecommand{\dvdnd}{\ensuremath{d}} @@ -128,7 +128,7 @@ \providecommand{\ek}{\ensuremath{\lambda}} \providecommand{\EmpGro}{\ensuremath{\Xi}} \providecommand{\empGro}{\ensuremath{\xi}} -\providecommand{\empState}{\xi} % employment state indicator variable +\providecommand{\empState}{\xi} % employment state indicator variable \providecommand{\EpremLog}{\varphi} % Not using regular \eprem because want to distinguish between \varphi = log E_{t}[\Phi_{t+1}] and \phi_{t} = E[\log \Phi_{t}] \providecommand{\EPrem}{\Phi} % equity premium \providecommand{\eprem}{\phi} % log equity premium @@ -194,7 +194,7 @@ \providecommand{\inv}{{i}} \providecommand{\IRat}{\ensuremath{I}} \providecommand{\iRat}{\ensuremath{i}} -\providecommand{\itc}{\ensuremath{\zeta}} +\providecommand{\itc}{\ensuremath{\zeta}} \providecommand{\jFunc}{\ensuremath{\mathrm{j}}} \providecommand{\JLev}{\ensuremath{J}} \providecommand{\kapRent}{\ensuremath{\varkappa}} @@ -213,12 +213,12 @@ \providecommand{\kRat}{\ensuremath{k}} \providecommand{\kTargE}{\ensuremath{\Target{k}^{e}}} \providecommand{\kTarg}{\ensuremath{\Target{k}}} -\providecommand{\labor}{\ensuremath{\ell}} % +\providecommand{\labor}{\ensuremath{\ell}} % \providecommand{\Labor}{\ensuremath{L}} \providecommand{\labShare}{\ensuremath{\nu}} -\providecommand{\Leisure}{Z} % -\providecommand{\leisure}{z} % -\providecommand{\leiShare}{\ensuremath{\zeta}} % +\providecommand{\Leisure}{Z} % +\providecommand{\leisure}{z} % +\providecommand{\leiShare}{\ensuremath{\zeta}} % \providecommand{\LGro}{\ensuremath{\Lambda}} \providecommand{\lGro}{\ensuremath{\lambda}} \providecommand{\LLevBF}{\ensuremath{\mathbf{L}}} @@ -265,7 +265,7 @@ %\providecommand{\m}{\ensuremath{m}} %\providecommand{\M}{\ensuremath{M}} %\providecommand{\next}{2} % via search-and-replace -\providecommand{\Next}{t+1} % +\providecommand{\Next}{t+1} % \providecommand{\nFunc}{\ensuremath{\mathrm{n}}} \providecommand{\NLev}{\ensuremath{N}} \providecommand{\nLev}{\ensuremath{n}} @@ -296,9 +296,9 @@ \providecommand{\pDeadRate}{\ensuremath{\grave{\cancel{\mathsf{d}}}}} \providecommand{\pDead}{\ensuremath{\mathfrak{D}}} \providecommand{\pDieRate}{\ensuremath{\grave{\mathsf{d}}}} -\providecommand{\pDies}{\ensuremath{\mathsf{d}}} % Continuous time death rate +\providecommand{\pDies}{\ensuremath{\mathsf{d}}} % Continuous time death rate \providecommand{\PDies}{\ensuremath{\mathsf{D}}} % Discrete-time one-period death rate -\providecommand{\diePrb}{\ensuremath{\mathsf{d}}} % Continuous time death rate +\providecommand{\diePrb}{\ensuremath{\mathsf{d}}} % Continuous time death rate \providecommand{\DiePrb}{\ensuremath{\mathsf{D}}} % Discrete-time one-period death rate \providecommand{\PDV}{\ensuremath{\mathbb{P}}} % PDV \providecommand{\PGroAdj}{\ensuremath{\underline{\PGro}}} @@ -333,7 +333,7 @@ \providecommand{\PopLev}{\ensuremath{\pmb{N}}} \providecommand{\PopU}{\mathcal{U}} \providecommand{\Pop}{\ensuremath{L}} -\providecommand{\PostITC}{\ensuremath{\cancel{\zeta}}} +\providecommand{\PostITC}{\ensuremath{\cancel{\zeta}}} \providecommand{\power}{\ensuremath{\eta}} \providecommand{\pPDVFunc}{\ensuremath{\mathbb{P}}} \providecommand{\PPDV}{\ensuremath{\text{PDV($P$)}}} @@ -345,17 +345,17 @@ \providecommand{\prudEx}{\ensuremath{\omega}} \providecommand{\prud}{\ensuremath{\eta}} \providecommand{\pSav}{\ensuremath{\phi}} -\providecommand{\pShkMin}{\underline{\psi}} % -\providecommand{\PShk}{\Psi} % +\providecommand{\pShkMin}{\underline{\psi}} % +\providecommand{\PShk}{\Psi} % \providecommand{\PermShkAgg}{\Psi} % New \providecommand{\PermShk}{\Psi} % New \providecommand{\permShk}{\psi} % New -\providecommand{\pShk}{\psi} % +\providecommand{\pShk}{\psi} % \providecommand{\permShkInd}{\psi} % New -\providecommand{\pshk}{\psi} % +\providecommand{\pshk}{\psi} % \providecommand{\PtyGro}{\ensuremath{\Phi}} \providecommand{\ptyGro}{\ensuremath{\phi}} -\providecommand{\PtyLab}{\ensuremath{\mathrm{Z}}} % Labor productivity +\providecommand{\PtyLab}{\ensuremath{\mathrm{Z}}} % Labor productivity \providecommand{\ptyLab}{\ensuremath{z}} % usually, log of \PtyLab \providecommand{\PtyLev}{\ensuremath{A}} % Multiplies overall production function \providecommand{\ptyLev}{\ensuremath{a}} % Usually, log of \PtyLev @@ -368,7 +368,7 @@ \providecommand{\Rev}{\ensuremath{\Pi}} \providecommand{\rev}{\ensuremath{\pi}} \providecommand{\rfree}{\ensuremath{\mathsf{r}}} % The net return on the safe asset at an annual rate -\providecommand{\Rfree}{\ensuremath{\mathsf{R}}} % The return factor on the safe asset - unfortunately mathfrak fonts don't come through for tth +\providecommand{\Rfree}{\ensuremath{\mathsf{R}}} % The return factor on the safe asset - unfortunately mathfrak fonts don't come through for tth \providecommand{\RFunc}{\ensuremath{\mathrm{R}}} \providecommand{\RGross}{\ensuremath{\breve{\mathsf{R}}}} \providecommand{\rGross}{\ensuremath{\breve{\mathsf{r}}}} @@ -378,14 +378,14 @@ \providecommand{\riskyAlt}{\ensuremath{\pmb{\mathfrak{r}}}} % The net return on the risky asset annual rate \providecommand{\riskyshare}{\ensuremath{\varsigma}} \providecommand{\Risky}{\ensuremath{\mathbf{R}}} % The return on the risky asset -\providecommand{\risky}{\ensuremath{\mathbf{r}}} % The net return on the risky asset annual rate +\providecommand{\risky}{\ensuremath{\mathbf{r}}} % The net return on the risky asset annual rate \providecommand{\RLev}{\ensuremath{R}} % Rate of return (but better to use \Rfree or \Risky or something else more specific \providecommand{\RnormWGro}{\ensuremath{\mathcal{R}_{\WGro}}} % Normalized version of riskless return factor \providecommand{\rnormwGro}{\ensuremath{\mathit{r}_{\wGro}}} % Normalized version of riskless rate of return \providecommand{\Rnorm}{\ensuremath{\mathcal{R}}} % Normalized version of riskless return factor \providecommand{\rnorm}{\ensuremath{\mathit{r}}} % Normalized version of riskless rate of return \providecommand{\Rport}{\ensuremath{\mathbbmss{R}}} % Portfolio -weighted return -\providecommand{\rport}{\ensuremath{\mathbbmss{r}}} +\providecommand{\rport}{\ensuremath{\mathbbmss{r}}} \providecommand{\Rprod}{\ensuremath{\mathscr{R}}} \providecommand{\rprod}{\ensuremath{\mathscr{r}}} \providecommand{\rProd}{\ensuremath{\mathsf{r}}} @@ -396,8 +396,8 @@ \providecommand{\rboro}{\ensuremath{\bar{\rfree}}} %\providecommand{\R}{\Rfree} \providecommand{\saveRate}{\grave{s}} % saving (income minus consumption) over income -\providecommand{\Save}{S} % Saving (income minus consumption) -\providecommand{\save}{s} % saving (income minus consumption) +\providecommand{\Save}{S} % Saving (income minus consumption) +\providecommand{\save}{s} % saving (income minus consumption) \providecommand{\SDF}{\MLev} % Stochastic Discount Factor \providecommand{\sdr}{\mRat} % Stochastic Discount rate \providecommand{\Seniority}{\ensuremath{\mathsf{X}}} @@ -411,9 +411,9 @@ \providecommand{\sFunc}{\ensuremath{\mathrm{s}}} \providecommand{\shk}{\phi} \providecommand{\Shk}{\Phi} -\providecommand{\ShkLogZeroLogStd}{\sigma_{\cancel{\ShkMeanOneLog}}} % Std of that shock -\providecommand{\ShkLogZeroLogVar}{\sigma_{\cancel{\ShkMeanOneLog}}^{2}} % Variance of that shock -\providecommand{\ShkLogZeroLog}{\cancel{\ShkMeanOneLog}} % Log of that shock +\providecommand{\ShkLogZeroLogStd}{\sigma_{\cancel{\ShkMeanOneLog}}} % Std of that shock +\providecommand{\ShkLogZeroLogVar}{\sigma_{\cancel{\ShkMeanOneLog}}^{2}} % Variance of that shock +\providecommand{\ShkLogZeroLog}{\cancel{\ShkMeanOneLog}} % Log of that shock \providecommand{\ShkLogZero}{\cancel{\ShkMeanOne}} % A shock whose expectation in logs is zero; cancellation of the nonzero mean for the mean one shock \providecommand{\ShkMeanOneLogStd}{\sigma_{\ShkMeanOneLog}} % Std of that shock \providecommand{\ShkMeanOneLogVar}{\sigma^{2}_{\ShkMeanOneLog}} % Log of that shock @@ -477,16 +477,16 @@ \providecommand{\TLev}{\ensuremath{T}} \providecommand{\TMap}{\mathscr{T}} \providecommand{\tNow}{\ensuremath{t}} -\providecommand{\tShkAll}{\xi} % -\providecommand{\tShkEmpMin}{\underline{\theta}} % -\providecommand{\TShkEmp}{\Theta} % -\providecommand{\tShkEmp}{\theta} % -\providecommand{\tShkEmp}{\theta} % +\providecommand{\tShkAll}{\xi} % +\providecommand{\tShkEmpMin}{\underline{\theta}} % +\providecommand{\TShkEmp}{\Theta} % +\providecommand{\tShkEmp}{\theta} % +\providecommand{\tShkEmp}{\theta} % \providecommand{\tranShkInd}{\theta} % New \providecommand{\TranShkAgg}{\Theta} % New -\providecommand{\TShk}{\Xi} % -\providecommand{\tShk}{\xi} % -\providecommand{\tshk}{\xi} % +\providecommand{\TShk}{\Xi} % +\providecommand{\tShk}{\xi} % +\providecommand{\tshk}{\xi} % \providecommand{\tSS}{\ensuremath{t}} \providecommand{\tThen}{\ensuremath{\tau}} \providecommand{\uFunc}{{\ensuremath{\mathrm{u}}}} @@ -545,8 +545,8 @@ \providecommand{\wBeg}{\kLev} % wealth as of the beginning of the period (before R is received, not including Y) \providecommand{\Wealth}{\ensuremath{O}} \providecommand{\wealth}{\ensuremath{o}} -\providecommand{\WEndRat}{\ARat} % -\providecommand{\wEndRat}{\aRat} % +\providecommand{\WEndRat}{\ARat} % +\providecommand{\wEndRat}{\aRat} % \providecommand{\WEnd}{\ALev} % Wealth as of the end of the period (after C has been chosen) \providecommand{\wEnd}{\aLev} % wealth as of the end of the period (after C has been taken) \providecommand{\Wend}{\ARat} % Wealth as of the end of the period (after C has been chosen) @@ -556,9 +556,9 @@ \providecommand{\WGro}{\ensuremath{\mathrm{G}}} \providecommand{\wGro}{\ensuremath{\mathsf{g}}} \providecommand{\whumMin}{\underline{\hRat}} % human wealth -- individual -\providecommand{\WHum}{\HLev} % Human wealth -- aggregate +\providecommand{\WHum}{\HLev} % Human wealth -- aggregate \providecommand{\wHum}{\hLev} % human wealth -- individual -\providecommand{\Whum}{\HRat} % Human wealth -- aggregate +\providecommand{\Whum}{\HRat} % Human wealth -- aggregate \providecommand{\whum}{\hRat} % human wealth -- individual \providecommand{\WLev}{\ensuremath{W}} \providecommand{\wLev}{\pmb{w}} @@ -570,15 +570,15 @@ \providecommand{\WMkt}{\MLev} % Wealth as of the middle of the period (after R is received, including Y) \providecommand{\wMkt}{\mLev} % wealth as of the middle of the period (after R is received, including Y) \providecommand{\wmkt}{\mLev} % wealth as of the middle of the period (after R is received, including Y) -\providecommand{\wNet}{\ensuremath{x}} % +\providecommand{\wNet}{\ensuremath{x}} % \providecommand{\WNet}{\ensuremath{X}} % Total wealth \providecommand{\WPre}{{K}} \providecommand{\wPre}{{k}} -\providecommand{\wRat}{\ensuremath{o}} % +\providecommand{\wRat}{\ensuremath{o}} % \providecommand{\WRat}{\ensuremath{O}} % Ratio to permanent income -\providecommand{\wTot}{\ensuremath{\mathbf{o}}} % +\providecommand{\wTot}{\ensuremath{\mathbf{o}}} % \providecommand{\WTot}{\ensuremath{\mathbf{O}}} % Total wealth -\providecommand{\wtot}{\ensuremath{o}} % +\providecommand{\wtot}{\ensuremath{o}} % \providecommand{\Wtot}{\ensuremath{O}} % Total wealth \providecommand{\xFer}{\chi} \providecommand{\XFer}{X} @@ -660,4 +660,3 @@ \newcommand{\GPF}{{\mbox{GPF}}} \newcommand{\GPFAgg}{{\mbox{GPF-Agg}}} \newcommand{\FHWF}{\mbox{FHWF}} - diff --git a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/handout.cls b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/handout.cls index 886d44d1e..a972f7865 100644 --- a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/handout.cls +++ b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/handout.cls @@ -1,11 +1,11 @@ %%% LaTeX class for economics %%% %%% author: Christopher Carroll -%%% license: LaTeX Project Public License +%%% license: LaTeX Project Public License %%% %%% Modified from style itaxpf by Arne Henningsen %%% version: 1.0 (09 July 2007) -%%% license: LaTeX Project Public License +%%% license: LaTeX Project Public License %%% %%% Further information is available at %%% http://www.uni-kiel.de/agrarpol/ahenningsen/latex-bibtex.html @@ -74,8 +74,8 @@ %% Added the above info to the definition of normalsize \def\normalsize{\@setfontsize \normalsize \@xiipt {14.5} - \abovedisplayskip 6\p@ \@plus 3\p@ \@minus 3\p@ - \belowdisplayskip \abovedisplayskip + \abovedisplayskip 6\p@ \@plus 3\p@ \@minus 3\p@ + \belowdisplayskip \abovedisplayskip \abovedisplayshortskip 6pt \belowdisplayshortskip 6pt \let \@listi \@listI} \normalsize @@ -111,7 +111,7 @@ ,moreverb ,hhline % Allow double hlines ,tipa % Define more characters, in particular the \textthorn character - ,xcolor % Superceded color, which is WAY out of date + ,xcolor % Superceded color, which is WAY out of date ,accents ,appendix } @@ -127,8 +127,8 @@ % ---------------Custom Definitions-------------- -\def\liminf{\mathop{\rm lim\, inf}\limits} -\DeclareMathOperator{\Ex}{\mathbb{E}} % Expectations operator +\def\liminf{\mathop{\rm lim\, inf}\limits} +\DeclareMathOperator{\Ex}{\mathbb{E}} % Expectations operator \def\var{\operatorname{var}} % variance \def\cov{\operatorname{cov}} % covariance \def\std{\operatorname{std}} % standard deviation @@ -151,7 +151,7 @@ % To prevent breaking math formula \relpenalty=4000 %from 0 to 10000, default is 500 -% To prevent breaking math formula after binary operator +% To prevent breaking math formula after binary operator \binoppenalty=10000 %from 0 to 10000, default is 700 % -------------------------------------------------------- @@ -221,7 +221,7 @@ \let\footnotesize\scriptsize \thispagestyle{empty} \vspace*{0mm} - \enlargethispage{0.4in} + \enlargethispage{0.4in} }{} \begin{center} \begin{LARGE} @@ -229,7 +229,7 @@ \textbf{\@title} \end{spacing} \end{LARGE}\medskip\medskip\medskip - {\normalsize \@date \par} + {\normalsize \@date \par} {\tiny{~}\par} \ifthenelse{\equal{\theIncludeTitlePage}{1}}{ \vspace*{3mm} @@ -250,7 +250,7 @@ \let\footnotesize\scriptsize \thispagestyle{empty} \vspace*{0mm} - \enlargethispage{0.4in} + \enlargethispage{0.4in} }{} \begin{center} \begin{LARGE} @@ -258,7 +258,7 @@ \textbf{\@title} \end{spacing} \end{LARGE}\medskip\medskip\medskip - {\normalsize #1 \par} + {\normalsize #1 \par} {\tiny{~}\par} \ifthenelse{\equal{\theIncludeTitlePage}{1}}{ \vspace*{3mm} @@ -287,7 +287,7 @@ \vspace*{4mm} \abstractSizeDefault \noindent \textbf{Abstract}\\ - \indent + \indent }{% \noindent {\tiny \phantom{.}} \\ % Trick to get proper spacing in html \ifdvi @@ -339,7 +339,7 @@ \pagestyle{plain} \thispagestyle{empty} -\newcommand{\titlepagefinish}{\newpage +\newcommand{\titlepagefinish}{\newpage \renewcommand\@makefnmark {\mbox{\textsuperscript{\tiny\@thefnmark}}} } @@ -360,11 +360,11 @@ %%% the original code. %% Sample use: -%% \author{Christopher D. Carroll\authNum \\ +%% \author{Christopher D. Carroll\authNum \\ %% \and -%% Jiri Slacalek\authNum \\ +%% Jiri Slacalek\authNum \\ %% \and -%% Martin Sommer\authNum \\ +%% Martin Sommer\authNum \\ %% \and %% Another Name\authNum %% \and diff --git a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/handout.sty b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/handout.sty index fcefb5736..1147b1e85 100755 --- a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/handout.sty +++ b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/handout.sty @@ -1,7 +1,7 @@ %---------------Custom Definitions-------------- -\def\liminf{\mathop{\rm lim\, inf}\limits} -\DeclareMathOperator{\Ex}{\mathbb{E}} % Expectations operator +\def\liminf{\mathop{\rm lim\, inf}\limits} +\DeclareMathOperator{\Ex}{\mathbb{E}} % Expectations operator \def\var{\operatorname{var}} % variance \def\cov{\operatorname{cov}} % covariance \def\std{\operatorname{std}} % standard deviation @@ -24,11 +24,7 @@ %To prevent breaking math formula \relpenalty=4000 %from 0 to 10000, default is 500 -%To prevent breaking math formula after binary operator +%To prevent breaking math formula after binary operator \binoppenalty=10000 %from 0 to 10000, default is 700 %-------------------------------------------------------- - - - - diff --git a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/handoutSetup.sty b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/handoutSetup.sty index f1328eb97..4c450334f 100644 --- a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/handoutSetup.sty +++ b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/handoutSetup.sty @@ -1,8 +1,8 @@ \usepackage{handoutShortcuts} \RequirePackage{wasysym -,psibycus % Greek language package, including koppa +,psibycus % Greek language package, including koppa ,ushort -%,lscape % Pages in landscape mode go inside \begin{landscape}\end{landscape} % CONFLICTS WITH EPSTOPDF +%,lscape % Pages in landscape mode go inside \begin{landscape}\end{landscape} % CONFLICTS WITH EPSTOPDF } \newenvironment{CDCPrivate} % Environment for extra material not wanted in the public document @@ -23,7 +23,7 @@ \setboolean{BigAndWide}{true} \setboolean{BigAndWide}{false} -% Options to set if being run from the shell (so autocompiled) +% Options to set if being run from the shell (so autocompiled) \opt{FromShell}{ \setboolean{bigPrint}{false} \setboolean{wideMargins}{false} @@ -61,7 +61,7 @@ } % Keep the elements in the argument #1 together on the same page -\newcommand{\together}[1]{\noindent\parbox{\linewidth}{#1}} +\newcommand{\together}[1]{\noindent\parbox{\linewidth}{#1}} % html version of document must be constructed by running pdflatex in % dvi output mode; code below creates an ifdvi construct that detects @@ -75,7 +75,7 @@ % dvi compilation only occurs if making the html version \ifdvi - \setboolean{Web}{true} + \setboolean{Web}{true} \RequirePackage{tex4ht} \RequirePackage{graphicx} \RequirePackage[tex4ht]{hyperref} @@ -144,7 +144,7 @@ \definecolor{darkred}{rgb}{0.6,0,0} \hypersetup{colorlinks=true, % put a box around links linkbordercolor = {1 0 0}, % the box will be red - pdfborder = {1 0 0}, % + pdfborder = {1 0 0}, % % bookmarks=true, % PDF will contain an index on the RHS urlcolor=darkred, citecolor=darkblue, @@ -179,7 +179,7 @@ \newcommand{\Aggregation}{\href{https://www.econ2.jhu.edu/people/ccarroll/public/lecturenotes/MathFacts/Aggregation.pdf}{\texttt{Aggregation}}} -% If doing a web version, renewcommands link to the html versions of handouts +% If doing a web version, renewcommands link to the html versions of handouts \ifdvi \renewcommand{\handoutC}[1]{\href{https://www.econ2.jhu.edu/people/ccarroll/public/lecturenotes/consumption/#1}{\texttt{#1}}} \renewcommand{\handoutA}[1]{\href{https://www.econ2.jhu.edu/people/ccarroll/public/lecturenotes/AssetPricing/#1}{\texttt{#1}}} diff --git a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/handoutShortcuts.sty b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/handoutShortcuts.sty index 1afa58937..214238be7 100644 --- a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/handoutShortcuts.sty +++ b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/handoutShortcuts.sty @@ -76,7 +76,7 @@ \providecommand{\CLev}{\ensuremath{C}} \providecommand{\Cons}{\ensuremath{C}} \providecommand{\cons}{\ensuremath{c}} -\providecommand{\corr}{\varrho} +\providecommand{\corr}{\varrho} \providecommand{\cPDVFunc}{\ensuremath{\mathbb{C}}} \providecommand{\CPDV}{\ensuremath{\text{PDV($C$)}}} \providecommand{\cPPP}{\cons^{\prime\prime\prime}} @@ -106,7 +106,7 @@ \providecommand{\DeprFac}{\ensuremath{\daleth}} \providecommand{\Depr}{\ensuremath{\daleth}} \providecommand{\depr}{\ensuremath{\delta}} -\providecommand{\deprRte}{\ensuremath{\delta}} % New +\providecommand{\deprRte}{\ensuremath{\delta}} % New \providecommand{\DiscAltuAdj}{\ensuremath{\underline{\underline{\beth}}}} \providecommand{\DiscAlt}{\ensuremath{\beth}} \providecommand{\Discount}{\ensuremath{\beta}} @@ -117,7 +117,7 @@ \providecommand{\DivGro}{\ensuremath{\mathrm{G}}} \providecommand{\divGro}{\ensuremath{\mathsf{g}}} \providecommand{\Div}{\ensuremath{D}} -% \providecommand{\div}{\ensuremath{d}} reserved for divide +% \providecommand{\div}{\ensuremath{d}} reserved for divide \providecommand{\DLev}{\ensuremath{D}} \providecommand{\Dvdnd}{\ensuremath{\mathbf{D}}} \providecommand{\dvdnd}{\ensuremath{d}} @@ -129,7 +129,7 @@ \providecommand{\ek}{\ensuremath{\lambda}} \providecommand{\EmpGro}{\ensuremath{\Xi}} \providecommand{\empGro}{\ensuremath{\xi}} -\providecommand{\empState}{\xi} % employment state indicator variable +\providecommand{\empState}{\xi} % employment state indicator variable \providecommand{\EpremLog}{\varphi} % Not using regular \eprem because want to distinguish between \varphi = log E_{t}[\Phi_{t+1}] and \phi_{t} = E[\log \Phi_{t}] \providecommand{\EPrem}{\Phi} % equity premium \providecommand{\eprem}{\phi} % log equity premium @@ -195,7 +195,7 @@ \providecommand{\inv}{{i}} \providecommand{\IRat}{\ensuremath{I}} \providecommand{\iRat}{\ensuremath{i}} -\providecommand{\itc}{\ensuremath{\zeta}} +\providecommand{\itc}{\ensuremath{\zeta}} \providecommand{\jFunc}{\ensuremath{\mathrm{j}}} \providecommand{\JLev}{\ensuremath{J}} \providecommand{\kapRent}{\ensuremath{\varkappa}} @@ -214,12 +214,12 @@ \providecommand{\kRat}{\ensuremath{k}} \providecommand{\kTargE}{\ensuremath{\Target{k}^{e}}} \providecommand{\kTarg}{\ensuremath{\Target{k}}} -\providecommand{\labor}{\ensuremath{\ell}} % +\providecommand{\labor}{\ensuremath{\ell}} % \providecommand{\Labor}{\ensuremath{L}} \providecommand{\labShare}{\ensuremath{\nu}} -\providecommand{\Leisure}{Z} % -\providecommand{\leisure}{z} % -\providecommand{\leiShare}{\ensuremath{\zeta}} % +\providecommand{\Leisure}{Z} % +\providecommand{\leisure}{z} % +\providecommand{\leiShare}{\ensuremath{\zeta}} % \providecommand{\LGro}{\ensuremath{\Lambda}} \providecommand{\lGro}{\ensuremath{\lambda}} \providecommand{\LLevBF}{\ensuremath{\mathbf{L}}} @@ -266,7 +266,7 @@ %\providecommand{\m}{\ensuremath{m}} %\providecommand{\M}{\ensuremath{M}} %\providecommand{\next}{2} % via search-and-replace -\providecommand{\Next}{t+1} % +\providecommand{\Next}{t+1} % \providecommand{\nFunc}{\ensuremath{\mathrm{n}}} \providecommand{\NLev}{\ensuremath{N}} \providecommand{\nLev}{\ensuremath{n}} @@ -297,9 +297,9 @@ \providecommand{\pDeadRate}{\ensuremath{\grave{\cancel{\mathsf{d}}}}} \providecommand{\pDead}{\ensuremath{\mathfrak{D}}} \providecommand{\pDieRate}{\ensuremath{\grave{\mathsf{d}}}} -\providecommand{\pDies}{\ensuremath{\mathsf{d}}} % Continuous time death rate +\providecommand{\pDies}{\ensuremath{\mathsf{d}}} % Continuous time death rate \providecommand{\PDies}{\ensuremath{\mathsf{D}}} % Discrete-time one-period death rate -\providecommand{\diePrb}{\ensuremath{\mathsf{d}}} % Continuous time death rate +\providecommand{\diePrb}{\ensuremath{\mathsf{d}}} % Continuous time death rate \providecommand{\DiePrb}{\ensuremath{\mathsf{D}}} % Discrete-time one-period death rate \providecommand{\PDV}{\ensuremath{\mathbb{P}}} % PDV \providecommand{\PGroAdj}{\ensuremath{\underline{\PGro}}} @@ -334,7 +334,7 @@ \providecommand{\PopLev}{\ensuremath{\pmb{N}}} \providecommand{\PopU}{\mathcal{U}} \providecommand{\Pop}{\ensuremath{L}} -\providecommand{\PostITC}{\ensuremath{\cancel{\zeta}}} +\providecommand{\PostITC}{\ensuremath{\cancel{\zeta}}} \providecommand{\power}{\ensuremath{\eta}} \providecommand{\pPDVFunc}{\ensuremath{\mathbb{P}}} \providecommand{\PPDV}{\ensuremath{\text{PDV($P$)}}} @@ -346,17 +346,17 @@ \providecommand{\prudEx}{\ensuremath{\omega}} \providecommand{\prud}{\ensuremath{\eta}} \providecommand{\pSav}{\ensuremath{\phi}} -\providecommand{\pShkMin}{\underline{\psi}} % -\providecommand{\PShk}{\Psi} % +\providecommand{\pShkMin}{\underline{\psi}} % +\providecommand{\PShk}{\Psi} % \providecommand{\PermShkAgg}{\Psi} % New \providecommand{\PermShk}{\Psi} % New \providecommand{\permShk}{\psi} % New -\providecommand{\pShk}{\psi} % +\providecommand{\pShk}{\psi} % \providecommand{\permShkInd}{\psi} % New -\providecommand{\pshk}{\psi} % +\providecommand{\pshk}{\psi} % \providecommand{\PtyGro}{\ensuremath{\Phi}} \providecommand{\ptyGro}{\ensuremath{\phi}} -\providecommand{\PtyLab}{\ensuremath{\mathrm{Z}}} % Labor productivity +\providecommand{\PtyLab}{\ensuremath{\mathrm{Z}}} % Labor productivity \providecommand{\ptyLab}{\ensuremath{z}} % usually, log of \PtyLab \providecommand{\PtyLev}{\ensuremath{A}} % Multiplies overall production function \providecommand{\ptyLev}{\ensuremath{a}} % Usually, log of \PtyLev @@ -369,7 +369,7 @@ \providecommand{\Rev}{\ensuremath{\Pi}} \providecommand{\rev}{\ensuremath{\pi}} \providecommand{\rfree}{\ensuremath{\mathsf{r}}} % The net return on the safe asset at an annual rate -\providecommand{\Rfree}{\ensuremath{\mathsf{R}}} % The return factor on the safe asset - unfortunately mathfrak fonts don't come through for tth +\providecommand{\Rfree}{\ensuremath{\mathsf{R}}} % The return factor on the safe asset - unfortunately mathfrak fonts don't come through for tth \providecommand{\RFunc}{\ensuremath{\mathrm{R}}} \providecommand{\RGross}{\ensuremath{\breve{\mathsf{R}}}} \providecommand{\rGross}{\ensuremath{\breve{\mathsf{r}}}} @@ -379,14 +379,14 @@ \providecommand{\riskyAlt}{\ensuremath{\pmb{\mathfrak{r}}}} % The net return on the risky asset annual rate \providecommand{\riskyshare}{\ensuremath{\varsigma}} \providecommand{\Risky}{\ensuremath{\mathbf{R}}} % The return on the risky asset -\providecommand{\risky}{\ensuremath{\mathbf{r}}} % The net return on the risky asset annual rate +\providecommand{\risky}{\ensuremath{\mathbf{r}}} % The net return on the risky asset annual rate \providecommand{\RLev}{\ensuremath{R}} % Rate of return (but better to use \Rfree or \Risky or something else more specific \providecommand{\RnormWGro}{\ensuremath{\mathcal{R}_{\WGro}}} % Normalized version of riskless return factor \providecommand{\rnormwGro}{\ensuremath{\mathit{r}_{\wGro}}} % Normalized version of riskless rate of return \providecommand{\Rnorm}{\ensuremath{\mathcal{R}}} % Normalized version of riskless return factor \providecommand{\rnorm}{\ensuremath{\mathit{r}}} % Normalized version of riskless rate of return \providecommand{\Rport}{\ensuremath{\mathbbmss{R}}} % Portfolio -weighted return -\providecommand{\rport}{\ensuremath{\mathbbmss{r}}} +\providecommand{\rport}{\ensuremath{\mathbbmss{r}}} \providecommand{\Rprod}{\ensuremath{\mathscr{R}}} \providecommand{\rprod}{\ensuremath{\mathscr{r}}} \providecommand{\rProd}{\ensuremath{\mathsf{r}}} @@ -397,8 +397,8 @@ \providecommand{\rboro}{\ensuremath{\bar{\rfree}}} %\providecommand{\R}{\Rfree} \providecommand{\saveRate}{\grave{s}} % saving (income minus consumption) over income -\providecommand{\Save}{S} % Saving (income minus consumption) -\providecommand{\save}{s} % saving (income minus consumption) +\providecommand{\Save}{S} % Saving (income minus consumption) +\providecommand{\save}{s} % saving (income minus consumption) \providecommand{\SDF}{\MLev} % Stochastic Discount Factor \providecommand{\sdr}{\mRat} % Stochastic Discount rate \providecommand{\Seniority}{\ensuremath{\mathsf{X}}} @@ -412,9 +412,9 @@ \providecommand{\sFunc}{\ensuremath{\mathrm{s}}} \providecommand{\shk}{\phi} \providecommand{\Shk}{\Phi} -\providecommand{\ShkLogZeroLogStd}{\sigma_{\cancel{\ShkMeanOneLog}}} % Std of that shock -\providecommand{\ShkLogZeroLogVar}{\sigma_{\cancel{\ShkMeanOneLog}}^{2}} % Variance of that shock -\providecommand{\ShkLogZeroLog}{\cancel{\ShkMeanOneLog}} % Log of that shock +\providecommand{\ShkLogZeroLogStd}{\sigma_{\cancel{\ShkMeanOneLog}}} % Std of that shock +\providecommand{\ShkLogZeroLogVar}{\sigma_{\cancel{\ShkMeanOneLog}}^{2}} % Variance of that shock +\providecommand{\ShkLogZeroLog}{\cancel{\ShkMeanOneLog}} % Log of that shock \providecommand{\ShkLogZero}{\cancel{\ShkMeanOne}} % A shock whose expectation in logs is zero; cancellation of the nonzero mean for the mean one shock \providecommand{\ShkMeanOneLogStd}{\sigma_{\ShkMeanOneLog}} % Std of that shock \providecommand{\ShkMeanOneLogVar}{\sigma^{2}_{\ShkMeanOneLog}} % Log of that shock @@ -478,16 +478,16 @@ \providecommand{\TLev}{\ensuremath{T}} \providecommand{\TMap}{\mathscr{T}} \providecommand{\tNow}{\ensuremath{t}} -\providecommand{\tShkAll}{\xi} % -\providecommand{\tShkEmpMin}{\underline{\theta}} % -\providecommand{\TShkEmp}{\Theta} % -\providecommand{\tShkEmp}{\theta} % -\providecommand{\tShkEmp}{\theta} % +\providecommand{\tShkAll}{\xi} % +\providecommand{\tShkEmpMin}{\underline{\theta}} % +\providecommand{\TShkEmp}{\Theta} % +\providecommand{\tShkEmp}{\theta} % +\providecommand{\tShkEmp}{\theta} % \providecommand{\tranShkInd}{\theta} % New \providecommand{\TranShkAgg}{\Theta} % New -\providecommand{\TShk}{\Xi} % -\providecommand{\tShk}{\xi} % -\providecommand{\tshk}{\xi} % +\providecommand{\TShk}{\Xi} % +\providecommand{\tShk}{\xi} % +\providecommand{\tshk}{\xi} % \providecommand{\tSS}{\ensuremath{t}} \providecommand{\tThen}{\ensuremath{\tau}} \providecommand{\uFunc}{{\ensuremath{\mathrm{u}}}} @@ -546,8 +546,8 @@ \providecommand{\wBeg}{\kLev} % wealth as of the beginning of the period (before R is received, not including Y) \providecommand{\Wealth}{\ensuremath{O}} \providecommand{\wealth}{\ensuremath{o}} -\providecommand{\WEndRat}{\ARat} % -\providecommand{\wEndRat}{\aRat} % +\providecommand{\WEndRat}{\ARat} % +\providecommand{\wEndRat}{\aRat} % \providecommand{\WEnd}{\ALev} % Wealth as of the end of the period (after C has been chosen) \providecommand{\wEnd}{\aLev} % wealth as of the end of the period (after C has been taken) \providecommand{\Wend}{\ARat} % Wealth as of the end of the period (after C has been chosen) @@ -557,9 +557,9 @@ \providecommand{\WGro}{\ensuremath{\mathrm{G}}} \providecommand{\wGro}{\ensuremath{\mathsf{g}}} \providecommand{\whumMin}{\underline{\hRat}} % human wealth -- individual -\providecommand{\WHum}{\HLev} % Human wealth -- aggregate +\providecommand{\WHum}{\HLev} % Human wealth -- aggregate \providecommand{\wHum}{\hLev} % human wealth -- individual -\providecommand{\Whum}{\HRat} % Human wealth -- aggregate +\providecommand{\Whum}{\HRat} % Human wealth -- aggregate \providecommand{\whum}{\hRat} % human wealth -- individual \providecommand{\WLev}{\ensuremath{W}} \providecommand{\wLev}{\pmb{w}} @@ -571,15 +571,15 @@ \providecommand{\WMkt}{\MLev} % Wealth as of the middle of the period (after R is received, including Y) \providecommand{\wMkt}{\mLev} % wealth as of the middle of the period (after R is received, including Y) \providecommand{\wmkt}{\mLev} % wealth as of the middle of the period (after R is received, including Y) -\providecommand{\wNet}{\ensuremath{x}} % +\providecommand{\wNet}{\ensuremath{x}} % \providecommand{\WNet}{\ensuremath{X}} % Total wealth \providecommand{\WPre}{{K}} \providecommand{\wPre}{{k}} -\providecommand{\wRat}{\ensuremath{o}} % +\providecommand{\wRat}{\ensuremath{o}} % \providecommand{\WRat}{\ensuremath{O}} % Ratio to permanent income -\providecommand{\wTot}{\ensuremath{\mathbf{o}}} % +\providecommand{\wTot}{\ensuremath{\mathbf{o}}} % \providecommand{\WTot}{\ensuremath{\mathbf{O}}} % Total wealth -\providecommand{\wtot}{\ensuremath{o}} % +\providecommand{\wtot}{\ensuremath{o}} % \providecommand{\Wtot}{\ensuremath{O}} % Total wealth \providecommand{\xFer}{\chi} \providecommand{\XFer}{X} @@ -661,4 +661,3 @@ \newcommand{\GPF}{{\mbox{GPF}}} \newcommand{\GPFAgg}{{\mbox{GPF-Agg}}} \newcommand{\FHWF}{\mbox{FHWF}} - diff --git a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/printvrb.sty b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/printvrb.sty index de4fd564a..b8757b3d4 100755 --- a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/printvrb.sty +++ b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/printvrb.sty @@ -6,9 +6,9 @@ %%% revised version, April 8, 2011 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% Uses moreverb.sty, Rainer Schopf author, +%%% Uses moreverb.sty, Rainer Schopf author, %%% as method to send verbatim text to -%%% another file, +%%% another file, %%% These commands allow user to type in text or math and %%% have it print in more than one document, @@ -18,7 +18,7 @@ %%% Each fragment will have a unique name given as an argument %%% to writetofile. -%%% +%%% \usepackage{moreverb} \newwrite\verbatimout @@ -54,10 +54,10 @@ \vskip1sp \ifnum\definitionnumber=0 \expandafter\openin1 \jobname.vrb -\ifeof1 +\ifeof1 \else \input \jobname.vrb -\fi%% to get the previous definitions +\fi%% to get the previous definitions \immediate\openout\verbatimout=\jobname.vrb \fi %% @@ -91,7 +91,7 @@ file one more time!\else %%% Using fragments in new file: %%% \input jobname.vrb will bring in the definitions -%%% for the fragments. +%%% for the fragments. %%% (jobname is the same as the filename of the source document) %%% \namesinmargin will make names print as well as as printing @@ -100,7 +100,7 @@ file one more time!\else %%% \printfrag{name} will bring in fragment defined in source file, %%% and sent to jobname.vrb. -%%% \printfrag will save the problem of remembering to use +%%% \printfrag will save the problem of remembering to use %%% \csname ...\endcsname, and will check to see if fragment is defined \def\printfrag#1{\expandafter\ifx\csname #1\endcsname\relax\vskip12pt diff --git a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/snapshot.sty b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/snapshot.sty index 23d4a505a..311018ebe 100644 --- a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/snapshot.sty +++ b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/snapshot.sty @@ -4,8 +4,8 @@ %% %% The original source files were: %% -%% snapshot.dtx -%% +%% snapshot.dtx +%% %%% ==================================================================== %%% @LaTeX-doc-source-file{ %%% filename = "snapshot.dtx", diff --git a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/tex4ht/pictureenv.4ht b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/tex4ht/pictureenv.4ht index 1dcae3abc..b51123edc 100644 --- a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/tex4ht/pictureenv.4ht +++ b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/tex4ht/pictureenv.4ht @@ -1,3 +1,3 @@ % pictureenv.4ht from https://tex.stackexchange.com/questions/448300/tex4ht-conflict-with-math-in-table-vs-outside-table-when-using-svg -\ConfigureEnv{pictureenv}{\Picture*{}}{\EndPicture}{}{} \ No newline at end of file +\ConfigureEnv{pictureenv}{\Picture*{}}{\EndPicture}{}{} diff --git a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/tex4ht/svg-math-and-subfigures-README.md b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/tex4ht/svg-math-and-subfigures-README.md index 5bd1328d8..5dffe22ed 100644 --- a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/tex4ht/svg-math-and-subfigures-README.md +++ b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/tex4ht/svg-math-and-subfigures-README.md @@ -4,8 +4,6 @@ The current version works There seem to be two options: -1. If you never set a specified size of a figure (like \includegraphics[width=6in]) then the method discussed [here](https://tug.org/pipermail/tex4ht/2015q2/001166.html) works. But dies with a division by zero error whenever the size has been explicitly set. It can be resurrected by uncommenting the \Configure{graphics*}{svg} portion of the file +1. If you never set a specified size of a figure (like \includegraphics[width=6in]) then the method discussed [here](https://tug.org/pipermail/tex4ht/2015q2/001166.html) works. But dies with a division by zero error whenever the size has been explicitly set. It can be resurrected by uncommenting the \Configure{graphics\*}{svg} portion of the file 1. In cases where the size is set (as is frequently the case), the current version obtains the dimensions directly from the svg file - * This might have problems with an svg file without explicit dimensions - - + - This might have problems with an svg file without explicit dimensions diff --git a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/tex4ht/svg-math-and-subfigures.cfg b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/tex4ht/svg-math-and-subfigures.cfg index fd5d66f3d..14147bc19 100644 --- a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/tex4ht/svg-math-and-subfigures.cfg +++ b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/tex4ht/svg-math-and-subfigures.cfg @@ -1,12 +1,12 @@ -\Preamble{charset="latin1",p-width,pic-align,pic-tabular} +\Preamble{charset="latin1",p-width,pic-align,pic-tabular} \DeclareGraphicsExtensions{.svg,.png,.jpg} % change to %\DeclareGraphicsExtensions{.png,.svg,.jpg} to prefer png pix -%\Configure{Picture}{.svg} +%\Configure{Picture}{.svg} -\Configure{VERSION}{} +\Configure{VERSION}{} \DeclareGraphicsRule{.png}{bmp}{.xbb}{} -%\DeclareGraphicsRule{.svg}{svg}{.xbb}{} % Uncomment if you want to use the commented-out method of configuring svg files to get the size from a boundingbox created by ebb -x *.png +%\DeclareGraphicsRule{.svg}{svg}{.xbb}{} % Uncomment if you want to use the commented-out method of configuring svg files to get the size from a boundingbox created by ebb -x *.png \ConfigureEnv{figure} {\ifvmode\IgnorePar\fi\EndP\HCode{
}% @@ -41,16 +41,16 @@ \Css{.subfigure img{display:block; margin-left:auto; margin-right:auto}} % Should, but does not seem to, center captions % This is for figures in png format -\Configure{graphics*} -{png} -{%the special command below so it will copy the png over -\special{t4ht+@File: \csname Gin@base\endcsname.png} -\Picture[pict]{\csname Gin@base\endcsname .png -\space width="\expandafter\the\csname Gin@req@width\endcsname" -}% -}% +\Configure{graphics*} +{png} +{%the special command below so it will copy the png over +\special{t4ht+@File: \csname Gin@base\endcsname.png} +\Picture[pict]{\csname Gin@base\endcsname .png +\space width="\expandafter\the\csname Gin@req@width\endcsname" +}% +}% -\Configure{Picture}{.svg} +\Configure{Picture}{.svg} \makeatletter \Configure{graphics*} @@ -76,11 +76,11 @@ \Css{.equation td{text-align:center; }} \Css{td.equation { margin-top:5em; margin-bottom:5em; }} -%These to tell tex4ht to make inline math images also +%These to tell tex4ht to make inline math images also \begin{document} -\Configure{$}{\PicMath}{\EndPicMath}{} -\Configure{PicMath}{}{}{}{class="math";align="absmiddle"} +\Configure{$}{\PicMath}{\EndPicMath}{} +\Configure{PicMath}{}{}{}{class="math";align="absmiddle"} \EndPreamble diff --git a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/tex4ht/svg-math-and-subfigures.tex b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/tex4ht/svg-math-and-subfigures.tex index b9f4c34ec..bd2dd2016 100644 --- a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/tex4ht/svg-math-and-subfigures.tex +++ b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/tex4ht/svg-math-and-subfigures.tex @@ -1,12 +1,12 @@ -\Preamble{charset="latin1",p-width,pic-align,pic-tabular} +\Preamble{charset="latin1",p-width,pic-align,pic-tabular} \DeclareGraphicsExtensions{.svg,.png,.jpg} % change to %\DeclareGraphicsExtensions{.png,.svg,.jpg} to prefer png pix -%\Configure{Picture}{.svg} +%\Configure{Picture}{.svg} -\Configure{VERSION}{} +\Configure{VERSION}{} \DeclareGraphicsRule{.png}{bmp}{.xbb}{} -%\DeclareGraphicsRule{.svg}{svg}{.xbb}{} % Uncomment if you want to use the commented-out method of configuring svg files to get the size from a boundingbox created by ebb -x *.png +%\DeclareGraphicsRule{.svg}{svg}{.xbb}{} % Uncomment if you want to use the commented-out method of configuring svg files to get the size from a boundingbox created by ebb -x *.png \ConfigureEnv{figure} {\ifvmode\IgnorePar\fi\EndP\HCode{
}% @@ -41,16 +41,16 @@ \Css{.subfigure img{display:block; margin-left:auto; margin-right:auto}} % Should, but does not seem to, center captions % This is for figures in png format -\Configure{graphics*} - {png} - {%the special command below so it will copy the png over - \special{t4ht+@File: \csname Gin@base\endcsname.png} - \Picture[pict]{\csname Gin@base\endcsname .png - \space width="\expandafter\the\csname Gin@req@width\endcsname" -}% -}% +\Configure{graphics*} + {png} + {%the special command below so it will copy the png over + \special{t4ht+@File: \csname Gin@base\endcsname.png} + \Picture[pict]{\csname Gin@base\endcsname .png + \space width="\expandafter\the\csname Gin@req@width\endcsname" +}% +}% -\Configure{Picture}{.svg} +\Configure{Picture}{.svg} \makeatletter \Configure{graphics*} @@ -68,11 +68,11 @@ % https://tex.stackexchange.com/questions/563276/graphics-scaling-in-tex4ht -%These to tell tex4ht to make inline math images also +%These to tell tex4ht to make inline math images also \begin{document} -\Configure{$}{\PicMath}{\EndPicMath}{} -\Configure{PicMath}{}{}{}{class="math";align="absmiddle"} +\Configure{$}{\PicMath}{\EndPicMath}{} +\Configure{PicMath}{}{}{}{class="math";align="absmiddle"} \EndPreamble diff --git a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/tex4htMakeCFG.sh b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/tex4htMakeCFG.sh index ea5e9e310..36ad5667c 100755 --- a/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/tex4htMakeCFG.sh +++ b/Documentation/NARK/Resources/texmf-local/texmf-local/tex/latex/tex4htMakeCFG.sh @@ -19,5 +19,3 @@ cmd="cp `kpsewhich svg-set-size-to-1p0.mk4` $handoutName.mk4" #cmd="cp `kpsewhich svg-set-size-to-1p2x1p0.mk4` $handoutName.mk4" #cmd="cp `kpsewhich svg-set-size-to-1p1x1p0.mk4` $handoutName.mk4" # Tried this to achieve bold; does not look good echo "$cmd" ; eval "$cmd" - - diff --git a/Documentation/NARK/Resources/texmf-local/texmf-local/web2c/texmf.cnf b/Documentation/NARK/Resources/texmf-local/texmf-local/web2c/texmf.cnf index 2533bdcb6..43893caf3 100644 --- a/Documentation/NARK/Resources/texmf-local/texmf-local/web2c/texmf.cnf +++ b/Documentation/NARK/Resources/texmf-local/texmf-local/web2c/texmf.cnf @@ -16,8 +16,8 @@ shell_escape = t TEXMFHOME = ~/.texmf % The default is for each user to have a separate location for the junk variables that are created on-the-fly; this can result in a hard-to-find pileup of junk across multiple users, so let's have a common location for all users: -TEXMFVAR = /usr/local/texlive/texmf-var +TEXMFVAR = /usr/local/texlive/texmf-var TEXMFCONFIG = /usr/local/texlive/texmf-config TEXMFMETHODS = /usr/local/texlive/texmf-local # Links should be created upon setup of TeXLive -TEXMF = {$TEXMFMETHODS,$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFMAIN,!!$TEXMFLOCAL,!!$TEXMFDIST} \ No newline at end of file +TEXMF = {$TEXMFMETHODS,$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFMAIN,!!$TEXMFLOCAL,!!$TEXMFDIST} diff --git a/Documentation/NARK/Resources/texmf-local/web2c/texmf.cnf b/Documentation/NARK/Resources/texmf-local/web2c/texmf.cnf index 2533bdcb6..43893caf3 100644 --- a/Documentation/NARK/Resources/texmf-local/web2c/texmf.cnf +++ b/Documentation/NARK/Resources/texmf-local/web2c/texmf.cnf @@ -16,8 +16,8 @@ shell_escape = t TEXMFHOME = ~/.texmf % The default is for each user to have a separate location for the junk variables that are created on-the-fly; this can result in a hard-to-find pileup of junk across multiple users, so let's have a common location for all users: -TEXMFVAR = /usr/local/texlive/texmf-var +TEXMFVAR = /usr/local/texlive/texmf-var TEXMFCONFIG = /usr/local/texlive/texmf-config TEXMFMETHODS = /usr/local/texlive/texmf-local # Links should be created upon setup of TeXLive -TEXMF = {$TEXMFMETHODS,$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFMAIN,!!$TEXMFLOCAL,!!$TEXMFDIST} \ No newline at end of file +TEXMF = {$TEXMFMETHODS,$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFMAIN,!!$TEXMFLOCAL,!!$TEXMFDIST} diff --git a/Documentation/_static/theme_overrides.css b/Documentation/_static/theme_overrides.css index 1329f433e..55152d099 100644 --- a/Documentation/_static/theme_overrides.css +++ b/Documentation/_static/theme_overrides.css @@ -1,3 +1,3 @@ .wy-nav-content { - max-width: 1400px !important; + max-width: 1400px !important; } diff --git a/Documentation/conf.py b/Documentation/conf.py index 4ef0447d0..4bfc69ec1 100644 --- a/Documentation/conf.py +++ b/Documentation/conf.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # HARK documentation build configuration file, created by # sphinx-quickstart on Sat Jun 4 15:22:52 2016. @@ -11,76 +10,75 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import sys import os +import sys # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -path = os.path.abspath('..') +path = os.path.abspath("..") sys.path.insert(0, path) -print(f'Inserting {path}') - +print(f"Inserting {path}") # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. -#needs_sphinx = '1.0' +# needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'sphinx.ext.autodoc', - 'sphinx.ext.doctest', - 'sphinx.ext.intersphinx', - 'sphinx.ext.todo', - 'sphinx.ext.coverage', - 'sphinx.ext.mathjax', - 'sphinx.ext.autosummary', - 'sphinx.ext.imgconverter', - 'sphinx.ext.napoleon', - 'nbsphinx', - 'recommonmark', + "sphinx.ext.autodoc", + "sphinx.ext.doctest", + "sphinx.ext.intersphinx", + "sphinx.ext.todo", + "sphinx.ext.coverage", + "sphinx.ext.mathjax", + "sphinx.ext.autosummary", + "sphinx.ext.imgconverter", + "sphinx.ext.napoleon", + "nbsphinx", + "recommonmark", ] # This is currently not working -nbsphinx_execute = 'never' +nbsphinx_execute = "never" # Extend theme width -html_css_files = ['theme_overrides.css'] +html_css_files = ["theme_overrides.css"] -autodoc_default_flags = ['members'] # must add outside ']' bracket +autodoc_default_flags = ["members"] # must add outside ']' bracket autosummary_generate = True # Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] +templates_path = ["_templates"] # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: -source_suffix = ['.rst', '.md'] -#source_suffix = '.rst' +source_suffix = [".rst", ".md"] +# source_suffix = '.rst' # The encoding of source files. -#source_encoding = 'utf-8-sig' +# source_encoding = 'utf-8-sig' # The master toctree document. -master_doc = 'index' +master_doc = "index" # General information about the project. -project = u'HARK' -copyright = u'2020, Econ-ARK team' -author = u'Econ-ARK team' +project = "HARK" +copyright = "2020, Econ-ARK team" +author = "Econ-ARK team" # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. -version = u'latest' +version = "latest" # The full version, including alpha/beta/rc tags. -release = u'latest' +release = "latest" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -91,38 +89,38 @@ # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: -#today = '' +# today = '' # Else, today_fmt is used as the format for a strftime call. -#today_fmt = '%B %d, %Y' +# today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This patterns also effect to html_static_path and html_extra_path -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] # The reST default role (used for this markup: `text`) to use for all # documents. -#default_role = None +# default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. -#add_function_parentheses = True +# add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). -#add_module_names = True +# add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. -#show_authors = False +# show_authors = False # The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' +pygments_style = "sphinx" # A list of ignored prefixes for module index sorting. -#modindex_common_prefix = [] +# modindex_common_prefix = [] # If true, keep warnings as "system message" paragraphs in the built documents. -#keep_warnings = False +# keep_warnings = False # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = True @@ -132,158 +130,151 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'sphinx_rtd_theme' # 'pydata_sphinx_theme' 'alabaster' +html_theme = "sphinx_rtd_theme" # 'pydata_sphinx_theme' 'alabaster' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. -#html_theme_options = {} +# html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. -#html_theme_path = [] +# html_theme_path = [] # The name for this set of Sphinx documents. # " v documentation" by default. -#html_title = u'HARK v0.9' +# html_title = u'HARK v0.9' # A shorter title for the navigation bar. Default is the same as html_title. -#html_short_title = None +# html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. -#html_logo = None +# html_logo = None # The name of an image file (relative to this directory) to use as a favicon of # the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. -#html_favicon = None +# html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +html_static_path = ["_static"] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied # directly to the root of the documentation. -#html_extra_path = [] +# html_extra_path = [] # If not None, a 'Last updated on:' timestamp is inserted at every page # bottom, using the given strftime format. # The empty string is equivalent to '%b %d, %Y'. -#html_last_updated_fmt = None +# html_last_updated_fmt = None # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. -#html_use_smartypants = True +# html_use_smartypants = True # Custom sidebar templates, maps document names to template names. -#html_sidebars = {} +# html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. -#html_additional_pages = {} +# html_additional_pages = {} # If false, no module index is generated. -#html_domain_indices = True +# html_domain_indices = True # If false, no index is generated. -#html_use_index = True +# html_use_index = True # If true, the index is split into individual pages for each letter. -#html_split_index = False +# html_split_index = False # If true, links to the reST sources are added to the pages. -#html_show_sourcelink = True +# html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -#html_show_sphinx = True +# html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -#html_show_copyright = True +# html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. -#html_use_opensearch = '' +# html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). -#html_file_suffix = None +# html_file_suffix = None # Language to be used for generating the HTML full-text search index. # Sphinx supports the following languages: # 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja' # 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr', 'zh' -#html_search_language = 'en' +# html_search_language = 'en' # A dictionary with options for the search language support, empty by default. # 'ja' uses this config value. # 'zh' user can custom change `jieba` dictionary path. -#html_search_options = {'type': 'default'} +# html_search_options = {'type': 'default'} # The name of a javascript file (relative to the configuration directory) that # implements a search results scorer. If empty, the default will be used. -#html_search_scorer = 'scorer.js' +# html_search_scorer = 'scorer.js' # Output file base name for HTML help builder. -#htmlhelp_basename = 'HARKdoc' +# htmlhelp_basename = 'HARKdoc' # -- Options for LaTeX output --------------------------------------------- latex_elements = { -# The paper size ('letterpaper' or 'a4paper'). -#'papersize': 'letterpaper', - -# The font size ('10pt', '11pt' or '12pt'). -#'pointsize': '10pt', - -# Additional stuff for the LaTeX preamble. -#'preamble': '', - -# Latex figure (float) alignment -#'figure_align': 'htbp', + # The paper size ('letterpaper' or 'a4paper'). + #'papersize': 'letterpaper', + # The font size ('10pt', '11pt' or '12pt'). + #'pointsize': '10pt', + # Additional stuff for the LaTeX preamble. + #'preamble': '', + # Latex figure (float) alignment + #'figure_align': 'htbp', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, 'HARK.tex', u'HARK Documentation', - u'TEMP', 'manual'), + (master_doc, "HARK.tex", "HARK Documentation", "TEMP", "manual"), ] # The name of an image file (relative to this directory) to place at the top of # the title page. -#latex_logo = None +# latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. -#latex_use_parts = False +# latex_use_parts = False # If true, show page references after internal links. -#latex_show_pagerefs = False +# latex_show_pagerefs = False # If true, show URL addresses after external links. -#latex_show_urls = False +# latex_show_urls = False # Documents to append as an appendix to all manuals. -#latex_appendices = [] +# latex_appendices = [] # If false, no module index is generated. -#latex_domain_indices = True +# latex_domain_indices = True # -- Options for manual page output --------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). -man_pages = [ - (master_doc, 'hark', u'HARK Documentation', - [author], 1) -] +man_pages = [(master_doc, "hark", "HARK Documentation", [author], 1)] # If true, show URL addresses after external links. -#man_show_urls = False +# man_show_urls = False # -- Options for Texinfo output ------------------------------------------- @@ -292,10 +283,16 @@ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - (master_doc, 'HARK', u'HARK Documentation', - author, 'HARK', 'One line description of project.', - 'Miscellaneous'), + ( + master_doc, + "HARK", + "HARK Documentation", + author, + "HARK", + "One line description of project.", + "Miscellaneous", + ), ] # Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = {'https://docs.python.org/': None} +intersphinx_mapping = {"https://docs.python.org/": None} diff --git a/Documentation/contributing/CONTRIBUTING.md b/Documentation/contributing/CONTRIBUTING.md index 49f491f24..c66148bff 100644 --- a/Documentation/contributing/CONTRIBUTING.md +++ b/Documentation/contributing/CONTRIBUTING.md @@ -1,8 +1,8 @@ # Contributing to Econ-ARK -* [Code of Conduct](#code-of-conduct) -* [Contributing Guide](#contributing-guide) -* [Developer's Certificate of Origin 1.1](#developer-s-certificate-of-origin-1-1) +- [Code of Conduct](#code-of-conduct) +- [Contributing Guide](#contributing-guide) +- [Developer's Certificate of Origin 1.1](#developer-s-certificate-of-origin-1-1) ## [Code of Conduct](./doc/guides/contributing/coc.md) @@ -12,23 +12,22 @@ to which all contributors must adhere. See [details on our policy on Code of Conduct](https://github.com/econ-ark/HARK/blob/master/.github/CODE_OF_CONDUCT.md). - ## Welcome! -Thank you for considering contributing to Econ-ARK! We're a young project with a small but committed community that's hoping to grow while maintaining our friendly and responsive culture. Whether you're an economist or a technologist, a writer or a coder, an undergrad or a full professor, a professional or a hobbyist, there's a place for you in the Econ-ARK community. +Thank you for considering contributing to Econ-ARK! We're a young project with a small but committed community that's hoping to grow while maintaining our friendly and responsive culture. Whether you're an economist or a technologist, a writer or a coder, an undergrad or a full professor, a professional or a hobbyist, there's a place for you in the Econ-ARK community. -We're still creating our contribution infrastructure, so this document is a work in progress. If you have any questions please feel free to @ or otherwise reach out to project leaders [Chris](https://github.com/llorracc) and [Matt](https://github.com/mnwhite). If you prefer to connect through email, you can send it to __econ-ark at jhuecon dot org__. We have a [Gitter chat room](https://gitter.im/econ-ark/community) you are welcome to meet us in, as well as a [Discord channel](https://discord.com/channels/786703927705862175/1057710158639267990) listed under the channel for the Scientific Python community! +We're still creating our contribution infrastructure, so this document is a work in progress. If you have any questions please feel free to @ or otherwise reach out to project leaders [Chris](https://github.com/llorracc) and [Matt](https://github.com/mnwhite). If you prefer to connect through email, you can send it to **econ-ark at jhuecon dot org**. We have a [Gitter chat room](https://gitter.im/econ-ark/community) you are welcome to meet us in, as well as a [Discord channel](https://discord.com/channels/786703927705862175/1057710158639267990) listed under the channel for the Scientific Python community! ## How to Contribute -We're open to all kinds of contributions, from bug reports to help with our docs to suggestions on how to improve our code. The best way to figure out if the contribution you'd like to make is something we'd merge or otherwise accept, is to open up an issue in our issue tracker. Please create an issue rather than immediately submitting pull request, unless the change you'd like to make is so minor you won't mind if the pull request is rejected. For bigger contributions, we want to proactively talk things through so we don't end up wasting your time. +We're open to all kinds of contributions, from bug reports to help with our docs to suggestions on how to improve our code. The best way to figure out if the contribution you'd like to make is something we'd merge or otherwise accept, is to open up an issue in our issue tracker. Please create an issue rather than immediately submitting pull request, unless the change you'd like to make is so minor you won't mind if the pull request is rejected. For bigger contributions, we want to proactively talk things through so we don't end up wasting your time. While we're thrilled to receive all kinds of contributions, there are a few key areas we'd especially like help with: -* porting existing heterogenous agent/agent based models into HARK -* curating and expanding the collection of projects which use Econ-ARK (which we store in the [remark](https://github.com/econ-ark/REMARK) repository) -* creating demonstrations of how to use Econ-ARK (which we store in the [DemARK](https://github.com/econ-ark/DemARK) repository) -* expanding test coverage of our existing code +- porting existing heterogenous agent/agent based models into HARK +- curating and expanding the collection of projects which use Econ-ARK (which we store in the [remark](https://github.com/econ-ark/REMARK) repository) +- creating demonstrations of how to use Econ-ARK (which we store in the [DemARK](https://github.com/econ-ark/DemARK) repository) +- expanding test coverage of our existing code If you'd like to help with those or any other kind of contribution, reach out to us and we'll help you do so. @@ -36,17 +35,17 @@ We don't currently have guidelines for opening issues or pull requests, so inclu ## Responding to Issues & Pull Requests -We're trying to get better at managing our open issues and pull requests. We've created a new set of goals for all issues and pull requests in our Econ-ARK repos: +We're trying to get better at managing our open issues and pull requests. We've created a new set of goals for all issues and pull requests in our Econ-ARK repos: 1. Initial response within one or two days. 2. Substantive response within two weeks. 3. Resolution of issue/pull request within three months. -If you've been waiting on us for more than two weeks for any reason, please feel free to give us a nudge. Correspondingly, we ask that you respond to any questions or requests from us within two weeks as well, even if it's just to say, "Sorry, I can't get to this for a while yet". If we don't hear back from you, we may close your issue or pull request. If you want to re-open it, just ask - we're glad to do so. +If you've been waiting on us for more than two weeks for any reason, please feel free to give us a nudge. Correspondingly, we ask that you respond to any questions or requests from us within two weeks as well, even if it's just to say, "Sorry, I can't get to this for a while yet". If we don't hear back from you, we may close your issue or pull request. If you want to re-open it, just ask - we're glad to do so. ## Getting Started -The Contributing Guide below provides instructions for how to get started running HARK. This also serves as a setup guide for new contributors. If you run into any problems, please let us know by opening an issue in the issue tracker. +The Contributing Guide below provides instructions for how to get started running HARK. This also serves as a setup guide for new contributors. If you run into any problems, please let us know by opening an issue in the issue tracker. Thanks again! We're so glad to have you in our community. @@ -54,75 +53,83 @@ Thanks again! We're so glad to have you in our community. 1. If you are a first-time contributor: - * Go to [https://github.com/econ-ark/HARK](https://github.com/econ-ark/HARK) and click the + - Go to [https://github.com/econ-ark/HARK](https://github.com/econ-ark/HARK) and click the "fork" button to create your own copy of the project. - * Clone the project to your local computer - ``` - git clone git@github.com:your-username/HARK.git - ``` - * Navigate to the folder HARK and add the upstream repository - ``` - git remote add upstream git@github.com:econ-ark/HARK.git - ``` - * Now, you have remote repositories named: + - Clone the project to your local computer + + ``` + git clone git@github.com:your-username/HARK.git + ``` + + - Navigate to the folder HARK and add the upstream repository + + ``` + git remote add upstream git@github.com:econ-ark/HARK.git + ``` - - ``upstream``, which refers to the ``HARK`` repository - - ``origin``, which refers to your personal fork of ``HARK``. + - Now, you have remote repositories named: + + - `upstream`, which refers to the `HARK` repository + - `origin`, which refers to your personal fork of `HARK`. 2. Develop your contribution: - * Pull the latest changes from upstream - ``` - git checkout master - git pull upstream master - ``` - * Create a branch for the feature you want to work on. Since the + - Pull the latest changes from upstream + + ``` + git checkout master + git pull upstream master + ``` + + - Create a branch for the feature you want to work on. Since the branch name will appear in the merge message, use a sensible name such as 'bugfix-for-issue-220' - ``` - git checkout -b bugfix-for-issue-220 - ``` - * Commit locally as you progress (``git add`` and ``git commit``) + + ``` + git checkout -b bugfix-for-issue-220 + ``` + + - Commit locally as you progress (`git add` and `git commit`) 3. To submit your contribution: - * Push your changes back to your fork on GitHub - ``` - git push origin bugfix-for-issue-220 - ``` - * Go to GitHub. The new branch will show up with a green Pull Request - button---click it. + - Push your changes back to your fork on GitHub + ``` + git push origin bugfix-for-issue-220 + ``` -4. Review process: + - Go to GitHub. The new branch will show up with a green Pull Request + button---click it. - * Reviewers (the other developers and interested community members) will - write inline and/or general comments on your Pull Request (PR) to help - you improve its implementation, documentation, and style. Every single - developer working on the project has their code reviewed, and we've come - to see it as friendly conversation from which we all learn and the - overall code quality benefits. Therefore, please don't let the review - discourage you from contributing: its only aim is to improve the quality - of project, not to criticize (we are, after all, very grateful for the - time you're donating!). +4. Review process: - * To update your pull request, make your changes on your local repository - and commit. As soon as those changes are pushed up (to the same branch as - before) the pull request will update automatically. + - Reviewers (the other developers and interested community members) will + write inline and/or general comments on your Pull Request (PR) to help + you improve its implementation, documentation, and style. Every single + developer working on the project has their code reviewed, and we've come + to see it as friendly conversation from which we all learn and the + overall code quality benefits. Therefore, please don't let the review + discourage you from contributing: its only aim is to improve the quality + of project, not to criticize (we are, after all, very grateful for the + time you're donating!). - * [Travis-CI](https://travis-ci.org/), a continuous integration service, - is triggered after each Pull Request update to build the code and run unit - tests of your branch. The Travis tests must pass before your PR can be merged. - If Travis fails, you can find out why by clicking on the "failed" icon (red - cross) and inspecting the build and test log. + - To update your pull request, make your changes on your local repository + and commit. As soon as those changes are pushed up (to the same branch as + before) the pull request will update automatically. - * [GitHub Actions](http://github.com/actions), is another continuous integration - service, which we use. You will also need to make sure that the GitHub Actions - tests pass. + - [Travis-CI](https://travis-ci.org/), a continuous integration service, + is triggered after each Pull Request update to build the code and run unit + tests of your branch. The Travis tests must pass before your PR can be merged. + If Travis fails, you can find out why by clicking on the "failed" icon (red + cross) and inspecting the build and test log. -NOTE: If closing a bug, also add "Fixes #1480" where 1480 is the issue number. + - [GitHub Actions](http://github.com/actions), is another continuous integration + service, which we use. You will also need to make sure that the GitHub Actions + tests pass. +NOTE: If closing a bug, also add "Fixes #1480" where 1480 is the issue number. ### Build environment setup @@ -130,11 +137,12 @@ Once you've cloned your fork of the HARK repository, you should set up a Python development environment tailored for HARK. You may choose the environment manager of your choice. Here we provide instructions for two popular environment managers: -``venv`` (pip based) and ``conda`` (Anaconda or Miniconda). +`venv` (pip based) and `conda` (Anaconda or Miniconda). #### venv -When using ``venv``, you may find the following bash commands useful +When using `venv`, you may find the following bash commands useful + ``` # Create a virtualenv named ``econ-dev`` that lives in the directory of # the same name @@ -151,6 +159,7 @@ When using ``venv``, you may find the following bash commands useful #### conda When using conda, you may find the following bash commands useful + ``` # Create a conda environment named ``econ-dev`` conda create --name econ-dev @@ -166,15 +175,16 @@ When using conda, you may find the following bash commands useful ### Guidelines -* All code should have tests. -* All code should be documented, to the same +- All code should have tests. +- All code should be documented, to the same [standard](https://numpydoc.readthedocs.io/en/latest/format.html#docstring-standard) as NumPy and SciPy. -* All changes are reviewed. +- All changes are reviewed. ### Stylistic Guidelines -* We use `black `_ for styling of code +- We use `black `\_ for styling of code + ``` # install black pip install black @@ -183,40 +193,42 @@ When using conda, you may find the following bash commands useful ``` ### Naming Conventions -Object naming conventions in HARK are fairly different than existing standards, and differ somewhat between tool modules vs model or application modules. The following conventions apply throughout HARK: -* Functions and methods are always in ''camel case'': no underscores, first letter is lower case, first letter of each subsequent word is capitalized. E.g. ***approxLognormal***. +Object naming conventions in HARK are fairly different than existing standards, and differ somewhat between tool modules vs model or application modules. The following conventions apply throughout HARK: + +- Functions and methods are always in ''camel case'': no underscores, first letter is lower case, first letter of each subsequent word is capitalized. E.g. **_approxLognormal_**. -* Function and method names should accurately and concisely describe what the function does; the first word in the name *must be a verb* +- Function and method names should accurately and concisely describe what the function does; the first word in the name _must be a verb_ -* Variable and class names *should not* have a verb as their first word. +- Variable and class names _should not_ have a verb as their first word. -* Class names should use no underscores and capitalize the first letter of each word; moreover, a class name *must include a noun*. E.g. ***ConsPerfForesightSolver***. +- Class names should use no underscores and capitalize the first letter of each word; moreover, a class name _must include a noun_. E.g. **_ConsPerfForesightSolver_**. -When naming variables in model modules, the HARK team strongly discourages using single letter names, like ***c*** for consumption. Instead, we encourage contributors to use longer, more descriptive variable names using additional words and common abbreviations to specify the variable more precisely. In [NARK](https://github.com/econ-ark/HARK/blob/master/Documentation/NARK/NARK.pdf), we list standard single letter variable ''bases'' and an array of prefixes and suffixes to adjust them. Economic variables in model modules should (usually) not use underscores, instead using camel case to the greatest extent possible. For ''non-economic'' variables that are only used temporarily, underscores are permissible. The development team prefers this standard so that users can translate between Python code and LaTeX script with minimal work. +When naming variables in model modules, the HARK team strongly discourages using single letter names, like **_c_** for consumption. Instead, we encourage contributors to use longer, more descriptive variable names using additional words and common abbreviations to specify the variable more precisely. In [NARK](https://github.com/econ-ark/HARK/blob/master/Documentation/NARK/NARK.pdf), we list standard single letter variable ''bases'' and an array of prefixes and suffixes to adjust them. Economic variables in model modules should (usually) not use underscores, instead using camel case to the greatest extent possible. For ''non-economic'' variables that are only used temporarily, underscores are permissible. The development team prefers this standard so that users can translate between Python code and LaTeX script with minimal work. -Conventions for naming variables in HARK's tool modules are significantly closer to more commonly used standards. Variable names should be in all lower case, with underscores between words, e.g. ***data\_to\_match***. The functions and classes in these modules are more general and almost surely do not have any inherent ''economic content''; they are numerical or algorithmic objects, not variables that might appear in an equation in an article for a (non-computational) economics journal. Variable names in application modules (e.g. the files that execute the ***cstwMPC*** estimations) are a mix of the conventions for tool and model files, as appropriate for each variable. That is, variables that are directly related to ''economic variables'' in model modules should follow those conventions, while objects created solely for data manipulation or reporting should use the style of tool modules. +Conventions for naming variables in HARK's tool modules are significantly closer to more commonly used standards. Variable names should be in all lower case, with underscores between words, e.g. **_data_to_match_**. The functions and classes in these modules are more general and almost surely do not have any inherent ''economic content''; they are numerical or algorithmic objects, not variables that might appear in an equation in an article for a (non-computational) economics journal. Variable names in application modules (e.g. the files that execute the **_cstwMPC_** estimations) are a mix of the conventions for tool and model files, as appropriate for each variable. That is, variables that are directly related to ''economic variables'' in model modules should follow those conventions, while objects created solely for data manipulation or reporting should use the style of tool modules. ### Documentation Convention -The HARK team wants the toolKit to be as accessible to users as possible; our greatest fear (other than spiders, of course) is that a new user will open up our code, get hopelessly confused trying to read it, and then never look at HARK again. To prevent this tragic outcome, we have tried hard to provide comprehensive, accurate documentation and comments within the code describing our methods. Moreover, HARK uses the Sphinx utility to generate a website with [online documentation](https://hark.readthedocs.io/en/latest/) for all of our tool and model modules, so that users can learn about what's available in HARK without digging through the source code. When making contributions to HARK, the development team asks users to format their inline documentation to work with Sphinx by following a few simple rules. -* The top of every module should begin with a ''docstring'' providing a clear description of the contents of the module. The first sentence should concisely summarize the file, as it may appear in an index or summary of all modules without the remaining sentences. A docstring at the top of a module should be formatted as: +The HARK team wants the toolKit to be as accessible to users as possible; our greatest fear (other than spiders, of course) is that a new user will open up our code, get hopelessly confused trying to read it, and then never look at HARK again. To prevent this tragic outcome, we have tried hard to provide comprehensive, accurate documentation and comments within the code describing our methods. Moreover, HARK uses the Sphinx utility to generate a website with [online documentation](https://hark.readthedocs.io/en/latest/) for all of our tool and model modules, so that users can learn about what's available in HARK without digging through the source code. When making contributions to HARK, the development team asks users to format their inline documentation to work with Sphinx by following a few simple rules. + +- The top of every module should begin with a ''docstring'' providing a clear description of the contents of the module. The first sentence should concisely summarize the file, as it may appear in an index or summary of all modules without the remaining sentences. A docstring at the top of a module should be formatted as: ``` """ -Specifies an economic model and provides methods for solving it. +Specifies an economic model and provides methods for solving it. -More specific description of the key features of the model and variations of it in this module. +More specific description of the key features of the model and variations of it in this module. -Maybe some comments about the solution method or limitations of the model. +Maybe some comments about the solution method or limitations of the model. Your bank account routing number. """ ``` -* The line directly below the declaration of a function, method or class should begin a docstring describing that object. As with modules, the first sentence should concisely summarize the function or class, as it might be included in an index or summary. For functions and methods, the docstring should be formatted as: +- The line directly below the declaration of a function, method or class should begin a docstring describing that object. As with modules, the first sentence should concisely summarize the function or class, as it might be included in an index or summary. For functions and methods, the docstring should be formatted as: ``` def functionName(input1,input2): @@ -258,67 +270,69 @@ multiple entries. If no output, this is just "None". """ ``` -* Provide ample comments within a function or method so that a relatively intelligent reader can follow along with your algorithm. Short comments can follow at the end of a line, longer comments (or descriptions of the step or task about to be performed) should precede a block of code on the line(s) above it. - -Finally, if you write a new model module, the HARK team asks that you also provide a short mathematical writeup of the model as a PDF. This document does not need to go into great detail about the solution method for the model or the functions and classes included in the module, merely specify the economic model and provide a summary of how it is solved. See [ConsumptionSavingModels.pdf](https://github.com/econ-ark/HARK/blob/master/Documentation/ConsumptionSavingModels.pdf) for an example of this. - - +- Provide ample comments within a function or method so that a relatively intelligent reader can follow along with your algorithm. Short comments can follow at the end of a line, longer comments (or descriptions of the step or task about to be performed) should precede a block of code on the line(s) above it. +Finally, if you write a new model module, the HARK team asks that you also provide a short mathematical writeup of the model as a PDF. This document does not need to go into great detail about the solution method for the model or the functions and classes included in the module, merely specify the economic model and provide a summary of how it is solved. See [ConsumptionSavingModels.pdf](https://github.com/econ-ark/HARK/blob/master/Documentation/ConsumptionSavingModels.pdf) for an example of this. ### Testing -``HARK`` has a test suite that ensures correct -execution on your system. The test suite has to pass before a pull +`HARK` has a test suite that ensures correct +execution on your system. The test suite has to pass before a pull request can be merged, and tests should be added to cover any modifications to the code base. We make use of the [pytest](https://docs.pytest.org/en/latest/) and unittests testing framework, with tests located in the various -``HARK/submodule/tests`` folders. +`HARK/submodule/tests` folders. + +To use `pytest`, ensure that the library is installed in development mode -To use ``pytest``, ensure that the library is installed in development mode ``` $ pip install -e . ``` + Now, run all tests using + ``` $ pytest HARK ``` + Or the tests for a specific submodule + ``` $ pytest HARK/ConsumptionSaving ``` + Or tests from a specific file + ``` $ pytest HARK/ConsumptionSaving/tests/test_ConsAggShockModel.py ``` ### Pull request codes -When you submit a pull request to GitHub, GitHub will ask you for a summary. If +When you submit a pull request to GitHub, GitHub will ask you for a summary. If your code is not ready to merge, but you want to get feedback, please consider -using ``WIP: experimental optimization`` or similar for the title of your pull +using `WIP: experimental optimization` or similar for the title of your pull request. That way we will all know that it's not yet ready to merge and that you may be interested in more fundamental comments about design. When you think the pull request is ready to merge, change the title (using the -*Edit* button) to remove the ``WIP:``. - +_Edit_ button) to remove the `WIP:`. ### Bugs Please [report bugs on GitHub](https://github.com/econ-ark/HARK/issues). - ## Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: -* (a) The contribution was created in whole or in part by me and I +- (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or -* (b) The contribution is based upon previous work that, to the best +- (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part @@ -326,11 +340,11 @@ By making a contribution to this project, I certify that: permitted to submit under a different license), as indicated in the file; or -* (c) The contribution was provided directly to me by some other +- (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. -* (d) I understand and agree that this project and the contribution +- (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with diff --git a/Documentation/contributing/Installation_instruction.md b/Documentation/contributing/Installation_instruction.md index 0ae0516a9..530694b10 100644 --- a/Documentation/contributing/Installation_instruction.md +++ b/Documentation/contributing/Installation_instruction.md @@ -1,8 +1,10 @@ # Installing HARK -HARK is an open source project written in Python. It's compatible with both Python + +HARK is an open source project written in Python. It's compatible with both Python 2 and 3, and with the Anaconda distributions of python 2 and 3. ## Instructions for a new user + In order to use HARK, you firstly need to download Python and add Python to the PATH. We recommend to install python 3, as eventually support for python 2 will end. If you are not confident about the installation process you can use this step-by-step guide https://realpython.com/installing-python/ . Next, install a text editor for Python. If you do not use the Anaconda Python distribution (see below), we recommend [Atom](https://atom.io/). To use Atom for Python, first install it (you can use this [manual](https://flight-manual.atom.io/getting-started/sections/installing-atom/)). Next, install the [packages](https://flight-manual.atom.io/using-atom/sections/atom-packages/) for Python, we recommend to install at least [autocomplete-python](https://atom.io/packages/autocomplete-python) and [atom-ide-debugger-python](https://flight-manual.atom.io/using-atom/sections/atom-packages/). The last enables debugging the Python scripts, that is to set breakpoints and call variables in certain spot of your code (with increase in your codes' sophistication you will find this tools very helpful in finding bugs). @@ -20,15 +22,20 @@ cd [directory where you want to store the econ-ark virtual environment] pip install virtualenv virtualenv econ-ark ``` + Then for Windows, type: + ``` econ-ark\Scripts\activate.bat ``` + While for Mac or Linux: + ``` source econ-ark/bin/activate ``` + In the both cases, you may see (econ-ark) in your command prompt. Next, install `econ-ark` into your new virtual environment via pip: @@ -37,41 +44,45 @@ Next, install `econ-ark` into your new virtual environment via pip: pip install econ-ark ``` - --- + **!NOTE** If you install econ-ark into the virtual environment, your HARK scripts will not compile unless it is activated. To do so, type for Windows: + ``` cd [directory where you want to store the econ-ark virtual environment] econ-ark\Scripts\activate.bat ``` + While for Mac or Linux: + ``` cd [directory where you want to store the econ-ark virtual environment] source econ-ark/bin/activate ``` + Next, run your script + ``` cd [directory where you located your script] python YourScript.py ``` -For using the text editor, you also need to configure the environment. If you use [Atom](https://atom.io/), simply type `atom` at a command prompt after activating the environment. Atom text editor will open and you will be able to compile your codes which use HARK. - - --- - +For using the text editor, you also need to configure the environment. If you use [Atom](https://atom.io/), simply type `atom` at a command prompt after activating the environment. Atom text editor will open and you will be able to compile your codes which use HARK. +--- ### Using HARK with Anaconda -Installing HARK with pip does not give you full access to HARK's many graphical capabilities. One way to access these capabilities is by using [Anaconda](https://anaconda.com/why-anaconda), which is a distribution of python along with many packages that are frequently used in scientific computing. +Installing HARK with pip does not give you full access to HARK's many graphical capabilities. One way to access these capabilities is by using [Anaconda](https://anaconda.com/why-anaconda), which is a distribution of python along with many packages that are frequently used in scientific computing. 1. Download Anaconda for your operating system and follow the installation instructions [at Anaconda.com](https://www.anaconda.com/distribution/#download-section). --- + **!NOTE** You can have the default python distribution from python.org and from anaconda, as they do not interfere. However, be careful with setting the PATH. To avoid problems you can eg. set the environment variables path to the default distribution and access anaconda distribution via anaconda prompt. @@ -79,36 +90,41 @@ You can have the default python distribution from python.org and from anaconda, --- 2. Anaconda includes its own virtual environment system called `conda` which stores environments in a preset location (so you don't have to choose). So in order to create and activate an econ-ark virtual environment: + ``` conda create -n econ-ark anaconda conda activate econ-ark ``` + If you want to install `econ-ark` only into this environment, you need to firstly activate the environment and then install econ-ark via pip or conda. In the second case type: ``` conda install econ-ark::econ-ark ``` + About the differences between conda and pip check https://www.anaconda.com/understanding-conda-and-pip/ . -3. Open Spyder, an interactive development environment (IDE) for Python (specifically, iPython). You may be able to do this through Anaconda's graphical interface, or you can do so from the command line/prompt. To do so, simply open a command line/prompt and type `spyder`. If `econ-ark` is installed into the particular environment, you firstly need activate it and then type `spyder`. +3. Open Spyder, an interactive development environment (IDE) for Python (specifically, iPython). You may be able to do this through Anaconda's graphical interface, or you can do so from the command line/prompt. To do so, simply open a command line/prompt and type `spyder`. If `econ-ark` is installed into the particular environment, you firstly need activate it and then type `spyder`. `spyder` enables debugging the Python scripts, that is to set breakpoints and call variables in certain spot of your code, in order to find bugs (with increase in your codes' sophistication you will find this tools very helpful). -4. To verify that `spyder` has access to HARK try typing `pip install econ-ark` into the iPython shell within Spyder. If you have successfully installed HARK as above, you should see a lot of messages saying 'Requirement satisfied'. +4. To verify that `spyder` has access to HARK try typing `pip install econ-ark` into the iPython shell within Spyder. If you have successfully installed HARK as above, you should see a lot of messages saying 'Requirement satisfied'. + + - If that doesn't work, you will need to manually add HARK to your Spyder environment. To do this, you'll need to get the code from Github and import it into Spyder. To get the code from Github, you can either clone it or download a zipped file. - * If that doesn't work, you will need to manually add HARK to your Spyder environment. To do this, you'll need to get the code from Github and import it into Spyder. To get the code from Github, you can either clone it or download a zipped file. + - If you have `git` installed on the command line, type `git clone git@github.com:econ-ark/HARK.git` in your chosen directory ([more details here](https://git-scm.com/documentation)). If you get a permission denied error, you may need to setup SSH for GitHub, or you can clone using HTTPS: 'git clone https://github.com/econ-ark/HARK.git'. - * If you have `git` installed on the command line, type `git clone git@github.com:econ-ark/HARK.git` in your chosen directory ([more details here](https://git-scm.com/documentation)). If you get a permission denied error, you may need to setup SSH for GitHub, or you can clone using HTTPS: 'git clone https://github.com/econ-ark/HARK.git'. + - If you do not have `git` available on your computer, you can download the [GitHub Desktop app](https://desktop.github.com/) and use it to make a local clone. - * If you do not have `git` available on your computer, you can download the [GitHub Desktop app](https://desktop.github.com/) and use it to make a local clone. + - If you don't want to clone HARK, but just to download it, go to [the HARK repository on GitHub](https://github.com/econ-ark/HARK). In the upper righthand corner is a button that says "clone or download". Click the "Download Zip" option and then unzip the contents into your chosen directory. - * If you don't want to clone HARK, but just to download it, go to [the HARK repository on GitHub](https://github.com/econ-ark/HARK). In the upper righthand corner is a button that says "clone or download". Click the "Download Zip" option and then unzip the contents into your chosen directory. + Once you've got a copy of HARK in a directory, return to Spyder and navigate to that directory where you put HARK. This can be done within Spyder by doing `import os` and then using `os.chdir()` to change directories. `chdir` works just like cd at a command prompt on most operating systems, except that it takes a string as input: `os.chdir('Music')` moves to the Music subdirectory of the current working directory. Alternatively, you can install `econ-ark` from the local repository by navigating to that directory where you put HARK and then typing at the command line: - Once you've got a copy of HARK in a directory, return to Spyder and navigate to that directory where you put HARK. This can be done within Spyder by doing `import os` and then using `os.chdir()` to change directories. `chdir` works just like cd at a command prompt on most operating systems, except that it takes a string as input: `os.chdir('Music')` moves to the Music subdirectory of the current working directory. Alternatively, you can install `econ-ark` from the local repository by navigating to that directory where you put HARK and then typing at the command line: - ``` - pip install -e . - ``` -## Content Aside from the Toolkit + ``` + pip install -e . + ``` + +## Content Aside from the Toolkit If you don't already have one, you should designate a place on your computer where you will be putting all the Econ-ARK content. For example, it is common to just create a folder `GitHub` in your home user directory. Inside `GitHub` you should create folders @@ -116,43 +132,48 @@ corresponding to the GitHub ID's of users whose work you want to obtain; for exa ### Demonstrations And Illustrations -Most of the modules in HARK are just collections of tools. To look at a demonstrations, check repository: - * [DemARK](https://github.com/econ-ark/DemARK): Demonstrations of the use of HARK +Most of the modules in HARK are just collections of tools. To look at a demonstrations, check repository: \* [DemARK](https://github.com/econ-ark/DemARK): Demonstrations of the use of HARK You will want to obtain your own local copy of these repos using: + ``` git clone https://github.com/econ-ark/DemARK.git ``` + Once you have downloaded them, you will find that the repo contains a `notebooks` directory that contains a number of [jupyter notebooks](https://jupyter.org/). If you have the jupyter notebook tool installed (it is installed as part of Anaconda), you should be able to launch the jupyter notebook app from the command line with the command: -### [REMARK](https://github.com/econ-ark/REMARK/#readme): Replications and Examples Made Using the ARK +### [REMARK](https://github.com/econ-ark/REMARK/#readme): Replications and Examples Made Using the ARK From inside the `GitHub/econ-ark` directory, you will want to obtain your own local copy of the REMARK repo: + ``` git clone https://github.com/econ-ark/REMARK.git ``` Once the download finishes (it should have created `GitHub/econ-ark/REMARK`, change into that directory. -Its root level is mostly descriptive; the main content is in the `REMARKs` subdirectory, so `cd REMARKs` to -have a look at what is there. Each REMARK is contained in a directory with the handle of the REMARK; +Its root level is mostly descriptive; the main content is in the `REMARKs` subdirectory, so `cd REMARKs` to +have a look at what is there. Each REMARK is contained in a directory with the handle of the REMARK; for example, `BufferStockTheory` is the handle for the REMARK on 'The Theoretical Foundations of Buffer Stock Saving'. -At the top level of the directory for each REMARK we have some meta-information (title, authors, etc) and an eponymous Jupyter notebook, e.g. `BufferStockTheory.ipynb.` In most cases there will also be an subdirectory, e.g. `BufferStockTheory` which is a placeholder for the substantive content of the project (like, the original paper). - * Until a REMARK is finalized and frozen, the original content is often kept somewhere else, e.g.\ in an author's GitHub repo. In this case, the REMARK repo uses a `submodule` version, which is sort of like a link to the original material. To save space, a regular 'clone' of the REMARK repo does not incorporate all the submodules; therefore you may find those folders empty when you first use them. In order to obtain the **real** content, in the root directory of the repo in question (e.g., in REMARKs/BufferStockTheory), you need execute the command `git submodule update --recursive --remote`. +At the top level of the directory for each REMARK we have some meta-information (title, authors, etc) and an eponymous Jupyter notebook, e.g. `BufferStockTheory.ipynb.` In most cases there will also be an subdirectory, e.g. `BufferStockTheory` which is a placeholder for the substantive content of the project (like, the original paper). + +- Until a REMARK is finalized and frozen, the original content is often kept somewhere else, e.g.\ in an author's GitHub repo. In this case, the REMARK repo uses a `submodule` version, which is sort of like a link to the original material. To save space, a regular 'clone' of the REMARK repo does not incorporate all the submodules; therefore you may find those folders empty when you first use them. In order to obtain the **real** content, in the root directory of the repo in question (e.g., in REMARKs/BufferStockTheory), you need execute the command `git submodule update --recursive --remote`. Once you have downloaded them, you will find that the repo contains a `notebooks` directory that contains a number of [jupyter notebooks](https://jupyter.org/). If you have the jupyter notebook tool installed (it is installed as part of Anaconda), you should be able to launch the jupyter notebook app from the command line with the command: ``` jupyter notebook ``` + If you installed the econ-ark into the particular environment, activate it first and then type `jupyter notebook`. ## Instructions for an advanced user/developer -If you want to make changes or contributions (yay!) to HARK, you'll need to have access to the source files. Installing HARK via pip (either at the command line, or inside Spyder) makes it hard to access those files (and it's a bad idea to mess with the original code anyway because you'll likely forget what changes you made). If you are adept at GitHub, you can [fork](https://help.github.com/en/articles/fork-a-repo) the repo. If you are less experienced, you should download a personal copy of HARK again using `git clone` (see part for a new user) or the GitHub Desktop app. + +If you want to make changes or contributions (yay!) to HARK, you'll need to have access to the source files. Installing HARK via pip (either at the command line, or inside Spyder) makes it hard to access those files (and it's a bad idea to mess with the original code anyway because you'll likely forget what changes you made). If you are adept at GitHub, you can [fork](https://help.github.com/en/articles/fork-a-repo) the repo. If you are less experienced, you should download a personal copy of HARK again using `git clone` (see part for a new user) or the GitHub Desktop app. 1. Navigate to wherever you want to put the repository and type `git clone git@github.com:econ-ark/HARK.git` ([more details here](https://git-scm.com/documentation)). If you get a permission denied error, you may need to setup SSH for GitHub, or you can clone using HTTPS: 'git clone https://github.com/econ-ark/HARK.git'. -2. Then, create and activate a [virtual environment]([virtualenv]((https://virtualenv.pypa.io/en/latest/))). +2. Then, create and activate a [virtual environment](<[virtualenv]((https://virtualenv.pypa.io/en/latest/))>). Install virtualenv if you need to and then type: @@ -160,7 +181,9 @@ Install virtualenv if you need to and then type: virtualenv econ-ark source econ-ark/bin/activate ``` + For Windows: + ``` virtualenv econ-ark econ-ark\Scripts\activate.bat @@ -168,24 +191,29 @@ econ-ark\Scripts\activate.bat 4. Make sure to change to HARK directory, and install HARK's requirements into the virtual environment with `pip install -r requirements.txt`. -5. Install locally the econ-ark: navigate to your local repository and then type: +5. Install locally the econ-ark: navigate to your local repository and then type: ``` pip install -e . ``` - 5. To check that everything has been set up correctly, run HARK's tests with `python -m unittest`. + --- + **!NOTE** To check the package performance with your local changes, use the same command from the command line (after navigating to your HARK directory): + ``` pip install -e . ``` + If for some reason you want to switch back to the PyPI version: + ``` pip uninstall econ-ark pip install econ-ark (options) ``` + --- diff --git a/Documentation/introduction.md b/Documentation/introduction.md index b9c45f54c..966f324df 100644 --- a/Documentation/introduction.md +++ b/Documentation/introduction.md @@ -1,15 +1,15 @@ # Introduction -If you are willing to risk some mild psychological trauma, conjure to mind your first experience of hand-coding a structural economic model. Your clunky effort probably built on legacy code provided by an adviser or colleague -- which itself came from who-knows-what apocryphal sources. Efforts to combine elements from one model with those from another were likely frustrated by the ''Tower of Babel'' problem: Code from one source could not ''speak'' to code from another without your own intermediation as a translator, possibly between two unfamiliar languages and aided only by oracular comments that, at best, made sense only in the context of other (now missing) code. +If you are willing to risk some mild psychological trauma, conjure to mind your first experience of hand-coding a structural economic model. Your clunky effort probably built on legacy code provided by an adviser or colleague -- which itself came from who-knows-what apocryphal sources. Efforts to combine elements from one model with those from another were likely frustrated by the ''Tower of Babel'' problem: Code from one source could not ''speak'' to code from another without your own intermediation as a translator, possibly between two unfamiliar languages and aided only by oracular comments that, at best, made sense only in the context of other (now missing) code. After months of effort, you may have had the character-improving experience of proudly explaining to your adviser that not only had you grafted two ideas together, you also found a trick that speeded the solution by an order of magnitude, only to be told that your breathtaking insight had been understood for many years, as reflected in an appendix to a 2008 paper; or, worse, your discovery was something that ''everybody knows'' but did not exist at all in published form! -Learning by doing has value, but only within limits. We do not require young drivers to design an internal combustion engine before driving a car, nor must graduate students write their own matrix inversion algorithms before running an OLS regression. +Learning by doing has value, but only within limits. We do not require young drivers to design an internal combustion engine before driving a car, nor must graduate students write their own matrix inversion algorithms before running an OLS regression. -In recent years, considerable progress has been made in addressing these kinds of problems in many areas of economic modeling. Macroeconomists using representative agent models can send Dynare model files to each other; reduced form econometricians can choose from a host of econometric packages. But modelers whose questions require explicit structural modeling which involve nontrivial differences in agents (households, firms, etc.) that cannot simply be aggregated away are mostly still stuck in the bad old days. +In recent years, considerable progress has been made in addressing these kinds of problems in many areas of economic modeling. Macroeconomists using representative agent models can send Dynare model files to each other; reduced form econometricians can choose from a host of econometric packages. But modelers whose questions require explicit structural modeling which involve nontrivial differences in agents (households, firms, etc.) that cannot simply be aggregated away are mostly still stuck in the bad old days. -The ultimate goal of the HARK project is to fix these problems. Specifically, our aim is to produce an open source repository of highly modular, easily interoperable code for solving, simulating, and estimating dynamic economic models with *heterogeneous agents*. [1](#footnote_intro1) Further, we seek to establish (with input from the community) standards for the description and specification of objects like discrete approximations to continuous distributions and interpolated function approximations, so that numeric methods can be quickly swapped without ugly ''patching.'' +The ultimate goal of the HARK project is to fix these problems. Specifically, our aim is to produce an open source repository of highly modular, easily interoperable code for solving, simulating, and estimating dynamic economic models with _heterogeneous agents_. [1](#footnote_intro1) Further, we seek to establish (with input from the community) standards for the description and specification of objects like discrete approximations to continuous distributions and interpolated function approximations, so that numeric methods can be quickly swapped without ugly ''patching.'' -We hope that HARK will make it much easier and faster for researchers to develop solution and estimation methods for new models. The open source nature of HARK will make it easier for other researchers to audit and verify new models and methods, and to collaborate on correcting deficiencies when found. As HARK expands to include more canonical models and more tools and utilities, we can all spend less time managing numerical minutiae and more time fretting about identification arguments and data accuracy. +We hope that HARK will make it much easier and faster for researchers to develop solution and estimation methods for new models. The open source nature of HARK will make it easier for other researchers to audit and verify new models and methods, and to collaborate on correcting deficiencies when found. As HARK expands to include more canonical models and more tools and utilities, we can all spend less time managing numerical minutiae and more time fretting about identification arguments and data accuracy. -1: By ''heterogeneous,'' we mean that agents might differ before anything in the model has ''happened'' (*ex-ante* heterogeneity); and agents might experience different stochastic events during the model (*ex-post* heterogeneity). [↩](#intro1) +1: By ''heterogeneous,'' we mean that agents might differ before anything in the model has ''happened'' (_ex-ante_ heterogeneity); and agents might experience different stochastic events during the model (_ex-post_ heterogeneity). [↩](#intro1) diff --git a/Documentation/quick-start.md b/Documentation/quick-start.md index 73c4ff147..568de40c4 100644 --- a/Documentation/quick-start.md +++ b/Documentation/quick-start.md @@ -23,7 +23,8 @@ virtualenv econ-ark source econ-ark/bin/activate ``` ----- +--- + ### Using HARK with Anaconda If you intend ever to use the toolkit for anything other than running the precooked material we have provided, you should probably install [Anaconda](https://anaconda.com/), which will install python along with many packages that are frequently used in scientific computing. @@ -31,73 +32,78 @@ If you intend ever to use the toolkit for anything other than running the precoo 1. Download Anaconda for your operating system and follow the installation instructions [at Anaconda.com](https://www.anaconda.com/distribution/#download-section). 1. Anaconda includes its own virtual environment system called `conda` which stores environments in a preset location (so you don't have to choose). So in order to create and activate an econ-ark virtual environment: + ``` conda create -n econ-ark anaconda conda activate econ-ark conda install -c conda-forge econ-ark ``` -1. Open Spyder, an interactive development environment (IDE) for Python (specifically, iPython). You may be able to do this through Anaconda's graphical interface, or you can do so from the command line/prompt. To do so, simply open a command line/prompt and type `spyder`. -1. To verify that spyder has access to HARK try typing `pip install econ-ark` into the iPython shell within Spyder. If you have successfully installed HARK as above, you should see a lot of messages saying 'Requirement satisfied'. +1. Open Spyder, an interactive development environment (IDE) for Python (specifically, iPython). You may be able to do this through Anaconda's graphical interface, or you can do so from the command line/prompt. To do so, simply open a command line/prompt and type `spyder`. + +1. To verify that spyder has access to HARK try typing `pip install econ-ark` into the iPython shell within Spyder. If you have successfully installed HARK as above, you should see a lot of messages saying 'Requirement satisfied'. - * If that doesn't work, you will need to manually add HARK to your Spyder environment. To do this, you'll need to get the code from Github and import it into Spyder. To get the code from Github, you can either clone it or download a zipped file. + - If that doesn't work, you will need to manually add HARK to your Spyder environment. To do this, you'll need to get the code from Github and import it into Spyder. To get the code from Github, you can either clone it or download a zipped file. - * If you have `git` installed on the command line, type `git clone git@github.com:econ-ark/HARK.git` in your chosen directory ([more details here](https://git-scm.com/documentation)). + - If you have `git` installed on the command line, type `git clone git@github.com:econ-ark/HARK.git` in your chosen directory ([more details here](https://git-scm.com/documentation)). - * If you do not have `git` available on your computer, you can download the [GitHub Desktop app](https://desktop.github.com/) and use it to make a local clone + - If you do not have `git` available on your computer, you can download the [GitHub Desktop app](https://desktop.github.com/) and use it to make a local clone - * If you don't want to clone HARK, but just to download it, go to [the HARK repository on GitHub](https://github.com/econ-ark/HARK). In the upper righthand corner is a button that says "clone or download". Click the "Download Zip" option and then unzip the contents into your chosen directory. + - If you don't want to clone HARK, but just to download it, go to [the HARK repository on GitHub](https://github.com/econ-ark/HARK). In the upper righthand corner is a button that says "clone or download". Click the "Download Zip" option and then unzip the contents into your chosen directory. - Once you've got a copy of HARK in a directory, return to Spyder and navigate to that directory where you put HARK. This can be done within Spyder by doing `import os` and then using `os.chdir()` to change directories. `chdir` works just like cd at a command prompt on most operating systems, except that it takes a string as input: `os.chdir('Music')` moves to the Music subdirectory of the current working directory. + Once you've got a copy of HARK in a directory, return to Spyder and navigate to that directory where you put HARK. This can be done within Spyder by doing `import os` and then using `os.chdir()` to change directories. `chdir` works just like cd at a command prompt on most operating systems, except that it takes a string as input: `os.chdir('Music')` moves to the Music subdirectory of the current working directory. -6) Most of the modules in HARK are just collections of tools. There are a few demonstration -applications that use the tools that you automatically get when you install HARK -- they are listed in the sidebar at the left. A much larger set of uses of HARK can be found at two repositories: - * [DemARK](https://github.com/econ-ark/DemARK): Demonstrations of the use of HARK - * [REMARK](https://github.com/econ-ark/REMARK): Replications of existing papers made using HARK +6) Most of the modules in HARK are just collections of tools. There are a few demonstration + applications that use the tools that you automatically get when you install HARK -- they are listed in the sidebar at the left. A much larger set of uses of HARK can be found at two repositories: + _ [DemARK](https://github.com/econ-ark/DemARK): Demonstrations of the use of HARK + _ [REMARK](https://github.com/econ-ark/REMARK): Replications of existing papers made using HARK You will want to obtain your own local copy of these repos using: + ``` git clone https://github.com/econ-ark/DemARK.git ``` + and similarly for the REMARK repo. Once you have downloaded them, you will find that each repo contains a `notebooks` directory that contains a number of [jupyter notebooks](https://jupyter.org/). If you have the jupyter notebook tool installed (it is installed as part of Anaconda), you should be able to launch the jupyter notebook app from the command line with the command: ``` jupyter notebook ``` + and from there you can open the notebooks and execute them. ## Learning HARK -We have a set of 30-second [Elevator Spiels](https://github.com/econ-ark/PARK/blob/master/Elevator-Spiels.md#capsule-summaries-of-what-the-econ-ark-project-is) describing the project, tailored to people with several different kinds of background. +We have a set of 30-second [Elevator Spiels](https://github.com/econ-ark/PARK/blob/master/Elevator-Spiels.md#capsule-summaries-of-what-the-econ-ark-project-is) describing the project, tailored to people with several different kinds of background. -The most broadly applicable advice is to go to [Econ-ARK](https://econ-ark.org) and click on "Notebooks", and choose [A Gentle Introduction to HARK](https://hark.readthedocs.io/en/latest/search.html?q=%22A+Gentle+Introduction+to+HARK%22&check_keywords=yes&area=default#) which will launch as a [jupyter notebook](https://jupyter.org/). +The most broadly applicable advice is to go to [Econ-ARK](https://econ-ark.org) and click on "Notebooks", and choose [A Gentle Introduction to HARK](https://hark.readthedocs.io/en/latest/search.html?q=%22A+Gentle+Introduction+to+HARK%22&check_keywords=yes&area=default#) which will launch as a [jupyter notebook](https://jupyter.org/). #### [For people with a technical/scientific/computing background but little economics background](https://github.com/econ-ark/PARK/blob/master/Elevator-Spiels.md#for-people-with-a-technicalscientificcomputing-background-but-no-economics-background) -* A good starting point is [A Gentle Introduction to HARK](https://hark.readthedocs.io/en/latest/search.html?q=%22A+Gentle+Introduction+to+HARK%22&check_keywords=yes&area=default#) which provides a light economic intuition. +- A good starting point is [A Gentle Introduction to HARK](https://hark.readthedocs.io/en/latest/search.html?q=%22A+Gentle+Introduction+to+HARK%22&check_keywords=yes&area=default#) which provides a light economic intuition. #### [For economists who have done some structural modeling](https://github.com/econ-ark/PARK/blob/master/Elevator-Spiels.md#for-economists-who-have-done-some-structural-modeling) -* A full replication of the [Iskhakov, Jørgensen, Rust, and Schjerning](https://onlinelibrary.wiley.com/doi/abs/10.3982/QE643) paper for solving the discrete-continuous retirement saving problem - * An informal discussion of the issues involved is [here](https://github.com/econ-ark/DemARK/blob/master/notebooks/DCEGM-Upper-Envelope.ipynb) (part of the [DemARK](https://github.com/econ-ark/DemARK) repo) +- A full replication of the [Iskhakov, Jørgensen, Rust, and Schjerning](https://onlinelibrary.wiley.com/doi/abs/10.3982/QE643) paper for solving the discrete-continuous retirement saving problem -* [Structural-Estimates-From-Empirical-MPCs](https://github.com/econ-ark/DemARK/blob/master/notebooks/Structural-Estimates-From-Empirical-MPCs-Fagereng-et-al.ipynb) is an example of the use of the toolkit in a discussion of a well known paper. (Yes, it is easy enough to use that you can estimate a structural model on somebody else's data in the limited time available for writing a discussion) + - An informal discussion of the issues involved is [here](https://github.com/econ-ark/DemARK/blob/master/notebooks/DCEGM-Upper-Envelope.ipynb) (part of the [DemARK](https://github.com/econ-ark/DemARK) repo) + +- [Structural-Estimates-From-Empirical-MPCs](https://github.com/econ-ark/DemARK/blob/master/notebooks/Structural-Estimates-From-Empirical-MPCs-Fagereng-et-al.ipynb) is an example of the use of the toolkit in a discussion of a well known paper. (Yes, it is easy enough to use that you can estimate a structural model on somebody else's data in the limited time available for writing a discussion) #### [For economists who have not yet done any structural modeling but might be persuadable to start](https://github.com/econ-ark/PARK/blob/master/Elevator-Spiels.md#for-economists-who-have-not-yet-done-any-structural-modeling-but-might-be-persuadable-to-start) -* Start with [A Gentle Introduction to HARK](https://hark.readthedocs.io/en/latest/search.html?q=%22A+Gentle+Introduction+to+HARK%22&check_keywords=yes&area=default#) to get your feet wet +- Start with [A Gentle Introduction to HARK](https://hark.readthedocs.io/en/latest/search.html?q=%22A+Gentle+Introduction+to+HARK%22&check_keywords=yes&area=default#) to get your feet wet -* A simple indirect inference/simulated method of moments structural estimation along the lines of Gourinchas and Parker's 2002 Econometrica paper or Cagetti's 2003 paper is performed by the [SolvingMicroDSOPs](https://github.com/econ-ark/REMARK/tree/master/REMARKs/SolvingMicroDSOPs) [REMARK](https://github.com/econ-ark/REMARK); this code implements the solution methods described in the corresponding section of [these lecture notes](http://www.econ2.jhu.edu/people/ccarroll/SolvingMicroDSOPs/) +- A simple indirect inference/simulated method of moments structural estimation along the lines of Gourinchas and Parker's 2002 Econometrica paper or Cagetti's 2003 paper is performed by the [SolvingMicroDSOPs](https://github.com/econ-ark/REMARK/tree/master/REMARKs/SolvingMicroDSOPs) [REMARK](https://github.com/econ-ark/REMARK); this code implements the solution methods described in the corresponding section of [these lecture notes](http://www.econ2.jhu.edu/people/ccarroll/SolvingMicroDSOPs/) #### [For Other Developers of Software for Computational Economics](https://github.com/econ-ark/PARK/blob/master/Elevator-Spiels.md#for-other-developers-of-software-for-computational-economics) - -* Our workhorse module is [ConsIndShockModel.py](https://github.com/econ-ark/HARK/blob/master/HARK/ConsumptionSaving/ConsIndShockModel.py) which includes the IndShockConsumerType. A short explanation about the Agent Type can be found [here](https://hark.readthedocs.io/en/latest/search.html?q=%22IndShockConsumerType+Documentation%22&check_keywords=yes&area=default#) and an introduction how it is solved [here](https://hark.readthedocs.io/en/latest/search.html?q=%22How+we+solve+a+model+defined+by+the+IndShockConsumerType+class%22&check_keywords=yes&area=default#). +- Our workhorse module is [ConsIndShockModel.py](https://github.com/econ-ark/HARK/blob/master/HARK/ConsumptionSaving/ConsIndShockModel.py) which includes the IndShockConsumerType. A short explanation about the Agent Type can be found [here](https://hark.readthedocs.io/en/latest/search.html?q=%22IndShockConsumerType+Documentation%22&check_keywords=yes&area=default#) and an introduction how it is solved [here](https://hark.readthedocs.io/en/latest/search.html?q=%22How+we+solve+a+model+defined+by+the+IndShockConsumerType+class%22&check_keywords=yes&area=default#). ## Making changes to HARK -If you want to make changes or contributions to HARK, you'll need to have access to the source files. Installing HARK via `pip install econ-ark` (at the command line, or inside Spyder) makes it hard to access those files (and it's a bad idea to mess with the original code anyway because you'll likely forget what changes you made). If you are adept at GitHub, you can [fork](https://help.github.com/en/articles/fork-a-repo) the repo. If you are less experienced, you should download a personal copy of HARK again using `git clone` (see above) or the GitHub Desktop app. +If you want to make changes or contributions to HARK, you'll need to have access to the source files. Installing HARK via `pip install econ-ark` (at the command line, or inside Spyder) makes it hard to access those files (and it's a bad idea to mess with the original code anyway because you'll likely forget what changes you made). If you are adept at GitHub, you can [fork](https://help.github.com/en/articles/fork-a-repo) the repo. If you are less experienced, you should download a personal copy of HARK again using `git clone` (see above) or the GitHub Desktop app. #### Clone HARK @@ -109,13 +115,15 @@ If you are familiar with [virtual environments](https://virtualenv.pypa.io/en/la For Mac or Linux: -* Install virtualenv if you need to and then type: +- Install virtualenv if you need to and then type: ``` virtualenv econ-ark source econ-ark/bin/activate ``` -* For Windows: + +- For Windows: + ``` virtualenv econ-ark econ-ark\\Scripts\\activate.bat @@ -136,4 +144,3 @@ To check that everything has been set up correctly, run HARK's tests with `pytho To learn more about how to use HARK, check the next sections in this documentation, in particular the jupyter notebooks. For help making changes to HARK, check out our [contributing guide](contributing/CONTRIBUTING.md). - diff --git a/Documentation/reference/ConsumptionSaving/ConsAggShockModel.rst b/Documentation/reference/ConsumptionSaving/ConsAggShockModel.rst index 31b828dc3..ae159de8c 100644 --- a/Documentation/reference/ConsumptionSaving/ConsAggShockModel.rst +++ b/Documentation/reference/ConsumptionSaving/ConsAggShockModel.rst @@ -4,4 +4,4 @@ ConsAggShockModel .. automodule:: HARK.ConsumptionSaving.ConsAggShockModel :members: :undoc-members: - :show-inheritance: \ No newline at end of file + :show-inheritance: diff --git a/Documentation/reference/ConsumptionSaving/ConsGenIncProcessModel.rst b/Documentation/reference/ConsumptionSaving/ConsGenIncProcessModel.rst index 43dbdb9c9..3a06764eb 100644 --- a/Documentation/reference/ConsumptionSaving/ConsGenIncProcessModel.rst +++ b/Documentation/reference/ConsumptionSaving/ConsGenIncProcessModel.rst @@ -4,4 +4,4 @@ ConsGenIncProcessModel .. automodule:: HARK.ConsumptionSaving.ConsGenIncProcessModel :members: :undoc-members: - :show-inheritance: \ No newline at end of file + :show-inheritance: diff --git a/Documentation/reference/ConsumptionSaving/ConsLaborModel.rst b/Documentation/reference/ConsumptionSaving/ConsLaborModel.rst index c36b30d43..9f44cca11 100644 --- a/Documentation/reference/ConsumptionSaving/ConsLaborModel.rst +++ b/Documentation/reference/ConsumptionSaving/ConsLaborModel.rst @@ -4,4 +4,4 @@ ConsLaborModel .. automodule:: HARK.ConsumptionSaving.ConsLaborModel :members: :undoc-members: - :show-inheritance: \ No newline at end of file + :show-inheritance: diff --git a/Documentation/reference/ConsumptionSaving/ConsMarkovModel.rst b/Documentation/reference/ConsumptionSaving/ConsMarkovModel.rst index 02bfe971c..9a44bc439 100644 --- a/Documentation/reference/ConsumptionSaving/ConsMarkovModel.rst +++ b/Documentation/reference/ConsumptionSaving/ConsMarkovModel.rst @@ -4,4 +4,4 @@ ConsMarkovModel .. automodule:: HARK.ConsumptionSaving.ConsMarkovModel :members: :undoc-members: - :show-inheritance: \ No newline at end of file + :show-inheritance: diff --git a/Documentation/reference/ConsumptionSaving/ConsMedModel.rst b/Documentation/reference/ConsumptionSaving/ConsMedModel.rst index 73c5e71ff..e151c32e5 100644 --- a/Documentation/reference/ConsumptionSaving/ConsMedModel.rst +++ b/Documentation/reference/ConsumptionSaving/ConsMedModel.rst @@ -4,4 +4,4 @@ ConsMedModel .. automodule:: HARK.ConsumptionSaving.ConsMedModel :members: :undoc-members: - :show-inheritance: \ No newline at end of file + :show-inheritance: diff --git a/Documentation/reference/ConsumptionSaving/ConsPortfolioModel.rst b/Documentation/reference/ConsumptionSaving/ConsPortfolioModel.rst index ecb83cea5..e46f1e129 100644 --- a/Documentation/reference/ConsumptionSaving/ConsPortfolioModel.rst +++ b/Documentation/reference/ConsumptionSaving/ConsPortfolioModel.rst @@ -4,4 +4,4 @@ ConsPortfolioModel .. automodule:: HARK.ConsumptionSaving.ConsPortfolioModel :members: :undoc-members: - :show-inheritance: \ No newline at end of file + :show-inheritance: diff --git a/Documentation/reference/ConsumptionSaving/ConsPrefShochModel.rst b/Documentation/reference/ConsumptionSaving/ConsPrefShochModel.rst index 3dd6daff1..4fcc2f0f9 100644 --- a/Documentation/reference/ConsumptionSaving/ConsPrefShochModel.rst +++ b/Documentation/reference/ConsumptionSaving/ConsPrefShochModel.rst @@ -4,4 +4,4 @@ ConsPrefShockModel .. automodule:: HARK.ConsumptionSaving.ConsPrefShockModel :members: :undoc-members: - :show-inheritance: \ No newline at end of file + :show-inheritance: diff --git a/Documentation/reference/ConsumptionSaving/ConsRepAgentModel.rst b/Documentation/reference/ConsumptionSaving/ConsRepAgentModel.rst index 3f405c343..5ff47aa94 100644 --- a/Documentation/reference/ConsumptionSaving/ConsRepAgentModel.rst +++ b/Documentation/reference/ConsumptionSaving/ConsRepAgentModel.rst @@ -4,4 +4,4 @@ ConsRepAgentModel .. automodule:: HARK.ConsumptionSaving.ConsRepAgentModel :members: :undoc-members: - :show-inheritance: \ No newline at end of file + :show-inheritance: diff --git a/Documentation/reference/ConsumptionSaving/TractableBufferStockModel.rst b/Documentation/reference/ConsumptionSaving/TractableBufferStockModel.rst index 7b0fa2c68..556723e97 100644 --- a/Documentation/reference/ConsumptionSaving/TractableBufferStockModel.rst +++ b/Documentation/reference/ConsumptionSaving/TractableBufferStockModel.rst @@ -4,4 +4,4 @@ TractableBufferStockModel .. automodule:: HARK.ConsumptionSaving.TractableBufferStockModel :members: :undoc-members: - :show-inheritance: \ No newline at end of file + :show-inheritance: diff --git a/Documentation/reference/tools/core.rst b/Documentation/reference/tools/core.rst index 095a3de41..c16ace476 100644 --- a/Documentation/reference/tools/core.rst +++ b/Documentation/reference/tools/core.rst @@ -4,4 +4,4 @@ Core .. automodule:: HARK.core :members: :undoc-members: - :show-inheritance: \ No newline at end of file + :show-inheritance: diff --git a/Documentation/reference/tools/dcegm.rst b/Documentation/reference/tools/dcegm.rst index 3888320f7..80a2f612f 100644 --- a/Documentation/reference/tools/dcegm.rst +++ b/Documentation/reference/tools/dcegm.rst @@ -4,4 +4,4 @@ dcegm .. automodule:: HARK.dcegm :members: :undoc-members: - :show-inheritance: \ No newline at end of file + :show-inheritance: diff --git a/Documentation/reference/tools/distribution.rst b/Documentation/reference/tools/distribution.rst index 5d26b5da3..6d2627fcd 100644 --- a/Documentation/reference/tools/distribution.rst +++ b/Documentation/reference/tools/distribution.rst @@ -4,4 +4,4 @@ Distribution .. automodule:: HARK.distribution :members: :undoc-members: - :show-inheritance: \ No newline at end of file + :show-inheritance: diff --git a/Documentation/reference/tools/estimation.rst b/Documentation/reference/tools/estimation.rst index 3f9614516..943b7c887 100644 --- a/Documentation/reference/tools/estimation.rst +++ b/Documentation/reference/tools/estimation.rst @@ -4,4 +4,4 @@ Estimation .. automodule:: HARK.estimation :members: :undoc-members: - :show-inheritance: \ No newline at end of file + :show-inheritance: diff --git a/Documentation/reference/tools/helpers.rst b/Documentation/reference/tools/helpers.rst index 186e184a7..8346f56dd 100644 --- a/Documentation/reference/tools/helpers.rst +++ b/Documentation/reference/tools/helpers.rst @@ -4,4 +4,4 @@ Helpers .. automodule:: HARK.helpers :members: :undoc-members: - :show-inheritance: \ No newline at end of file + :show-inheritance: diff --git a/Documentation/reference/tools/interpolation.rst b/Documentation/reference/tools/interpolation.rst index 9426f52ac..9e126ca34 100644 --- a/Documentation/reference/tools/interpolation.rst +++ b/Documentation/reference/tools/interpolation.rst @@ -4,4 +4,4 @@ Interpolation .. automodule:: HARK.interpolation :members: :undoc-members: - :show-inheritance: \ No newline at end of file + :show-inheritance: diff --git a/Documentation/reference/tools/parallel.rst b/Documentation/reference/tools/parallel.rst index 3829c9003..0fa730c8e 100644 --- a/Documentation/reference/tools/parallel.rst +++ b/Documentation/reference/tools/parallel.rst @@ -4,4 +4,4 @@ Parallel .. automodule:: HARK.parallel :members: :undoc-members: - :show-inheritance: \ No newline at end of file + :show-inheritance: diff --git a/Documentation/reference/tools/simulation.rst b/Documentation/reference/tools/simulation.rst index b9c0598f4..55e17756f 100644 --- a/Documentation/reference/tools/simulation.rst +++ b/Documentation/reference/tools/simulation.rst @@ -4,4 +4,4 @@ Simulation .. automodule:: HARK.simulation :members: :undoc-members: - :show-inheritance: \ No newline at end of file + :show-inheritance: diff --git a/Documentation/reference/tools/utilities.rst b/Documentation/reference/tools/utilities.rst index e706e6a68..81c2b909f 100644 --- a/Documentation/reference/tools/utilities.rst +++ b/Documentation/reference/tools/utilities.rst @@ -4,4 +4,4 @@ Utilities .. automodule:: HARK.utilities :members: :undoc-members: - :show-inheritance: \ No newline at end of file + :show-inheritance: diff --git a/Documentation/reference/tools/validators.rst b/Documentation/reference/tools/validators.rst index 5fddee5b3..df5abf338 100644 --- a/Documentation/reference/tools/validators.rst +++ b/Documentation/reference/tools/validators.rst @@ -4,4 +4,4 @@ Validators .. automodule:: HARK.validators :members: :undoc-members: - :show-inheritance: \ No newline at end of file + :show-inheritance: diff --git a/Documentation/texmf-local/bibtex/bib/economics-UTF8.bib b/Documentation/texmf-local/bibtex/bib/economics-UTF8.bib index 96d8a9591..dea710f13 100644 --- a/Documentation/texmf-local/bibtex/bib/economics-UTF8.bib +++ b/Documentation/texmf-local/bibtex/bib/economics-UTF8.bib @@ -1336,7 +1336,7 @@ @article{geometricDeath doi = {arxiv.org/abs/1712.01431}, url = {https://arxiv.org/abs/1712.01431} } - + @Unpublished{MaTodaMPC, author = {Ma, Qingyin and Toda, Alexis Akira}, @@ -1494,7 +1494,7 @@ @article{khanMacroPru journal = {Department of Economics, Johns Hopkins University}, year = {2019}, url = {https://pdfs.semanticscholar.org/8e9d/dfe7c204bbfa8a23f42f4931461fb467fc08.pdf?_ga=2.95712860.1156899890.1563925023-1991616136.1563925023} -} +} @article{SSinHANK, title = {Monetary Policy Transmission with Many Agents}, @@ -1502,8 +1502,8 @@ @article{SSinHANK journal = {Manuscript, Johns Hopkins University}, year = {2019}, month = {March}, -} - +} + @article{blSolving, title = {Solving Heterogeneous Agent Models In Discrete Time With Many Idiosyncratic States By Perturbation Methods}, author = {Christian Bayer and Ralph Luetticke}, @@ -1511,7 +1511,7 @@ @article{blSolving volume = {Discussion Paper 13071}, year = 2018 } - + @article{carrollHeteroAndMacro, title = {Heterogeneity and Macro Modeling In Policymaking Institutions}, year = {2019}, @@ -2117,9 +2117,9 @@ @inproceedings{ParkerSoulelesCarroll Christopher D. Carroll}, title = {The Benefits of Panel Data in Consumer Expenditure Surveys}, - booktitle = {Improving the Measurement of Consumer Expenditures}, + booktitle = {Improving the Measurement of Consumer Expenditures}, chapter = {7}, - note = {Final version at + note = {Final version at \href{https://www.econ2.jhu.edu/people/ccarroll/papers/ParkerSoulelesCarroll/}{\texttt{https://www.econ2.jhu.edu/people/ccarroll/papers/ParkerSoulelesCarroll/}}}, url = {https://www.econ2.jhu.edu/people/ccarroll/papers/ParkerSoulelesCarroll/} } @@ -2899,7 +2899,7 @@ @article{cAndCwithStickyE month = {July}, author = {Christopher D. Carroll and Edmund Crawley and Jiri Slacalek and Kiichi Tokuoka and Matthew N. White} } - + @article{edge2007learning, title={Learning and shifts in long-run productivity growth}, author={Edge, Rochelle M and Laubach, Thomas and Williams, John C}, @@ -3124,7 +3124,7 @@ @article{druedahlNEGM title = {A Fast Nested Endogenous Grid Method for Solving General Consumption-Saving Models}, author = {Druedahl, Jeppe}, journal = {Manuscript, University of Copenhagen} -} +} @Article{JBES1982, author={Perraudin, William R M and Sorensen, Bent E}, @@ -3810,7 +3810,7 @@ @techreport{akmwwInequality-Discuss @inbook{akmwwInequality-DiscussNew, Crossref = "NBEReich-4", title = {Comment on `When Inequality Matters for Macro and Macro Matters for Inequality'}, - author = {SeHyoun Ahn and Greg Kaplan and Benjamin Moll and Thomas Winberry and Christian Wolf}, + author = {SeHyoun Ahn and Greg Kaplan and Benjamin Moll and Thomas Winberry and Christian Wolf}, Publisher = "NBER Macroeconomics Annual 2017, volume 32, University of Chicago Press", pages = "76-92", year = "2017", @@ -3957,7 +3957,7 @@ @article{grodzickiCCC journal={The Pennsylvania State University}, year={2015} } - + @article{ausubelFailure, title={The failure of competition in the credit card market}, author={Ausubel, Lawrence M}, @@ -4063,7 +4063,7 @@ @article{samuelson1937note year={1937}, publisher={JSTOR} } - + @article{samuelson1979we, title={Why we should not make mean log of wealth big though years to act are long}, @@ -4076,7 +4076,7 @@ @article{samuelson1979we publisher={Elsevier}, doi= {http://dx.doi.org/10.1016/0378-4266(79)90023-2} } - + @article{BueraShin2009, title={Productivity Growth and Capital Flows: The Dynamics of Reform}, author={Buera, Francisco and Yongseok Shin}, @@ -4134,7 +4134,7 @@ @techreport{assMiddleClass URL = "http://www.nber.org/papers/w20848", abstract = {We provide new facts on the debt dynamics leading up to the financial crisis of 2007. Earlier research suggests that distortions in the supply of mortgage credit, evidenced by a decoupling of credit flow from income growth, may have caused the rise in house prices and the subsequent housing market collapse. This paper shows that the increase in mortgage originations was shared across the whole distribution of borrowers, and that middle- and high-income borrowers made up the majority of originations even at the peak of the boom. Compared to prior years, middle- and high-income borrowers (not the poor), as well as those with medium and high credit scores, made up a much larger share of delinquencies in the crisis relative to earlier years. We show that the relation between individual mortgage size and income growth during the housing boom was always strongly positive, also in line with previous periods (and independent of how income is measured). These results are most consistent with an expectations based view of the financial crisis in which both homebuyers and lenders were buying into increasing housing values and defaulted once prices dropped. }, } - + @TECHREPORT{aydinMPCLiq, title = {The Marginal Propensity to Consume out of Liquidity}, author = {Aydin, Deniz}, @@ -11752,7 +11752,7 @@ @article{gross&souleles:creditcards year={2002}, publisher={Oxford University Press} } - + @ARTICLE{gross&souleles:bankruptcy, author = {Gross, David B. and Souleles, Nicholas S.}, title = {Explaining the Rise in Bankruptcy and Delinquency: @@ -12837,7 +12837,7 @@ @ARTICLE{ipsUnitHetero volume = 115, pages = {53--74} } - + @INBOOK{IMFweo2012, chapter = 3, title = {World Economic Outlook, 2012}, @@ -23114,4 +23114,3 @@ @string{restud @string{rfs = {review of financial studies}} @string{rje = {rand journal of economics}} - diff --git a/Documentation/texmf-local/bibtex/bib/economics.bib b/Documentation/texmf-local/bibtex/bib/economics.bib index d6d5b85cf..1da2f39b1 100644 --- a/Documentation/texmf-local/bibtex/bib/economics.bib +++ b/Documentation/texmf-local/bibtex/bib/economics.bib @@ -108,7 +108,7 @@ @article{rsHANKandSAM publisher={CEPR Discussion Paper No. DP11696} } -@article{bblShocks, +@article{bblShocks, title = {Shocks and Frictions in US Business Cycles with Heterogeneous Agents}, year = {2019}, month = {September}, @@ -122,7 +122,7 @@ @article{bptRisk journal = {Econometrica}, year = {2019}, volume = {87} -} +} @article{gdTANK, @@ -1470,7 +1470,7 @@ @article{geometricDeath doi = {arxiv.org/abs/1712.01431}, url = {https://arxiv.org/abs/1712.01431} } - + @Unpublished{MaTodaMPC, author = {Ma, Qingyin and Toda, Alexis Akira}, @@ -1628,7 +1628,7 @@ @article{khanMacroPru journal = {Department of Economics, Johns Hopkins University}, year = {2019}, url = {https://pdfs.semanticscholar.org/8e9d/dfe7c204bbfa8a23f42f4931461fb467fc08.pdf?_ga=2.95712860.1156899890.1563925023-1991616136.1563925023} -} +} @article{SSinHANK, title = {Monetary Policy Transmission with Many Agents}, @@ -1636,8 +1636,8 @@ @article{SSinHANK journal = {Manuscript, Johns Hopkins University}, year = {2019}, month = {March}, -} - +} + @article{blSolving, title = {Solving Heterogeneous Agent Models In Discrete Time With Many Idiosyncratic States By Perturbation Methods}, author = {Christian Bayer and Ralph Luetticke}, @@ -1645,7 +1645,7 @@ @article{blSolving volume = {Discussion Paper 13071}, year = 2018 } - + @article{carrollHeteroAndMacro, title = {Heterogeneity and Macro Modeling In Policymaking Institutions}, year = {2019}, @@ -2251,9 +2251,9 @@ @inproceedings{ParkerSoulelesCarroll Christopher D. Carroll}, title = {The Benefits of Panel Data in Consumer Expenditure Surveys}, - booktitle = {Improving the Measurement of Consumer Expenditures}, + booktitle = {Improving the Measurement of Consumer Expenditures}, chapter = {7}, - note = {Final version at + note = {Final version at \href{https://www.econ2.jhu.edu/people/ccarroll/papers/ParkerSoulelesCarroll/}{\texttt{https://www.econ2.jhu.edu/people/ccarroll/papers/ParkerSoulelesCarroll/}}}, url = {https://www.econ2.jhu.edu/people/ccarroll/papers/ParkerSoulelesCarroll/} } @@ -3033,7 +3033,7 @@ @article{cAndCwithStickyEForthcoming month = {July}, author = {Christopher D. Carroll and Edmund Crawley and Jiri Slacalek and Kiichi Tokuoka and Matthew N. White} } - + @article{edge2007learning, title={Learning and shifts in long-run productivity growth}, author={Edge, Rochelle M and Laubach, Thomas and Williams, John C}, @@ -3258,7 +3258,7 @@ @article{druedahlNEGM title = {A Fast Nested Endogenous Grid Method for Solving General Consumption-Saving Models}, author = {Druedahl, Jeppe}, journal = {Manuscript, University of Copenhagen} -} +} @Article{JBES1982, author={Perraudin, William R M and Sorensen, Bent E}, @@ -3944,7 +3944,7 @@ @techreport{akmwwInequality-Discuss @inbook{akmwwInequality-DiscussNew, Crossref = "NBEReich-4", title = {Comment on `When Inequality Matters for Macro and Macro Matters for Inequality'}, - author = {SeHyoun Ahn and Greg Kaplan and Benjamin Moll and Thomas Winberry and Christian Wolf}, + author = {SeHyoun Ahn and Greg Kaplan and Benjamin Moll and Thomas Winberry and Christian Wolf}, Publisher = "NBER Macroeconomics Annual 2017, volume 32, University of Chicago Press", pages = "76-92", year = "2017", @@ -4091,7 +4091,7 @@ @article{grodzickiCCC journal={The Pennsylvania State University}, year={2015} } - + @article{ausubelFailure, title={The failure of competition in the credit card market}, author={Ausubel, Lawrence M}, @@ -4197,7 +4197,7 @@ @article{samuelson1937note year={1937}, publisher={JSTOR} } - + @article{samuelson1979we, title={Why we should not make mean log of wealth big though years to act are long}, @@ -4210,7 +4210,7 @@ @article{samuelson1979we publisher={Elsevier}, doi= {http://dx.doi.org/10.1016/0378-4266(79)90023-2} } - + @article{BueraShin2009, title={Productivity Growth and Capital Flows: The Dynamics of Reform}, author={Buera, Francisco and Yongseok Shin}, @@ -4268,7 +4268,7 @@ @techreport{assMiddleClass URL = "http://www.nber.org/papers/w20848", abstract = {We provide new facts on the debt dynamics leading up to the financial crisis of 2007. Earlier research suggests that distortions in the supply of mortgage credit, evidenced by a decoupling of credit flow from income growth, may have caused the rise in house prices and the subsequent housing market collapse. This paper shows that the increase in mortgage originations was shared across the whole distribution of borrowers, and that middle- and high-income borrowers made up the majority of originations even at the peak of the boom. Compared to prior years, middle- and high-income borrowers (not the poor), as well as those with medium and high credit scores, made up a much larger share of delinquencies in the crisis relative to earlier years. We show that the relation between individual mortgage size and income growth during the housing boom was always strongly positive, also in line with previous periods (and independent of how income is measured). These results are most consistent with an expectations based view of the financial crisis in which both homebuyers and lenders were buying into increasing housing values and defaulted once prices dropped. }, } - + @TECHREPORT{aydinMPCLiq, title = {The Marginal Propensity to Consume out of Liquidity}, author = {Aydin, Deniz}, @@ -11875,7 +11875,7 @@ @article{gross&souleles:creditcards year={2002}, publisher={Oxford University Press} } - + @ARTICLE{gross&souleles:bankruptcy, author = {Gross, David B. and Souleles, Nicholas S.}, title = {Explaining the Rise in Bankruptcy and Delinquency: @@ -12960,7 +12960,7 @@ @ARTICLE{ipsUnitHetero volume = 115, pages = {53--74} } - + @INBOOK{IMFweo2012, chapter = 3, title = {World Economic Outlook, 2012}, @@ -23237,4 +23237,3 @@ @string{restud @string{rfs = {review of financial studies}} @string{rje = {rand journal of economics}} - diff --git a/Documentation/texmf-local/bibtex/bst/unsrtnatTitlesFirst.bst b/Documentation/texmf-local/bibtex/bst/unsrtnatTitlesFirst.bst index 9c0acffd2..fb0bb89d8 100755 --- a/Documentation/texmf-local/bibtex/bst/unsrtnatTitlesFirst.bst +++ b/Documentation/texmf-local/bibtex/bst/unsrtnatTitlesFirst.bst @@ -7,7 +7,7 @@ %% natbst.mbs (with options: `name-full,atit-lower,month-full,jour-full') %% ---------------------------------------- %% *** Version of `abbrv.bst' for use with natbib package *** -%% +%% % The original source file contains the following version information: % \ProvidesFile{natbst.mbs}[1997/03/19 1.4 (PWD)] @@ -244,7 +244,7 @@ FUNCTION {format.editors} % Got the following code from document called btex101.pdf FUNCTION {format.title} -{ +{ title "``" swap$ * ".'' " * % Put article title in quotes } diff --git a/Documentation/texmf-local/tex/latex/ReadMe.texmf b/Documentation/texmf-local/tex/latex/ReadMe.texmf index 85d44dc6a..9485d0cf2 100644 --- a/Documentation/texmf-local/tex/latex/ReadMe.texmf +++ b/Documentation/texmf-local/tex/latex/ReadMe.texmf @@ -7,11 +7,11 @@ You will likely need the "full" distribution of TeXLive, as many obscure tex pac openout_any = a shell_escape = t -to your local texmf.cnf configuration file. On a standard MacTeX TeXLive distribution, this file is at +to your local texmf.cnf configuration file. On a standard MacTeX TeXLive distribution, this file is at /usr/local/texlive/[year]/texmf.cnf -while on a standard Windows 7 installation it is at +while on a standard Windows 7 installation it is at C:\texlive\[year]\texmf.cnf diff --git a/Documentation/texmf-local/tex/latex/articleNoRefHead.cls b/Documentation/texmf-local/tex/latex/articleNoRefHead.cls index e418b9cc2..6c7ed7683 100755 --- a/Documentation/texmf-local/tex/latex/articleNoRefHead.cls +++ b/Documentation/texmf-local/tex/latex/articleNoRefHead.cls @@ -1 +1 @@ -%% %% This is file `article.cls', %% generated with the docstrip utility. %% %% The original source files were: %% %% classes.dtx (with options: `article') %% %% This is a generated file. %% %% Copyright 1993 1994 1995 1996 1997 1998 1999 %% The LaTeX3 Project and any individual authors listed elsewhere %% in this file. %% %% This file is part of the LaTeX base system. %% ------------------------------------------- %% %% It may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.1 %% of this license or (at your option) any later version. %% The latest version of this license is in %% http://www.latex-project.org/lppl.txt %% and version 1.1 or later is part of all distributions of LaTeX %% version 1999/06/01 or later. %% %% The list of all files belonging to the LaTeX base distribution is %% given in the file `manifest.txt'. See also `legal.txt' for additional %% information. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z %% Digits \0\1\2\3\4\5\6\7\8\9 %% Exclamation \! Double quote \" Hash (number) \# %% Dollar \$ Percent \% Ampersand \& %% Acute accent \' Left paren \( Right paren \) %% Asterisk \* Plus \+ Comma \, %% Minus \- Point \. Solidus \/ %% Colon \: Semicolon \; Less than \< %% Equals \= Greater than \> Question mark \? %% Commercial at \@ Left bracket \[ Backslash \\ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesClass{articleNoRefHead} [1999/01/07 v1.4a Standard LaTeX document class] \newcommand\@ptsize{} \newif\if@restonecol \newif\if@titlepage \@titlepagefalse \if@compatibility\else \DeclareOption{a4paper} {\setlength\paperheight {297mm}% \setlength\paperwidth {210mm}} \DeclareOption{a5paper} {\setlength\paperheight {210mm}% \setlength\paperwidth {148mm}} \DeclareOption{b5paper} {\setlength\paperheight {250mm}% \setlength\paperwidth {176mm}} \DeclareOption{letterpaper} {\setlength\paperheight {11in}% \setlength\paperwidth {8.5in}} \DeclareOption{legalpaper} {\setlength\paperheight {14in}% \setlength\paperwidth {8.5in}} \DeclareOption{executivepaper} {\setlength\paperheight {10.5in}% \setlength\paperwidth {7.25in}} \DeclareOption{landscape} {\setlength\@tempdima {\paperheight}% \setlength\paperheight {\paperwidth}% \setlength\paperwidth {\@tempdima}} \fi \if@compatibility \renewcommand\@ptsize{0} \else \DeclareOption{10pt}{\renewcommand\@ptsize{0}} \fi \DeclareOption{11pt}{\renewcommand\@ptsize{1}} \DeclareOption{12pt}{\renewcommand\@ptsize{2}} \if@compatibility\else \DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse} \fi \DeclareOption{twoside}{\@twosidetrue \@mparswitchtrue} \DeclareOption{draft}{\setlength\overfullrule{5pt}} \if@compatibility\else \DeclareOption{final}{\setlength\overfullrule{0pt}} \fi \DeclareOption{titlepage}{\@titlepagetrue} \if@compatibility\else \DeclareOption{notitlepage}{\@titlepagefalse} \fi \if@compatibility\else \DeclareOption{onecolumn}{\@twocolumnfalse} \fi \DeclareOption{twocolumn}{\@twocolumntrue} \DeclareOption{leqno}{\input{leqno.clo}} \DeclareOption{fleqn}{\input{fleqn.clo}} \DeclareOption{openbib}{% \AtEndOfPackage{% \renewcommand\@openbib@code{% \advance\leftmargin\bibindent \itemindent -\bibindent \listparindent \itemindent \parsep \z@ }% \renewcommand\newblock{\par}}% } \ExecuteOptions{letterpaper,10pt,oneside,onecolumn,final} \ProcessOptions \input{size1\@ptsize.clo} \setlength\lineskip{1\p@} \setlength\normallineskip{1\p@} \renewcommand\baselinestretch{} \setlength\parskip{0\p@ \@plus \p@} \@lowpenalty 51 \@medpenalty 151 \@highpenalty 301 \setcounter{topnumber}{2} \renewcommand\topfraction{.7} \setcounter{bottomnumber}{1} \renewcommand\bottomfraction{.3} \setcounter{totalnumber}{3} \renewcommand\textfraction{.2} \renewcommand\floatpagefraction{.5} \setcounter{dbltopnumber}{2} \renewcommand\dbltopfraction{.7} \renewcommand\dblfloatpagefraction{.5} \if@twoside \def\ps@headings{% \let\@oddfoot\@empty\let\@evenfoot\@empty \def\@evenhead{\thepage\hfil\slshape\leftmark}% \def\@oddhead{{\slshape\rightmark}\hfil\thepage}% \let\@mkboth\markboth \def\sectionmark##1{% \markboth {\MakeUppercase{% \ifnum \c@secnumdepth >\z@ \thesection\quad \fi ##1}}{}}% \def\subsectionmark##1{% \markright {% \ifnum \c@secnumdepth >\@ne \thesubsection\quad \fi ##1}}} \else \def\ps@headings{% \let\@oddfoot\@empty \def\@oddhead{{\slshape\rightmark}\hfil\thepage}% \let\@mkboth\markboth \def\sectionmark##1{% \markright {\MakeUppercase{% \ifnum \c@secnumdepth >\m@ne \thesection\quad \fi ##1}}}} \fi \def\ps@myheadings{% \let\@oddfoot\@empty\let\@evenfoot\@empty \def\@evenhead{\thepage\hfil\slshape\leftmark}% \def\@oddhead{{\slshape\rightmark}\hfil\thepage}% \let\@mkboth\@gobbletwo \let\sectionmark\@gobble \let\subsectionmark\@gobble } \if@titlepage \newcommand\maketitle{\begin{titlepage}% \let\footnotesize\small \let\footnoterule\relax \let \footnote \thanks \null\vfil \vskip 60\p@ \begin{center}% {\LARGE \@title \par}% \vskip 3em% {\large \lineskip .75em% \begin{tabular}[t]{c}% \@author \end{tabular}\par}% \vskip 1.5em% {\large \@date \par}% % Set date in \large size. \end{center}\par \@thanks \vfil\null \end{titlepage}% \setcounter{footnote}{0}% \global\let\thanks\relax \global\let\maketitle\relax \global\let\@thanks\@empty \global\let\@author\@empty \global\let\@date\@empty \global\let\@title\@empty \global\let\title\relax \global\let\author\relax \global\let\date\relax \global\let\and\relax } \else \newcommand\maketitle{\par \begingroup \renewcommand\thefootnote{\@fnsymbol\c@footnote}% \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% \long\def\@makefntext##1{\parindent 1em\noindent \hb@xt@1.8em{% \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% \if@twocolumn \ifnum \col@number=\@ne \@maketitle \else \twocolumn[\@maketitle]% \fi \else \newpage \global\@topnum\z@ % Prevents figures from going at top of page. \@maketitle \fi \thispagestyle{plain}\@thanks \endgroup \setcounter{footnote}{0}% \global\let\thanks\relax \global\let\maketitle\relax \global\let\@maketitle\relax \global\let\@thanks\@empty \global\let\@author\@empty \global\let\@date\@empty \global\let\@title\@empty \global\let\title\relax \global\let\author\relax \global\let\date\relax \global\let\and\relax } \def\@maketitle{% \newpage \null \vskip 2em% \begin{center}% \let \footnote \thanks {\LARGE \@title \par}% \vskip 1.5em% {\large \lineskip .5em% \begin{tabular}[t]{c}% \@author \end{tabular}\par}% \vskip 1em% {\large \@date}% \end{center}% \par \vskip 1.5em} \fi \setcounter{secnumdepth}{3} \newcounter {part} \newcounter {section} \newcounter {subsection}[section] \newcounter {subsubsection}[subsection] \newcounter {paragraph}[subsubsection] \newcounter {subparagraph}[paragraph] \renewcommand \thepart {\@Roman\c@part} \renewcommand \thesection {}%\@arabic\c@section} \renewcommand\thesubsection {\thesection.\@arabic\c@subsection} \renewcommand\thesubsubsection{\thesubsection .\@arabic\c@subsubsection} \renewcommand\theparagraph {\thesubsubsection.\@arabic\c@paragraph} \renewcommand\thesubparagraph {\theparagraph.\@arabic\c@subparagraph} \newcommand\part{% \if@noskipsec \leavevmode \fi \par \addvspace{4ex}% \@afterindentfalse \secdef\@part\@spart} \def\@part[#1]#2{% \ifnum \c@secnumdepth >\m@ne \refstepcounter{part}% \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% \else \addcontentsline{toc}{part}{#1}% \fi {\parindent \z@ \raggedright \interlinepenalty \@M \normalfont \ifnum \c@secnumdepth >\m@ne \Large\bfseries \partname~\thepart \par\nobreak \fi \huge \bfseries #2% \markboth{}{}\par}% \nobreak \vskip 3ex \@afterheading} \def\@spart#1{% {\parindent \z@ \raggedright \interlinepenalty \@M \normalfont \huge \bfseries #1\par}% \nobreak \vskip 3ex \@afterheading} \newcommand\section{\@startsection{section}{1}{ \z@} % {-3.5ex \@plus -1ex \@minus -.2ex}% {2.3ex \@plus.2ex}% {\normalfont\Large\bfseries}} \newcommand\subsection{\@startsection{subsection}{2}{\z@}% {-3.25ex\@plus -1ex \@minus -.2ex}% {1.5ex \@plus .2ex}% {\normalfont\large\bfseries}} \newcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% {-3.25ex\@plus -1ex \@minus -.2ex}% {1.5ex \@plus .2ex}% {\normalfont\normalsize\bfseries}} \newcommand\paragraph{\@startsection{paragraph}{4}{\z@}% {3.25ex \@plus1ex \@minus.2ex}% {-1em}% {\normalfont\normalsize\bfseries}} \newcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}% {3.25ex \@plus1ex \@minus .2ex}% {-1em}% {\normalfont\normalsize\bfseries}} \if@twocolumn \setlength\leftmargini {2em} \else \setlength\leftmargini {2.5em} \fi \leftmargin \leftmargini \setlength\leftmarginii {2.2em} \setlength\leftmarginiii {1.87em} \setlength\leftmarginiv {1.7em} \if@twocolumn \setlength\leftmarginv {.5em} \setlength\leftmarginvi {.5em} \else \setlength\leftmarginv {1em} \setlength\leftmarginvi {1em} \fi \setlength \labelsep {.5em} \setlength \labelwidth{\leftmargini} \addtolength\labelwidth{-\labelsep} \@beginparpenalty -\@lowpenalty \@endparpenalty -\@lowpenalty \@itempenalty -\@lowpenalty \renewcommand\theenumi{\@arabic\c@enumi} \renewcommand\theenumii{\@alph\c@enumii} \renewcommand\theenumiii{\@roman\c@enumiii} \renewcommand\theenumiv{\@Alph\c@enumiv} \newcommand\labelenumi{\theenumi.} \newcommand\labelenumii{(\theenumii)} \newcommand\labelenumiii{\theenumiii.} \newcommand\labelenumiv{\theenumiv.} \renewcommand\p@enumii{\theenumi} \renewcommand\p@enumiii{\theenumi(\theenumii)} \renewcommand\p@enumiv{\p@enumiii\theenumiii} \newcommand\labelitemi{\textbullet} \newcommand\labelitemii{\normalfont\bfseries \textendash} \newcommand\labelitemiii{\textasteriskcentered} \newcommand\labelitemiv{\textperiodcentered} \newenvironment{description} {\list{}{\labelwidth\z@ \itemindent-\leftmargin \let\makelabel\descriptionlabel}} {\endlist} \newcommand*\descriptionlabel[1]{\hspace\labelsep \normalfont\bfseries #1} \if@titlepage \newenvironment{abstract}{% \titlepage \null\vfil \@beginparpenalty\@lowpenalty \begin{center}% \bfseries \abstractname \@endparpenalty\@M \end{center}}% {\par\vfil\null\endtitlepage} \else \newenvironment{abstract}{% \if@twocolumn \section*{\abstractname}% \else \small \begin{center}% {\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}% \end{center}% \quotation \fi} {\if@twocolumn\else\endquotation\fi} \fi \newenvironment{verse} {\let\\\@centercr \list{}{\itemsep \z@ \itemindent -1.5em% \listparindent\itemindent \rightmargin \leftmargin \advance\leftmargin 1.5em}% \item\relax} {\endlist} \newenvironment{quotation} {\list{}{\listparindent 1.5em% \itemindent \listparindent \rightmargin \leftmargin \parsep \z@ \@plus\p@}% \item\relax} {\endlist} \newenvironment{quote} {\list{}{\rightmargin\leftmargin}% \item\relax} {\endlist} \if@compatibility \newenvironment{titlepage} {% \if@twocolumn \@restonecoltrue\onecolumn \else \@restonecolfalse\newpage \fi \thispagestyle{empty}% \setcounter{page}\z@ }% {\if@restonecol\twocolumn \else \newpage \fi } \else \newenvironment{titlepage} {% \if@twocolumn \@restonecoltrue\onecolumn \else \@restonecolfalse\newpage \fi \thispagestyle{empty}% \setcounter{page}\@ne }% {\if@restonecol\twocolumn \else \newpage \fi \if@twoside\else \setcounter{page}\@ne \fi } \fi \newcommand\appendix{\par \setcounter{section}{0}% \setcounter{subsection}{0}% \gdef\thesection{\@Alph\c@section}} \setlength\arraycolsep{5\p@} \setlength\tabcolsep{6\p@} \setlength\arrayrulewidth{.4\p@} \setlength\doublerulesep{2\p@} \setlength\tabbingsep{\labelsep} \skip\@mpfootins = \skip\footins \setlength\fboxsep{3\p@} \setlength\fboxrule{.4\p@} \renewcommand \theequation {\@arabic\c@equation} \newcounter{figure} \renewcommand \thefigure {\@arabic\c@figure} \def\fps@figure{tbp} \def\ftype@figure{1} \def\ext@figure{lof} \def\fnum@figure{\figurename~\thefigure} \newenvironment{figure} {\@float{figure}} {\end@float} \newenvironment{figure*} {\@dblfloat{figure}} {\end@dblfloat} \newcounter{table} \renewcommand\thetable{\@arabic\c@table} \def\fps@table{tbp} \def\ftype@table{2} \def\ext@table{lot} \def\fnum@table{\tablename~\thetable} \newenvironment{table} {\@float{table}} {\end@float} \newenvironment{table*} {\@dblfloat{table}} {\end@dblfloat} \newlength\abovecaptionskip \newlength\belowcaptionskip \setlength\abovecaptionskip{10\p@} \setlength\belowcaptionskip{0\p@} \long\def\@makecaption#1#2{% \vskip\abovecaptionskip \sbox\@tempboxa{#1: #2}% \ifdim \wd\@tempboxa >\hsize #1: #2\par \else \global \@minipagefalse \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% \fi \vskip\belowcaptionskip} \DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm} \DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf} \DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt} \DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf} \DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit} \DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl} \DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc} \DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal} \DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal} \newcommand\@pnumwidth{1.55em} \newcommand\@tocrmarg{2.55em} \newcommand\@dotsep{4.5} \setcounter{tocdepth}{3} \newcommand\tableofcontents{% \section*{\contentsname \@mkboth{% \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}% \@starttoc{toc}% } \newcommand*\l@part[2]{% \ifnum \c@tocdepth >-2\relax \addpenalty\@secpenalty \addvspace{2.25em \@plus\p@}% \begingroup \parindent \z@ \rightskip \@pnumwidth \parfillskip -\@pnumwidth {\leavevmode \large \bfseries #1\hfil \hb@xt@\@pnumwidth{\hss #2}}\par \nobreak \if@compatibility \global\@nobreaktrue \everypar{\global\@nobreakfalse\everypar{}}% \fi \endgroup \fi} \newcommand*\l@section[2]{% \ifnum \c@tocdepth >\z@ \addpenalty\@secpenalty \addvspace{1.0em \@plus\p@}% \setlength\@tempdima{1.5em}% \begingroup \parindent \z@ \rightskip \@pnumwidth \parfillskip -\@pnumwidth \leavevmode \bfseries \advance\leftskip\@tempdima \hskip -\leftskip #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par \endgroup \fi} \newcommand*\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}} \newcommand*\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}} \newcommand*\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}} \newcommand*\l@subparagraph{\@dottedtocline{5}{10em}{5em}} \newcommand\listoffigures{% \section*{\listfigurename \@mkboth{\MakeUppercase\listfigurename}% {\MakeUppercase\listfigurename}}% \@starttoc{lof}% } \newcommand*\l@figure{\@dottedtocline{1}{1.5em}{2.3em}} \newcommand\listoftables{% \section*{\listtablename \@mkboth{% \MakeUppercase\listtablename}{\MakeUppercase\listtablename}}% \@starttoc{lot}% } \let\l@table\l@figure \newdimen\bibindent \setlength\bibindent{1.5em} \newenvironment{thebibliography}[1] { \section{\refname} % \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}}% \list{}%\@biblabel{\@arabic\c@enumiv} {\settowidth\labelwidth{\@biblabel{#1}}% \leftmargin\labelwidth \advance\leftmargin\labelsep \@openbib@code \usecounter{enumiv}% \let\p@enumiv\@empty \renewcommand\theenumiv{}}%\@arabic\c@enumiv \sloppy \clubpenalty4000 \@clubpenalty \clubpenalty \widowpenalty4000% \sfcode`\.\@m} {\def\@noitemerr {\@latex@warning{Empty `thebibliography' environment}}% \endlist} \newcommand\newblock{\hskip .11em\@plus.33em\@minus.07em} \let\@openbib@code\@empty \newenvironment{theindex} {\if@twocolumn \@restonecolfalse \else \@restonecoltrue \fi \columnseprule \z@ \columnsep 35\p@ \twocolumn[\section*{\indexname}]% \@mkboth{\MakeUppercase\indexname}% {\MakeUppercase\indexname}% \thispagestyle{plain}\parindent\z@ \parskip\z@ \@plus .3\p@\relax \let\item\@idxitem} {\if@restonecol\onecolumn\else\clearpage\fi} \newcommand\@idxitem{\par\hangindent 40\p@} \newcommand\subitem{\@idxitem \hspace*{20\p@}} \newcommand\subsubitem{\@idxitem \hspace*{30\p@}} \newcommand\indexspace{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax} \renewcommand\footnoterule{% \kern-3\p@ \hrule\@width.4\columnwidth \kern2.6\p@} \newcommand\@makefntext[1]{% \parindent 1em% \noindent \hb@xt@1.8em{\hss\@makefnmark}#1} \newcommand\contentsname{Contents} \newcommand\listfigurename{List of Figures} \newcommand\listtablename{List of Tables} \newcommand\refname{} \newcommand\indexname{Index} \newcommand\figurename{Figure} \newcommand\tablename{Table} \newcommand\partname{Part} \newcommand\appendixname{Appendix} \newcommand\abstractname{Abstract} \def\today{\ifcase\month\or January\or February\or March\or April\or May\or June\or July\or August\or September\or October\or November\or December\fi \space\number\day, \number\year} \setlength\columnsep{10\p@} \setlength\columnseprule{0\p@} \pagestyle{plain} \pagenumbering{arabic} \if@twoside \else \raggedbottom \fi \if@twocolumn \twocolumn \sloppy \flushbottom \else \onecolumn \fi \endinput %% %% End of file `article.cls'. \ No newline at end of file +%% %% This is file `article.cls', %% generated with the docstrip utility. %% %% The original source files were: %% %% classes.dtx (with options: `article') %% %% This is a generated file. %% %% Copyright 1993 1994 1995 1996 1997 1998 1999 %% The LaTeX3 Project and any individual authors listed elsewhere %% in this file. %% %% This file is part of the LaTeX base system. %% ------------------------------------------- %% %% It may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.1 %% of this license or (at your option) any later version. %% The latest version of this license is in %% http://www.latex-project.org/lppl.txt %% and version 1.1 or later is part of all distributions of LaTeX %% version 1999/06/01 or later. %% %% The list of all files belonging to the LaTeX base distribution is %% given in the file `manifest.txt'. See also `legal.txt' for additional %% information. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z %% Digits \0\1\2\3\4\5\6\7\8\9 %% Exclamation \! Double quote \" Hash (number) \# %% Dollar \$ Percent \% Ampersand \& %% Acute accent \' Left paren \( Right paren \) %% Asterisk \* Plus \+ Comma \, %% Minus \- Point \. Solidus \/ %% Colon \: Semicolon \; Less than \< %% Equals \= Greater than \> Question mark \? %% Commercial at \@ Left bracket \[ Backslash \\ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesClass{articleNoRefHead} [1999/01/07 v1.4a Standard LaTeX document class] \newcommand\@ptsize{} \newif\if@restonecol \newif\if@titlepage \@titlepagefalse \if@compatibility\else \DeclareOption{a4paper} {\setlength\paperheight {297mm}% \setlength\paperwidth {210mm}} \DeclareOption{a5paper} {\setlength\paperheight {210mm}% \setlength\paperwidth {148mm}} \DeclareOption{b5paper} {\setlength\paperheight {250mm}% \setlength\paperwidth {176mm}} \DeclareOption{letterpaper} {\setlength\paperheight {11in}% \setlength\paperwidth {8.5in}} \DeclareOption{legalpaper} {\setlength\paperheight {14in}% \setlength\paperwidth {8.5in}} \DeclareOption{executivepaper} {\setlength\paperheight {10.5in}% \setlength\paperwidth {7.25in}} \DeclareOption{landscape} {\setlength\@tempdima {\paperheight}% \setlength\paperheight {\paperwidth}% \setlength\paperwidth {\@tempdima}} \fi \if@compatibility \renewcommand\@ptsize{0} \else \DeclareOption{10pt}{\renewcommand\@ptsize{0}} \fi \DeclareOption{11pt}{\renewcommand\@ptsize{1}} \DeclareOption{12pt}{\renewcommand\@ptsize{2}} \if@compatibility\else \DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse} \fi \DeclareOption{twoside}{\@twosidetrue \@mparswitchtrue} \DeclareOption{draft}{\setlength\overfullrule{5pt}} \if@compatibility\else \DeclareOption{final}{\setlength\overfullrule{0pt}} \fi \DeclareOption{titlepage}{\@titlepagetrue} \if@compatibility\else \DeclareOption{notitlepage}{\@titlepagefalse} \fi \if@compatibility\else \DeclareOption{onecolumn}{\@twocolumnfalse} \fi \DeclareOption{twocolumn}{\@twocolumntrue} \DeclareOption{leqno}{\input{leqno.clo}} \DeclareOption{fleqn}{\input{fleqn.clo}} \DeclareOption{openbib}{% \AtEndOfPackage{% \renewcommand\@openbib@code{% \advance\leftmargin\bibindent \itemindent -\bibindent \listparindent \itemindent \parsep \z@ }% \renewcommand\newblock{\par}}% } \ExecuteOptions{letterpaper,10pt,oneside,onecolumn,final} \ProcessOptions \input{size1\@ptsize.clo} \setlength\lineskip{1\p@} \setlength\normallineskip{1\p@} \renewcommand\baselinestretch{} \setlength\parskip{0\p@ \@plus \p@} \@lowpenalty 51 \@medpenalty 151 \@highpenalty 301 \setcounter{topnumber}{2} \renewcommand\topfraction{.7} \setcounter{bottomnumber}{1} \renewcommand\bottomfraction{.3} \setcounter{totalnumber}{3} \renewcommand\textfraction{.2} \renewcommand\floatpagefraction{.5} \setcounter{dbltopnumber}{2} \renewcommand\dbltopfraction{.7} \renewcommand\dblfloatpagefraction{.5} \if@twoside \def\ps@headings{% \let\@oddfoot\@empty\let\@evenfoot\@empty \def\@evenhead{\thepage\hfil\slshape\leftmark}% \def\@oddhead{{\slshape\rightmark}\hfil\thepage}% \let\@mkboth\markboth \def\sectionmark##1{% \markboth {\MakeUppercase{% \ifnum \c@secnumdepth >\z@ \thesection\quad \fi ##1}}{}}% \def\subsectionmark##1{% \markright {% \ifnum \c@secnumdepth >\@ne \thesubsection\quad \fi ##1}}} \else \def\ps@headings{% \let\@oddfoot\@empty \def\@oddhead{{\slshape\rightmark}\hfil\thepage}% \let\@mkboth\markboth \def\sectionmark##1{% \markright {\MakeUppercase{% \ifnum \c@secnumdepth >\m@ne \thesection\quad \fi ##1}}}} \fi \def\ps@myheadings{% \let\@oddfoot\@empty\let\@evenfoot\@empty \def\@evenhead{\thepage\hfil\slshape\leftmark}% \def\@oddhead{{\slshape\rightmark}\hfil\thepage}% \let\@mkboth\@gobbletwo \let\sectionmark\@gobble \let\subsectionmark\@gobble } \if@titlepage \newcommand\maketitle{\begin{titlepage}% \let\footnotesize\small \let\footnoterule\relax \let \footnote \thanks \null\vfil \vskip 60\p@ \begin{center}% {\LARGE \@title \par}% \vskip 3em% {\large \lineskip .75em% \begin{tabular}[t]{c}% \@author \end{tabular}\par}% \vskip 1.5em% {\large \@date \par}% % Set date in \large size. \end{center}\par \@thanks \vfil\null \end{titlepage}% \setcounter{footnote}{0}% \global\let\thanks\relax \global\let\maketitle\relax \global\let\@thanks\@empty \global\let\@author\@empty \global\let\@date\@empty \global\let\@title\@empty \global\let\title\relax \global\let\author\relax \global\let\date\relax \global\let\and\relax } \else \newcommand\maketitle{\par \begingroup \renewcommand\thefootnote{\@fnsymbol\c@footnote}% \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% \long\def\@makefntext##1{\parindent 1em\noindent \hb@xt@1.8em{% \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% \if@twocolumn \ifnum \col@number=\@ne \@maketitle \else \twocolumn[\@maketitle]% \fi \else \newpage \global\@topnum\z@ % Prevents figures from going at top of page. \@maketitle \fi \thispagestyle{plain}\@thanks \endgroup \setcounter{footnote}{0}% \global\let\thanks\relax \global\let\maketitle\relax \global\let\@maketitle\relax \global\let\@thanks\@empty \global\let\@author\@empty \global\let\@date\@empty \global\let\@title\@empty \global\let\title\relax \global\let\author\relax \global\let\date\relax \global\let\and\relax } \def\@maketitle{% \newpage \null \vskip 2em% \begin{center}% \let \footnote \thanks {\LARGE \@title \par}% \vskip 1.5em% {\large \lineskip .5em% \begin{tabular}[t]{c}% \@author \end{tabular}\par}% \vskip 1em% {\large \@date}% \end{center}% \par \vskip 1.5em} \fi \setcounter{secnumdepth}{3} \newcounter {part} \newcounter {section} \newcounter {subsection}[section] \newcounter {subsubsection}[subsection] \newcounter {paragraph}[subsubsection] \newcounter {subparagraph}[paragraph] \renewcommand \thepart {\@Roman\c@part} \renewcommand \thesection {}%\@arabic\c@section} \renewcommand\thesubsection {\thesection.\@arabic\c@subsection} \renewcommand\thesubsubsection{\thesubsection .\@arabic\c@subsubsection} \renewcommand\theparagraph {\thesubsubsection.\@arabic\c@paragraph} \renewcommand\thesubparagraph {\theparagraph.\@arabic\c@subparagraph} \newcommand\part{% \if@noskipsec \leavevmode \fi \par \addvspace{4ex}% \@afterindentfalse \secdef\@part\@spart} \def\@part[#1]#2{% \ifnum \c@secnumdepth >\m@ne \refstepcounter{part}% \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% \else \addcontentsline{toc}{part}{#1}% \fi {\parindent \z@ \raggedright \interlinepenalty \@M \normalfont \ifnum \c@secnumdepth >\m@ne \Large\bfseries \partname~\thepart \par\nobreak \fi \huge \bfseries #2% \markboth{}{}\par}% \nobreak \vskip 3ex \@afterheading} \def\@spart#1{% {\parindent \z@ \raggedright \interlinepenalty \@M \normalfont \huge \bfseries #1\par}% \nobreak \vskip 3ex \@afterheading} \newcommand\section{\@startsection{section}{1}{ \z@} % {-3.5ex \@plus -1ex \@minus -.2ex}% {2.3ex \@plus.2ex}% {\normalfont\Large\bfseries}} \newcommand\subsection{\@startsection{subsection}{2}{\z@}% {-3.25ex\@plus -1ex \@minus -.2ex}% {1.5ex \@plus .2ex}% {\normalfont\large\bfseries}} \newcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% {-3.25ex\@plus -1ex \@minus -.2ex}% {1.5ex \@plus .2ex}% {\normalfont\normalsize\bfseries}} \newcommand\paragraph{\@startsection{paragraph}{4}{\z@}% {3.25ex \@plus1ex \@minus.2ex}% {-1em}% {\normalfont\normalsize\bfseries}} \newcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}% {3.25ex \@plus1ex \@minus .2ex}% {-1em}% {\normalfont\normalsize\bfseries}} \if@twocolumn \setlength\leftmargini {2em} \else \setlength\leftmargini {2.5em} \fi \leftmargin \leftmargini \setlength\leftmarginii {2.2em} \setlength\leftmarginiii {1.87em} \setlength\leftmarginiv {1.7em} \if@twocolumn \setlength\leftmarginv {.5em} \setlength\leftmarginvi {.5em} \else \setlength\leftmarginv {1em} \setlength\leftmarginvi {1em} \fi \setlength \labelsep {.5em} \setlength \labelwidth{\leftmargini} \addtolength\labelwidth{-\labelsep} \@beginparpenalty -\@lowpenalty \@endparpenalty -\@lowpenalty \@itempenalty -\@lowpenalty \renewcommand\theenumi{\@arabic\c@enumi} \renewcommand\theenumii{\@alph\c@enumii} \renewcommand\theenumiii{\@roman\c@enumiii} \renewcommand\theenumiv{\@Alph\c@enumiv} \newcommand\labelenumi{\theenumi.} \newcommand\labelenumii{(\theenumii)} \newcommand\labelenumiii{\theenumiii.} \newcommand\labelenumiv{\theenumiv.} \renewcommand\p@enumii{\theenumi} \renewcommand\p@enumiii{\theenumi(\theenumii)} \renewcommand\p@enumiv{\p@enumiii\theenumiii} \newcommand\labelitemi{\textbullet} \newcommand\labelitemii{\normalfont\bfseries \textendash} \newcommand\labelitemiii{\textasteriskcentered} \newcommand\labelitemiv{\textperiodcentered} \newenvironment{description} {\list{}{\labelwidth\z@ \itemindent-\leftmargin \let\makelabel\descriptionlabel}} {\endlist} \newcommand*\descriptionlabel[1]{\hspace\labelsep \normalfont\bfseries #1} \if@titlepage \newenvironment{abstract}{% \titlepage \null\vfil \@beginparpenalty\@lowpenalty \begin{center}% \bfseries \abstractname \@endparpenalty\@M \end{center}}% {\par\vfil\null\endtitlepage} \else \newenvironment{abstract}{% \if@twocolumn \section*{\abstractname}% \else \small \begin{center}% {\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}% \end{center}% \quotation \fi} {\if@twocolumn\else\endquotation\fi} \fi \newenvironment{verse} {\let\\\@centercr \list{}{\itemsep \z@ \itemindent -1.5em% \listparindent\itemindent \rightmargin \leftmargin \advance\leftmargin 1.5em}% \item\relax} {\endlist} \newenvironment{quotation} {\list{}{\listparindent 1.5em% \itemindent \listparindent \rightmargin \leftmargin \parsep \z@ \@plus\p@}% \item\relax} {\endlist} \newenvironment{quote} {\list{}{\rightmargin\leftmargin}% \item\relax} {\endlist} \if@compatibility \newenvironment{titlepage} {% \if@twocolumn \@restonecoltrue\onecolumn \else \@restonecolfalse\newpage \fi \thispagestyle{empty}% \setcounter{page}\z@ }% {\if@restonecol\twocolumn \else \newpage \fi } \else \newenvironment{titlepage} {% \if@twocolumn \@restonecoltrue\onecolumn \else \@restonecolfalse\newpage \fi \thispagestyle{empty}% \setcounter{page}\@ne }% {\if@restonecol\twocolumn \else \newpage \fi \if@twoside\else \setcounter{page}\@ne \fi } \fi \newcommand\appendix{\par \setcounter{section}{0}% \setcounter{subsection}{0}% \gdef\thesection{\@Alph\c@section}} \setlength\arraycolsep{5\p@} \setlength\tabcolsep{6\p@} \setlength\arrayrulewidth{.4\p@} \setlength\doublerulesep{2\p@} \setlength\tabbingsep{\labelsep} \skip\@mpfootins = \skip\footins \setlength\fboxsep{3\p@} \setlength\fboxrule{.4\p@} \renewcommand \theequation {\@arabic\c@equation} \newcounter{figure} \renewcommand \thefigure {\@arabic\c@figure} \def\fps@figure{tbp} \def\ftype@figure{1} \def\ext@figure{lof} \def\fnum@figure{\figurename~\thefigure} \newenvironment{figure} {\@float{figure}} {\end@float} \newenvironment{figure*} {\@dblfloat{figure}} {\end@dblfloat} \newcounter{table} \renewcommand\thetable{\@arabic\c@table} \def\fps@table{tbp} \def\ftype@table{2} \def\ext@table{lot} \def\fnum@table{\tablename~\thetable} \newenvironment{table} {\@float{table}} {\end@float} \newenvironment{table*} {\@dblfloat{table}} {\end@dblfloat} \newlength\abovecaptionskip \newlength\belowcaptionskip \setlength\abovecaptionskip{10\p@} \setlength\belowcaptionskip{0\p@} \long\def\@makecaption#1#2{% \vskip\abovecaptionskip \sbox\@tempboxa{#1: #2}% \ifdim \wd\@tempboxa >\hsize #1: #2\par \else \global \@minipagefalse \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% \fi \vskip\belowcaptionskip} \DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm} \DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf} \DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt} \DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf} \DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit} \DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl} \DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc} \DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal} \DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal} \newcommand\@pnumwidth{1.55em} \newcommand\@tocrmarg{2.55em} \newcommand\@dotsep{4.5} \setcounter{tocdepth}{3} \newcommand\tableofcontents{% \section*{\contentsname \@mkboth{% \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}% \@starttoc{toc}% } \newcommand*\l@part[2]{% \ifnum \c@tocdepth >-2\relax \addpenalty\@secpenalty \addvspace{2.25em \@plus\p@}% \begingroup \parindent \z@ \rightskip \@pnumwidth \parfillskip -\@pnumwidth {\leavevmode \large \bfseries #1\hfil \hb@xt@\@pnumwidth{\hss #2}}\par \nobreak \if@compatibility \global\@nobreaktrue \everypar{\global\@nobreakfalse\everypar{}}% \fi \endgroup \fi} \newcommand*\l@section[2]{% \ifnum \c@tocdepth >\z@ \addpenalty\@secpenalty \addvspace{1.0em \@plus\p@}% \setlength\@tempdima{1.5em}% \begingroup \parindent \z@ \rightskip \@pnumwidth \parfillskip -\@pnumwidth \leavevmode \bfseries \advance\leftskip\@tempdima \hskip -\leftskip #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par \endgroup \fi} \newcommand*\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}} \newcommand*\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}} \newcommand*\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}} \newcommand*\l@subparagraph{\@dottedtocline{5}{10em}{5em}} \newcommand\listoffigures{% \section*{\listfigurename \@mkboth{\MakeUppercase\listfigurename}% {\MakeUppercase\listfigurename}}% \@starttoc{lof}% } \newcommand*\l@figure{\@dottedtocline{1}{1.5em}{2.3em}} \newcommand\listoftables{% \section*{\listtablename \@mkboth{% \MakeUppercase\listtablename}{\MakeUppercase\listtablename}}% \@starttoc{lot}% } \let\l@table\l@figure \newdimen\bibindent \setlength\bibindent{1.5em} \newenvironment{thebibliography}[1] { \section{\refname} % \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}}% \list{}%\@biblabel{\@arabic\c@enumiv} {\settowidth\labelwidth{\@biblabel{#1}}% \leftmargin\labelwidth \advance\leftmargin\labelsep \@openbib@code \usecounter{enumiv}% \let\p@enumiv\@empty \renewcommand\theenumiv{}}%\@arabic\c@enumiv \sloppy \clubpenalty4000 \@clubpenalty \clubpenalty \widowpenalty4000% \sfcode`\.\@m} {\def\@noitemerr {\@latex@warning{Empty `thebibliography' environment}}% \endlist} \newcommand\newblock{\hskip .11em\@plus.33em\@minus.07em} \let\@openbib@code\@empty \newenvironment{theindex} {\if@twocolumn \@restonecolfalse \else \@restonecoltrue \fi \columnseprule \z@ \columnsep 35\p@ \twocolumn[\section*{\indexname}]% \@mkboth{\MakeUppercase\indexname}% {\MakeUppercase\indexname}% \thispagestyle{plain}\parindent\z@ \parskip\z@ \@plus .3\p@\relax \let\item\@idxitem} {\if@restonecol\onecolumn\else\clearpage\fi} \newcommand\@idxitem{\par\hangindent 40\p@} \newcommand\subitem{\@idxitem \hspace*{20\p@}} \newcommand\subsubitem{\@idxitem \hspace*{30\p@}} \newcommand\indexspace{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax} \renewcommand\footnoterule{% \kern-3\p@ \hrule\@width.4\columnwidth \kern2.6\p@} \newcommand\@makefntext[1]{% \parindent 1em% \noindent \hb@xt@1.8em{\hss\@makefnmark}#1} \newcommand\contentsname{Contents} \newcommand\listfigurename{List of Figures} \newcommand\listtablename{List of Tables} \newcommand\refname{} \newcommand\indexname{Index} \newcommand\figurename{Figure} \newcommand\tablename{Table} \newcommand\partname{Part} \newcommand\appendixname{Appendix} \newcommand\abstractname{Abstract} \def\today{\ifcase\month\or January\or February\or March\or April\or May\or June\or July\or August\or September\or October\or November\or December\fi \space\number\day, \number\year} \setlength\columnsep{10\p@} \setlength\columnseprule{0\p@} \pagestyle{plain} \pagenumbering{arabic} \if@twoside \else \raggedbottom \fi \if@twocolumn \twocolumn \sloppy \flushbottom \else \onecolumn \fi \endinput %% %% End of file `article.cls'. diff --git a/Documentation/texmf-local/tex/latex/cvBibMake.tex b/Documentation/texmf-local/tex/latex/cvBibMake.tex index dc63a1623..7d20b200c 100644 --- a/Documentation/texmf-local/tex/latex/cvBibMake.tex +++ b/Documentation/texmf-local/tex/latex/cvBibMake.tex @@ -1,5 +1,5 @@ -%\write18{if [ `kpsewhich economics.bib` != '' ]; then touch economics.bib ; fi} # This should be done only for final versions AFTER bibexport has occurred and \jobname.bib is populated +%\write18{if [ `kpsewhich economics.bib` != '' ]; then touch economics.bib ; fi} # This should be done only for final versions AFTER bibexport has occurred and \jobname.bib is populated %\write18{if [ ! -f \jobname.bib ]; then touch \jobname.bib ; fi} %\write18{if [ ! -f \jobname-Add.bib ]; then touch \jobname-Add.bib ; fi} diff --git a/Documentation/texmf-local/tex/latex/econtex.cls b/Documentation/texmf-local/tex/latex/econtex.cls index 87308d92d..93f86901a 100644 --- a/Documentation/texmf-local/tex/latex/econtex.cls +++ b/Documentation/texmf-local/tex/latex/econtex.cls @@ -1,11 +1,11 @@ %%% LaTeX class for economics %%% %%% author: Christopher Carroll -%%% license: LaTeX Project Public License +%%% license: LaTeX Project Public License %%% %%% Modified from style itaxpf by Arne Henningsen %%% version: 1.0 (09 July 2007) -%%% license: LaTeX Project Public License +%%% license: LaTeX Project Public License %%% %%% Further information is available at %%% http://www.uni-kiel.de/agrarpol/ahenningsen/latex-bibtex.html @@ -73,8 +73,8 @@ %% Added the above info to the definition of normalsize \def\normalsize{\@setfontsize \normalsize \@xiipt {14.5} -\abovedisplayskip 6\p@ \@plus 3\p@ \@minus 3\p@ -\belowdisplayskip \abovedisplayskip +\abovedisplayskip 6\p@ \@plus 3\p@ \@minus 3\p@ +\belowdisplayskip \abovedisplayskip \abovedisplayshortskip 6pt \belowdisplayshortskip 6pt \let \@listi \@listI} \normalsize @@ -126,8 +126,8 @@ amsmath,amssymb,amsfonts,amsthm %---------------Custom Definitions-------------- -\def\liminf{\mathop{\rm lim\, inf}\limits} -\DeclareMathOperator{\Ex}{\mathbb{E}} % Expectations operator +\def\liminf{\mathop{\rm lim\, inf}\limits} +\DeclareMathOperator{\Ex}{\mathbb{E}} % Expectations operator \def\var{\operatorname{var}} % variance \def\cov{\operatorname{cov}} % covariance \def\std{\operatorname{std}} % standard deviation @@ -150,7 +150,7 @@ amsmath,amssymb,amsfonts,amsthm %To prevent breaking math formula \relpenalty=4000 %from 0 to 10000, default is 500 -%To prevent breaking math formula after binary operator +%To prevent breaking math formula after binary operator \binoppenalty=10000 %from 0 to 10000, default is 700 %-------------------------------------------------------- @@ -215,13 +215,13 @@ amsmath,amssymb,amsfonts,amsthm % titlepage with title, author(s), and date \renewcommand{\maketitle}{ -\ifthenelse{ \isundefined\@forcedate }{ +\ifthenelse{ \isundefined\@forcedate }{ \ClassWarningNoLine{econtex}{{\protect\forcedate} is undefined in the .tex file; please define it and rerun}}{} \ifthenelse{\equal{\theIncludeTitlePage}{1}}{ \let\footnotesize\scriptsize \thispagestyle{empty} \vspace*{0mm} - \enlargethispage{0.4in} + \enlargethispage{0.4in} }{} \begin{center} \begin{LARGE} @@ -229,7 +229,7 @@ amsmath,amssymb,amsfonts,amsthm \textbf{\@title} \end{spacing} \end{LARGE}\medskip\medskip\medskip - {\normalsize \@date \par} + {\normalsize \@date \par} {\tiny{~}\par} \ifthenelse{\equal{\theIncludeTitlePage}{1}}{ \vspace*{3mm} @@ -250,7 +250,7 @@ amsmath,amssymb,amsfonts,amsthm \let\footnotesize\scriptsize \thispagestyle{empty} \vspace*{0mm} - \enlargethispage{0.4in} + \enlargethispage{0.4in} }{} \begin{center} \begin{LARGE} @@ -258,7 +258,7 @@ amsmath,amssymb,amsfonts,amsthm \textbf{\@title} \end{spacing} \end{LARGE}\medskip\medskip\medskip - {\normalsize #1 \par} + {\normalsize #1 \par} {\tiny{~}\par} \ifthenelse{\equal{\theIncludeTitlePage}{1}}{ \vspace*{3mm} @@ -284,7 +284,7 @@ amsmath,amssymb,amsfonts,amsthm \vspace*{4mm} \abstractSizeDefault \noindent \textbf{Abstract}\\ - \indent + \indent }{% \noindent {\tiny \phantom{.}} \\ % Trick to get proper spacing in html \noindent \hrule height 0.4pt depth 0.0pt width \textwidth \relax @@ -333,7 +333,7 @@ amsmath,amssymb,amsfonts,amsthm \pagestyle{plain} \thispagestyle{empty} -\newcommand{\titlepagefinish}{\newpage +\newcommand{\titlepagefinish}{\newpage \renewcommand\@makefnmark {\mbox{\textsuperscript{\tiny\@thefnmark}}} } @@ -354,11 +354,11 @@ amsmath,amssymb,amsfonts,amsthm %%% the original code. %% Sample use: -%% \author{Christopher D. Carroll\authNum \\ +%% \author{Christopher D. Carroll\authNum \\ %% \and -%% Jiri Slacalek\authNum \\ +%% Jiri Slacalek\authNum \\ %% \and -%% Martin Sommer\authNum \\ +%% Martin Sommer\authNum \\ %% \and %% Another Name\authNum %% \and diff --git a/Documentation/texmf-local/tex/latex/econtex.sty b/Documentation/texmf-local/tex/latex/econtex.sty index fcefb5736..1147b1e85 100644 --- a/Documentation/texmf-local/tex/latex/econtex.sty +++ b/Documentation/texmf-local/tex/latex/econtex.sty @@ -1,7 +1,7 @@ %---------------Custom Definitions-------------- -\def\liminf{\mathop{\rm lim\, inf}\limits} -\DeclareMathOperator{\Ex}{\mathbb{E}} % Expectations operator +\def\liminf{\mathop{\rm lim\, inf}\limits} +\DeclareMathOperator{\Ex}{\mathbb{E}} % Expectations operator \def\var{\operatorname{var}} % variance \def\cov{\operatorname{cov}} % covariance \def\std{\operatorname{std}} % standard deviation @@ -24,11 +24,7 @@ %To prevent breaking math formula \relpenalty=4000 %from 0 to 10000, default is 500 -%To prevent breaking math formula after binary operator +%To prevent breaking math formula after binary operator \binoppenalty=10000 %from 0 to 10000, default is 700 %-------------------------------------------------------- - - - - diff --git a/Documentation/texmf-local/tex/latex/econtexBibMake.tex b/Documentation/texmf-local/tex/latex/econtexBibMake.tex index ad524e192..cb5ae56f5 100644 --- a/Documentation/texmf-local/tex/latex/econtexBibMake.tex +++ b/Documentation/texmf-local/tex/latex/econtexBibMake.tex @@ -1,5 +1,5 @@ -%\write18{if [ `kpsewhich economics.bib` != '' ]; then touch economics.bib ; fi} # This should be done only for final versions AFTER bibexport has occurred and \jobname.bib is populated +%\write18{if [ `kpsewhich economics.bib` != '' ]; then touch economics.bib ; fi} # This should be done only for final versions AFTER bibexport has occurred and \jobname.bib is populated \write18{if [ ! -f \jobname.bib ]; then touch \jobname.bib ; fi} \write18{if [ ! -f \jobname-Add.bib ]; then touch \jobname-Add.bib ; fi} diff --git a/Documentation/texmf-local/tex/latex/econtexSetup.sty b/Documentation/texmf-local/tex/latex/econtexSetup.sty index 9d454cf29..944a8aa83 100644 --- a/Documentation/texmf-local/tex/latex/econtexSetup.sty +++ b/Documentation/texmf-local/tex/latex/econtexSetup.sty @@ -1,7 +1,7 @@ \RequirePackage{wasysym -,psibycus % Greek language package, including koppa +,psibycus % Greek language package, including koppa ,ushort -%,lscape % Pages in landscape mode go inside \begin{landscape}\end{landscape} % CONFLICTS WITH EPSTOPDF +%,lscape % Pages in landscape mode go inside \begin{landscape}\end{landscape} % CONFLICTS WITH EPSTOPDF } \newenvironment{CDCPrivate} % Environment for extra material not wanted in the public document @@ -22,7 +22,7 @@ \setboolean{BigAndWide}{true} \setboolean{BigAndWide}{false} -% Options to set if being run from the shell (so autocompiled) +% Options to set if being run from the shell (so autocompiled) \opt{FromShell}{ \setboolean{bigPrint}{false} \setboolean{wideMargins}{false} @@ -60,7 +60,7 @@ } % Keep the elements in the argument #1 together on the same page -\newcommand{\together}[1]{\noindent\parbox{\linewidth}{#1}} +\newcommand{\together}[1]{\noindent\parbox{\linewidth}{#1}} % html version of document must be constructed by running pdflatex in % dvi output mode; code below creates an ifdvi construct that detects @@ -74,7 +74,7 @@ % dvi compilation only occurs if making the html version \ifdvi - \setboolean{Web}{true} + \setboolean{Web}{true} \RequirePackage{tex4ht} \RequirePackage{graphicx} \RequirePackage[tex4ht]{hyperref} @@ -143,7 +143,7 @@ \definecolor{darkred}{rgb}{0.3,0,0} \hypersetup{colorlinks=true, % put a box around links linkbordercolor = {1 0 0}, % the box will be red - pdfborder = {1 0 0}, % + pdfborder = {1 0 0}, % % bookmarks=true, % PDF will contain an index on the RHS urlcolor=darkred, citecolor=darkblue, @@ -172,7 +172,7 @@ \newcommand{\Aggregation}{\href{https://www.econ2.jhu.edu/people/ccarroll/public/lecturenotes/MathFacts/Aggregation.pdf}{\texttt{Aggregation}}} -% If doing a web version, renewcommands link to the html versions of handouts +% If doing a web version, renewcommands link to the html versions of handouts \ifdvi \renewcommand{\handoutC}[1]{\href{https://www.econ2.jhu.edu/people/ccarroll/public/lecturenotes/consumption/#1}{\texttt{#1}}} \renewcommand{\handoutA}[1]{\href{https://www.econ2.jhu.edu/people/ccarroll/public/lecturenotes/AssetPricing/#1}{\texttt{#1}}} @@ -231,8 +231,3 @@ \end{quote} } {#2}} - - - - - diff --git a/Documentation/texmf-local/tex/latex/econtexShortcuts.sty b/Documentation/texmf-local/tex/latex/econtexShortcuts.sty index 3eb59490f..2169b7287 100755 --- a/Documentation/texmf-local/tex/latex/econtexShortcuts.sty +++ b/Documentation/texmf-local/tex/latex/econtexShortcuts.sty @@ -75,7 +75,7 @@ \providecommand{\CLev}{\ensuremath{C}} \providecommand{\Cons}{\ensuremath{C}} \providecommand{\cons}{\ensuremath{c}} -\providecommand{\corr}{\varrho} +\providecommand{\corr}{\varrho} \providecommand{\cPDVFunc}{\ensuremath{\mathbb{C}}} \providecommand{\CPDV}{\ensuremath{\text{PDV($C$)}}} \providecommand{\cPPP}{\cons^{\prime\prime\prime}} @@ -105,7 +105,7 @@ \providecommand{\DeprFac}{\ensuremath{\daleth}} \providecommand{\Depr}{\ensuremath{\daleth}} \providecommand{\depr}{\ensuremath{\delta}} -\providecommand{\deprRte}{\ensuremath{\delta}} % New +\providecommand{\deprRte}{\ensuremath{\delta}} % New \providecommand{\DiscAltuAdj}{\ensuremath{\underline{\underline{\beth}}}} \providecommand{\DiscAlt}{\ensuremath{\beth}} \providecommand{\Discount}{\ensuremath{\beta}} @@ -116,7 +116,7 @@ \providecommand{\DivGro}{\ensuremath{\mathrm{G}}} \providecommand{\divGro}{\ensuremath{\mathsf{g}}} \providecommand{\Div}{\ensuremath{D}} -% \providecommand{\div}{\ensuremath{d}} reserved for divide +% \providecommand{\div}{\ensuremath{d}} reserved for divide \providecommand{\DLev}{\ensuremath{D}} \providecommand{\Dvdnd}{\ensuremath{\mathbf{D}}} \providecommand{\dvdnd}{\ensuremath{d}} @@ -128,7 +128,7 @@ \providecommand{\ek}{\ensuremath{\lambda}} \providecommand{\EmpGro}{\ensuremath{\Xi}} \providecommand{\empGro}{\ensuremath{\xi}} -\providecommand{\empState}{\xi} % employment state indicator variable +\providecommand{\empState}{\xi} % employment state indicator variable \providecommand{\EpremLog}{\varphi} % Not using regular \eprem because want to distinguish between \varphi = log E_{t}[\Phi_{t+1}] and \phi_{t} = E[\log \Phi_{t}] \providecommand{\EPrem}{\Phi} % equity premium \providecommand{\eprem}{\phi} % log equity premium @@ -194,7 +194,7 @@ \providecommand{\inv}{{i}} \providecommand{\IRat}{\ensuremath{I}} \providecommand{\iRat}{\ensuremath{i}} -\providecommand{\itc}{\ensuremath{\zeta}} +\providecommand{\itc}{\ensuremath{\zeta}} \providecommand{\jFunc}{\ensuremath{\mathrm{j}}} \providecommand{\JLev}{\ensuremath{J}} \providecommand{\kapRent}{\ensuremath{\varkappa}} @@ -213,12 +213,12 @@ \providecommand{\kRat}{\ensuremath{k}} \providecommand{\kTargE}{\ensuremath{\Target{k}^{e}}} \providecommand{\kTarg}{\ensuremath{\Target{k}}} -\providecommand{\labor}{\ensuremath{\ell}} % +\providecommand{\labor}{\ensuremath{\ell}} % \providecommand{\Labor}{\ensuremath{L}} \providecommand{\labShare}{\ensuremath{\nu}} -\providecommand{\Leisure}{Z} % -\providecommand{\leisure}{z} % -\providecommand{\leiShare}{\ensuremath{\zeta}} % +\providecommand{\Leisure}{Z} % +\providecommand{\leisure}{z} % +\providecommand{\leiShare}{\ensuremath{\zeta}} % \providecommand{\LGro}{\ensuremath{\Lambda}} \providecommand{\lGro}{\ensuremath{\lambda}} \providecommand{\LLevBF}{\ensuremath{\mathbf{L}}} @@ -265,7 +265,7 @@ %\providecommand{\m}{\ensuremath{m}} %\providecommand{\M}{\ensuremath{M}} %\providecommand{\next}{2} % via search-and-replace -\providecommand{\Next}{t+1} % +\providecommand{\Next}{t+1} % \providecommand{\nFunc}{\ensuremath{\mathrm{n}}} \providecommand{\NLev}{\ensuremath{N}} \providecommand{\nLev}{\ensuremath{n}} @@ -296,9 +296,9 @@ \providecommand{\pDeadRate}{\ensuremath{\grave{\cancel{\mathsf{d}}}}} \providecommand{\pDead}{\ensuremath{\mathfrak{D}}} \providecommand{\pDieRate}{\ensuremath{\grave{\mathsf{d}}}} -\providecommand{\pDies}{\ensuremath{\mathsf{d}}} % Continuous time death rate +\providecommand{\pDies}{\ensuremath{\mathsf{d}}} % Continuous time death rate \providecommand{\PDies}{\ensuremath{\mathsf{D}}} % Discrete-time one-period death rate -\providecommand{\diePrb}{\ensuremath{\mathsf{d}}} % Continuous time death rate +\providecommand{\diePrb}{\ensuremath{\mathsf{d}}} % Continuous time death rate \providecommand{\DiePrb}{\ensuremath{\mathsf{D}}} % Discrete-time one-period death rate \providecommand{\PDV}{\ensuremath{\mathbb{P}}} % PDV \providecommand{\PGroAdj}{\ensuremath{\underline{\PGro}}} @@ -333,7 +333,7 @@ \providecommand{\PopLev}{\ensuremath{\pmb{N}}} \providecommand{\PopU}{\mathcal{U}} \providecommand{\Pop}{\ensuremath{L}} -\providecommand{\PostITC}{\ensuremath{\cancel{\zeta}}} +\providecommand{\PostITC}{\ensuremath{\cancel{\zeta}}} \providecommand{\power}{\ensuremath{\eta}} \providecommand{\pPDVFunc}{\ensuremath{\mathbb{P}}} \providecommand{\PPDV}{\ensuremath{\text{PDV($P$)}}} @@ -345,17 +345,17 @@ \providecommand{\prudEx}{\ensuremath{\omega}} \providecommand{\prud}{\ensuremath{\eta}} \providecommand{\pSav}{\ensuremath{\phi}} -\providecommand{\pShkMin}{\underline{\psi}} % -\providecommand{\PShk}{\Psi} % +\providecommand{\pShkMin}{\underline{\psi}} % +\providecommand{\PShk}{\Psi} % \providecommand{\PermShkAgg}{\Psi} % New \providecommand{\PermShk}{\Psi} % New \providecommand{\permShk}{\psi} % New -\providecommand{\pShk}{\psi} % +\providecommand{\pShk}{\psi} % \providecommand{\permShkInd}{\psi} % New -\providecommand{\pshk}{\psi} % +\providecommand{\pshk}{\psi} % \providecommand{\PtyGro}{\ensuremath{\Phi}} \providecommand{\ptyGro}{\ensuremath{\phi}} -\providecommand{\PtyLab}{\ensuremath{\mathrm{Z}}} % Labor productivity +\providecommand{\PtyLab}{\ensuremath{\mathrm{Z}}} % Labor productivity \providecommand{\ptyLab}{\ensuremath{z}} % usually, log of \PtyLab \providecommand{\PtyLev}{\ensuremath{A}} % Multiplies overall production function \providecommand{\ptyLev}{\ensuremath{a}} % Usually, log of \PtyLev @@ -368,7 +368,7 @@ \providecommand{\Rev}{\ensuremath{\Pi}} \providecommand{\rev}{\ensuremath{\pi}} \providecommand{\rfree}{\ensuremath{\mathsf{r}}} % The net return on the safe asset at an annual rate -\providecommand{\Rfree}{\ensuremath{\mathsf{R}}} % The return factor on the safe asset - unfortunately mathfrak fonts don't come through for tth +\providecommand{\Rfree}{\ensuremath{\mathsf{R}}} % The return factor on the safe asset - unfortunately mathfrak fonts don't come through for tth \providecommand{\RFunc}{\ensuremath{\mathrm{R}}} \providecommand{\RGross}{\ensuremath{\breve{\mathsf{R}}}} \providecommand{\rGross}{\ensuremath{\breve{\mathsf{r}}}} @@ -378,14 +378,14 @@ \providecommand{\riskyAlt}{\ensuremath{\pmb{\mathfrak{r}}}} % The net return on the risky asset annual rate \providecommand{\riskyshare}{\ensuremath{\varsigma}} \providecommand{\Risky}{\ensuremath{\mathbf{R}}} % The return on the risky asset -\providecommand{\risky}{\ensuremath{\mathbf{r}}} % The net return on the risky asset annual rate +\providecommand{\risky}{\ensuremath{\mathbf{r}}} % The net return on the risky asset annual rate \providecommand{\RLev}{\ensuremath{R}} % Rate of return (but better to use \Rfree or \Risky or something else more specific \providecommand{\RnormWGro}{\ensuremath{\mathcal{R}_{\WGro}}} % Normalized version of riskless return factor \providecommand{\rnormwGro}{\ensuremath{\mathit{r}_{\wGro}}} % Normalized version of riskless rate of return \providecommand{\Rnorm}{\ensuremath{\mathcal{R}}} % Normalized version of riskless return factor \providecommand{\rnorm}{\ensuremath{\mathit{r}}} % Normalized version of riskless rate of return \providecommand{\Rport}{\ensuremath{\mathbbmss{R}}} % Portfolio -weighted return -\providecommand{\rport}{\ensuremath{\mathbbmss{r}}} +\providecommand{\rport}{\ensuremath{\mathbbmss{r}}} \providecommand{\Rprod}{\ensuremath{\mathscr{R}}} \providecommand{\rprod}{\ensuremath{\mathscr{r}}} \providecommand{\rProd}{\ensuremath{\mathsf{r}}} @@ -396,8 +396,8 @@ \providecommand{\rboro}{\ensuremath{\bar{\rfree}}} %\providecommand{\R}{\Rfree} \providecommand{\saveRate}{\grave{s}} % saving (income minus consumption) over income -\providecommand{\Save}{S} % Saving (income minus consumption) -\providecommand{\save}{s} % saving (income minus consumption) +\providecommand{\Save}{S} % Saving (income minus consumption) +\providecommand{\save}{s} % saving (income minus consumption) \providecommand{\SDF}{\MLev} % Stochastic Discount Factor \providecommand{\sdr}{\mRat} % Stochastic Discount rate \providecommand{\Seniority}{\ensuremath{\mathsf{X}}} @@ -411,9 +411,9 @@ \providecommand{\sFunc}{\ensuremath{\mathrm{s}}} \providecommand{\shk}{\phi} \providecommand{\Shk}{\Phi} -\providecommand{\ShkLogZeroLogStd}{\sigma_{\cancel{\ShkMeanOneLog}}} % Std of that shock -\providecommand{\ShkLogZeroLogVar}{\sigma_{\cancel{\ShkMeanOneLog}}^{2}} % Variance of that shock -\providecommand{\ShkLogZeroLog}{\cancel{\ShkMeanOneLog}} % Log of that shock +\providecommand{\ShkLogZeroLogStd}{\sigma_{\cancel{\ShkMeanOneLog}}} % Std of that shock +\providecommand{\ShkLogZeroLogVar}{\sigma_{\cancel{\ShkMeanOneLog}}^{2}} % Variance of that shock +\providecommand{\ShkLogZeroLog}{\cancel{\ShkMeanOneLog}} % Log of that shock \providecommand{\ShkLogZero}{\cancel{\ShkMeanOne}} % A shock whose expectation in logs is zero; cancellation of the nonzero mean for the mean one shock \providecommand{\ShkMeanOneLogStd}{\sigma_{\ShkMeanOneLog}} % Std of that shock \providecommand{\ShkMeanOneLogVar}{\sigma^{2}_{\ShkMeanOneLog}} % Log of that shock @@ -477,16 +477,16 @@ \providecommand{\TLev}{\ensuremath{T}} \providecommand{\TMap}{\mathscr{T}} \providecommand{\tNow}{\ensuremath{t}} -\providecommand{\tShkAll}{\xi} % -\providecommand{\tShkEmpMin}{\underline{\theta}} % -\providecommand{\TShkEmp}{\Theta} % -\providecommand{\tShkEmp}{\theta} % -\providecommand{\tShkEmp}{\theta} % +\providecommand{\tShkAll}{\xi} % +\providecommand{\tShkEmpMin}{\underline{\theta}} % +\providecommand{\TShkEmp}{\Theta} % +\providecommand{\tShkEmp}{\theta} % +\providecommand{\tShkEmp}{\theta} % \providecommand{\tranShkInd}{\theta} % New \providecommand{\TranShkAgg}{\Theta} % New -\providecommand{\TShk}{\Xi} % -\providecommand{\tShk}{\xi} % -\providecommand{\tshk}{\xi} % +\providecommand{\TShk}{\Xi} % +\providecommand{\tShk}{\xi} % +\providecommand{\tshk}{\xi} % \providecommand{\tSS}{\ensuremath{t}} \providecommand{\tThen}{\ensuremath{\tau}} \providecommand{\uFunc}{{\ensuremath{\mathrm{u}}}} @@ -545,8 +545,8 @@ \providecommand{\wBeg}{\kLev} % wealth as of the beginning of the period (before R is received, not including Y) \providecommand{\Wealth}{\ensuremath{O}} \providecommand{\wealth}{\ensuremath{o}} -\providecommand{\WEndRat}{\ARat} % -\providecommand{\wEndRat}{\aRat} % +\providecommand{\WEndRat}{\ARat} % +\providecommand{\wEndRat}{\aRat} % \providecommand{\WEnd}{\ALev} % Wealth as of the end of the period (after C has been chosen) \providecommand{\wEnd}{\aLev} % wealth as of the end of the period (after C has been taken) \providecommand{\Wend}{\ARat} % Wealth as of the end of the period (after C has been chosen) @@ -556,9 +556,9 @@ \providecommand{\WGro}{\ensuremath{\mathrm{G}}} \providecommand{\wGro}{\ensuremath{\mathsf{g}}} \providecommand{\whumMin}{\underline{\hRat}} % human wealth -- individual -\providecommand{\WHum}{\HLev} % Human wealth -- aggregate +\providecommand{\WHum}{\HLev} % Human wealth -- aggregate \providecommand{\wHum}{\hLev} % human wealth -- individual -\providecommand{\Whum}{\HRat} % Human wealth -- aggregate +\providecommand{\Whum}{\HRat} % Human wealth -- aggregate \providecommand{\whum}{\hRat} % human wealth -- individual \providecommand{\WLev}{\ensuremath{W}} \providecommand{\wLev}{\pmb{w}} @@ -570,15 +570,15 @@ \providecommand{\WMkt}{\MLev} % Wealth as of the middle of the period (after R is received, including Y) \providecommand{\wMkt}{\mLev} % wealth as of the middle of the period (after R is received, including Y) \providecommand{\wmkt}{\mLev} % wealth as of the middle of the period (after R is received, including Y) -\providecommand{\wNet}{\ensuremath{x}} % +\providecommand{\wNet}{\ensuremath{x}} % \providecommand{\WNet}{\ensuremath{X}} % Total wealth \providecommand{\WPre}{{K}} \providecommand{\wPre}{{k}} -\providecommand{\wRat}{\ensuremath{o}} % +\providecommand{\wRat}{\ensuremath{o}} % \providecommand{\WRat}{\ensuremath{O}} % Ratio to permanent income -\providecommand{\wTot}{\ensuremath{\mathbf{o}}} % +\providecommand{\wTot}{\ensuremath{\mathbf{o}}} % \providecommand{\WTot}{\ensuremath{\mathbf{O}}} % Total wealth -\providecommand{\wtot}{\ensuremath{o}} % +\providecommand{\wtot}{\ensuremath{o}} % \providecommand{\Wtot}{\ensuremath{O}} % Total wealth \providecommand{\xFer}{\chi} \providecommand{\XFer}{X} @@ -636,4 +636,3 @@ \renewcommand{\recm}{\item[\phantom{$^{*}$}]} \providecommand{\pd}[2]{\frac{\partial#1}{\partial#2}} - diff --git a/Documentation/texmf-local/tex/latex/handout.cls b/Documentation/texmf-local/tex/latex/handout.cls index 17b62c658..9c9e63664 100644 --- a/Documentation/texmf-local/tex/latex/handout.cls +++ b/Documentation/texmf-local/tex/latex/handout.cls @@ -1,11 +1,11 @@ %%% LaTeX class for economics %%% %%% author: Christopher Carroll -%%% license: LaTeX Project Public License +%%% license: LaTeX Project Public License %%% %%% Modified from style itaxpf by Arne Henningsen %%% version: 1.0 (09 July 2007) -%%% license: LaTeX Project Public License +%%% license: LaTeX Project Public License %%% %%% Further information is available at %%% http://www.uni-kiel.de/agrarpol/ahenningsen/latex-bibtex.html @@ -74,8 +74,8 @@ %% Added the above info to the definition of normalsize \def\normalsize{\@setfontsize \normalsize \@xiipt {14.5} -\abovedisplayskip 6\p@ \@plus 3\p@ \@minus 3\p@ -\belowdisplayskip \abovedisplayskip +\abovedisplayskip 6\p@ \@plus 3\p@ \@minus 3\p@ +\belowdisplayskip \abovedisplayskip \abovedisplayshortskip 6pt \belowdisplayshortskip 6pt \let \@listi \@listI} \normalsize @@ -127,8 +127,8 @@ amsmath,amssymb,amsfonts,amsthm %---------------Custom Definitions-------------- -\def\liminf{\mathop{\rm lim\, inf}\limits} -\DeclareMathOperator{\Ex}{\mathbb{E}} % Expectations operator +\def\liminf{\mathop{\rm lim\, inf}\limits} +\DeclareMathOperator{\Ex}{\mathbb{E}} % Expectations operator \def\var{\operatorname{var}} % variance \def\cov{\operatorname{cov}} % covariance \def\std{\operatorname{std}} % standard deviation @@ -151,7 +151,7 @@ amsmath,amssymb,amsfonts,amsthm %To prevent breaking math formula \relpenalty=4000 %from 0 to 10000, default is 500 -%To prevent breaking math formula after binary operator +%To prevent breaking math formula after binary operator \binoppenalty=10000 %from 0 to 10000, default is 700 %-------------------------------------------------------- @@ -216,13 +216,13 @@ amsmath,amssymb,amsfonts,amsthm % titlepage with title, author(s), and date \renewcommand{\maketitle}{ -\ifthenelse{ \isundefined\@forcedate }{ +\ifthenelse{ \isundefined\@forcedate }{ \ClassWarningNoLine{handout}{{\protect\forcedate} is undefined in the .tex file; please define it and rerun}}{} \ifthenelse{\equal{\theIncludeTitlePage}{1}}{ \let\footnotesize\scriptsize \thispagestyle{empty} \vspace*{0mm} - \enlargethispage{0.4in} + \enlargethispage{0.4in} }{} \begin{center} \begin{LARGE} @@ -230,7 +230,7 @@ amsmath,amssymb,amsfonts,amsthm \textbf{\@title} \end{spacing} \end{LARGE}\medskip\medskip\medskip - {\normalsize \@date \par} + {\normalsize \@date \par} {\tiny{~}\par} \ifthenelse{\equal{\theIncludeTitlePage}{1}}{ \vspace*{3mm} @@ -251,7 +251,7 @@ amsmath,amssymb,amsfonts,amsthm \let\footnotesize\scriptsize \thispagestyle{empty} \vspace*{0mm} - \enlargethispage{0.4in} + \enlargethispage{0.4in} }{} \begin{center} \begin{LARGE} @@ -259,7 +259,7 @@ amsmath,amssymb,amsfonts,amsthm \textbf{\@title} \end{spacing} \end{LARGE}\medskip\medskip\medskip - {\normalsize #1 \par} + {\normalsize #1 \par} {\tiny{~}\par} \ifthenelse{\equal{\theIncludeTitlePage}{1}}{ \vspace*{3mm} @@ -285,7 +285,7 @@ amsmath,amssymb,amsfonts,amsthm \vspace*{4mm} \abstractSizeDefault \noindent \textbf{Abstract}\\ - \indent + \indent }{% \noindent {\tiny \phantom{.}} \\ % Trick to get proper spacing in html \noindent \hrule height 0.4pt depth 0.0pt width \textwidth \relax @@ -334,7 +334,7 @@ amsmath,amssymb,amsfonts,amsthm \pagestyle{plain} \thispagestyle{empty} -\newcommand{\titlepagefinish}{\newpage +\newcommand{\titlepagefinish}{\newpage \renewcommand\@makefnmark {\mbox{\textsuperscript{\tiny\@thefnmark}}} } @@ -355,11 +355,11 @@ amsmath,amssymb,amsfonts,amsthm %%% the original code. %% Sample use: -%% \author{Christopher D. Carroll\authNum \\ +%% \author{Christopher D. Carroll\authNum \\ %% \and -%% Jiri Slacalek\authNum \\ +%% Jiri Slacalek\authNum \\ %% \and -%% Martin Sommer\authNum \\ +%% Martin Sommer\authNum \\ %% \and %% Another Name\authNum %% \and diff --git a/Documentation/texmf-local/tex/latex/handout.sty b/Documentation/texmf-local/tex/latex/handout.sty index fcefb5736..1147b1e85 100755 --- a/Documentation/texmf-local/tex/latex/handout.sty +++ b/Documentation/texmf-local/tex/latex/handout.sty @@ -1,7 +1,7 @@ %---------------Custom Definitions-------------- -\def\liminf{\mathop{\rm lim\, inf}\limits} -\DeclareMathOperator{\Ex}{\mathbb{E}} % Expectations operator +\def\liminf{\mathop{\rm lim\, inf}\limits} +\DeclareMathOperator{\Ex}{\mathbb{E}} % Expectations operator \def\var{\operatorname{var}} % variance \def\cov{\operatorname{cov}} % covariance \def\std{\operatorname{std}} % standard deviation @@ -24,11 +24,7 @@ %To prevent breaking math formula \relpenalty=4000 %from 0 to 10000, default is 500 -%To prevent breaking math formula after binary operator +%To prevent breaking math formula after binary operator \binoppenalty=10000 %from 0 to 10000, default is 700 %-------------------------------------------------------- - - - - diff --git a/Documentation/texmf-local/tex/latex/handoutSetup.sty b/Documentation/texmf-local/tex/latex/handoutSetup.sty index 33ff60fb4..d5dca3c59 100644 --- a/Documentation/texmf-local/tex/latex/handoutSetup.sty +++ b/Documentation/texmf-local/tex/latex/handoutSetup.sty @@ -1,8 +1,8 @@ \usepackage{handoutShortcuts} \RequirePackage{wasysym -,psibycus % Greek language package, including koppa +,psibycus % Greek language package, including koppa ,ushort -%,lscape % Pages in landscape mode go inside \begin{landscape}\end{landscape} % CONFLICTS WITH EPSTOPDF +%,lscape % Pages in landscape mode go inside \begin{landscape}\end{landscape} % CONFLICTS WITH EPSTOPDF } \newenvironment{CDCPrivate} % Environment for extra material not wanted in the public document @@ -23,7 +23,7 @@ \setboolean{BigAndWide}{true} \setboolean{BigAndWide}{false} -% Options to set if being run from the shell (so autocompiled) +% Options to set if being run from the shell (so autocompiled) \opt{FromShell}{ \setboolean{bigPrint}{false} \setboolean{wideMargins}{false} @@ -61,7 +61,7 @@ } % Keep the elements in the argument #1 together on the same page -\newcommand{\together}[1]{\noindent\parbox{\linewidth}{#1}} +\newcommand{\together}[1]{\noindent\parbox{\linewidth}{#1}} % html version of document must be constructed by running pdflatex in % dvi output mode; code below creates an ifdvi construct that detects @@ -75,7 +75,7 @@ % dvi compilation only occurs if making the html version \ifdvi - \setboolean{Web}{true} + \setboolean{Web}{true} \RequirePackage{tex4ht} \RequirePackage{graphicx} \RequirePackage[tex4ht]{hyperref} @@ -144,7 +144,7 @@ \definecolor{darkred}{rgb}{0.6,0,0} \hypersetup{colorlinks=true, % put a box around links linkbordercolor = {1 0 0}, % the box will be red - pdfborder = {1 0 0}, % + pdfborder = {1 0 0}, % % bookmarks=true, % PDF will contain an index on the RHS urlcolor=darkred, citecolor=darkblue, @@ -179,7 +179,7 @@ \newcommand{\Aggregation}{\href{https://www.econ2.jhu.edu/people/ccarroll/public/lecturenotes/MathFacts/Aggregation.pdf}{\texttt{Aggregation}}} -% If doing a web version, renewcommands link to the html versions of handouts +% If doing a web version, renewcommands link to the html versions of handouts \ifdvi \renewcommand{\handoutC}[1]{\href{https://www.econ2.jhu.edu/people/ccarroll/public/lecturenotes/consumption/#1}{\texttt{#1}}} \renewcommand{\handoutA}[1]{\href{https://www.econ2.jhu.edu/people/ccarroll/public/lecturenotes/AssetPricing/#1}{\texttt{#1}}} diff --git a/Documentation/texmf-local/tex/latex/handoutshortcuts.sty b/Documentation/texmf-local/tex/latex/handoutshortcuts.sty index 85774abac..a1fa08a91 100644 --- a/Documentation/texmf-local/tex/latex/handoutshortcuts.sty +++ b/Documentation/texmf-local/tex/latex/handoutshortcuts.sty @@ -76,7 +76,7 @@ \providecommand{\CLev}{\ensuremath{C}} \providecommand{\Cons}{\ensuremath{C}} \providecommand{\cons}{\ensuremath{c}} -\providecommand{\corr}{\varrho} +\providecommand{\corr}{\varrho} \providecommand{\cPDVFunc}{\ensuremath{\mathbb{C}}} \providecommand{\CPDV}{\ensuremath{\text{PDV($C$)}}} \providecommand{\cPPP}{\cons^{\prime\prime\prime}} @@ -106,7 +106,7 @@ \providecommand{\DeprFac}{\ensuremath{\daleth}} \providecommand{\Depr}{\ensuremath{\daleth}} \providecommand{\depr}{\ensuremath{\delta}} -\providecommand{\deprRte}{\ensuremath{\delta}} % New +\providecommand{\deprRte}{\ensuremath{\delta}} % New \providecommand{\DiscAltuAdj}{\ensuremath{\underline{\underline{\beth}}}} \providecommand{\DiscAlt}{\ensuremath{\beth}} \providecommand{\Discount}{\ensuremath{\beta}} @@ -116,7 +116,7 @@ \providecommand{\DivGro}{\ensuremath{\mathsf{G}}} \providecommand{\divGro}{\ensuremath{\mathsf{g}}} \providecommand{\Div}{\ensuremath{D}} -% \providecommand{\div}{\ensuremath{d}} reserved for divide +% \providecommand{\div}{\ensuremath{d}} reserved for divide \providecommand{\DLev}{\ensuremath{D}} \providecommand{\Dvdnd}{\ensuremath{\mathbf{D}}} \providecommand{\dvdnd}{\ensuremath{d}} @@ -128,7 +128,7 @@ \providecommand{\ek}{\ensuremath{\lambda}} \providecommand{\EmpGro}{\ensuremath{\Xi}} \providecommand{\empGro}{\ensuremath{\xi}} -\providecommand{\empState}{\xi} % employment state indicator variable +\providecommand{\empState}{\xi} % employment state indicator variable \providecommand{\EpremLog}{\varphi} % Not using regular \eprem because want to distinguish between \varphi = log E_{t}[\Phi_{t+1}] and \phi_{t} = E[\log \Phi_{t}] \providecommand{\EPrem}{\Phi} % equity premium \providecommand{\eprem}{\phi} % log equity premium @@ -194,7 +194,7 @@ \providecommand{\inv}{{i}} \providecommand{\IRat}{\ensuremath{I}} \providecommand{\iRat}{\ensuremath{i}} -\providecommand{\itc}{\ensuremath{\zeta}} +\providecommand{\itc}{\ensuremath{\zeta}} \providecommand{\jFunc}{\ensuremath{\mathrm{j}}} \providecommand{\JLev}{\ensuremath{J}} \providecommand{\kapRent}{\ensuremath{\varkappa}} @@ -213,12 +213,12 @@ \providecommand{\kRat}{\ensuremath{k}} \providecommand{\kTargE}{\ensuremath{\Target{k}^{e}}} \providecommand{\kTarg}{\ensuremath{\Target{k}}} -\providecommand{\labor}{\ensuremath{\ell}} % +\providecommand{\labor}{\ensuremath{\ell}} % \providecommand{\Labor}{\ensuremath{L}} \providecommand{\labShare}{\ensuremath{\nu}} -\providecommand{\Leisure}{Z} % -\providecommand{\leisure}{z} % -\providecommand{\leiShare}{\ensuremath{\zeta}} % +\providecommand{\Leisure}{Z} % +\providecommand{\leisure}{z} % +\providecommand{\leiShare}{\ensuremath{\zeta}} % \providecommand{\LGro}{\ensuremath{\Lambda}} \providecommand{\lGro}{\ensuremath{\lambda}} \providecommand{\LLevBF}{\ensuremath{\mathbf{L}}} @@ -265,7 +265,7 @@ %\providecommand{\m}{\ensuremath{m}} %\providecommand{\M}{\ensuremath{M}} %\providecommand{\next}{2} % via search-and-replace -\providecommand{\Next}{t+1} % +\providecommand{\Next}{t+1} % \providecommand{\nFunc}{\ensuremath{\mathrm{n}}} \providecommand{\NLev}{\ensuremath{N}} \providecommand{\nLev}{\ensuremath{n}} @@ -296,7 +296,7 @@ \providecommand{\pDeadRate}{\ensuremath{\grave{\cancel{\mathsf{d}}}}} \providecommand{\pDead}{\ensuremath{\mathfrak{D}}} \providecommand{\pDieRate}{\ensuremath{\grave{\mathsf{d}}}} -\providecommand{\pDies}{\ensuremath{\mathsf{d}}} % Continuous time death rate +\providecommand{\pDies}{\ensuremath{\mathsf{d}}} % Continuous time death rate \providecommand{\PDies}{\ensuremath{\mathsf{D}}} % Discrete-time one-period death rate \providecommand{\PDV}{\ensuremath{\mathbb{P}}} % PDV \providecommand{\PGroAdj}{\ensuremath{\underline{\PGro}}} @@ -325,7 +325,7 @@ \providecommand{\PopLev}{\ensuremath{\pmb{N}}} \providecommand{\PopU}{\mathcal{U}} \providecommand{\Pop}{\ensuremath{L}} -\providecommand{\PostITC}{\ensuremath{\cancel{\zeta}}} +\providecommand{\PostITC}{\ensuremath{\cancel{\zeta}}} \providecommand{\power}{\ensuremath{\eta}} \providecommand{\pPDVFunc}{\ensuremath{\mathbb{P}}} \providecommand{\PPDV}{\ensuremath{\text{PDV($P$)}}} @@ -337,17 +337,17 @@ \providecommand{\prudEx}{\ensuremath{\omega}} \providecommand{\prud}{\ensuremath{\eta}} \providecommand{\pSav}{\ensuremath{\phi}} -\providecommand{\pShkMin}{\underline{\psi}} % -\providecommand{\PShk}{\Psi} % +\providecommand{\pShkMin}{\underline{\psi}} % +\providecommand{\PShk}{\Psi} % \providecommand{\PermShkAgg}{\Psi} % New \providecommand{\PermShk}{\Psi} % New \providecommand{\permShk}{\psi} % New -\providecommand{\pShk}{\psi} % +\providecommand{\pShk}{\psi} % \providecommand{\permShkInd}{\psi} % New -\providecommand{\pshk}{\psi} % +\providecommand{\pshk}{\psi} % \providecommand{\PtyGro}{\ensuremath{\Phi}} \providecommand{\ptyGro}{\ensuremath{\phi}} -\providecommand{\PtyLab}{\ensuremath{\mathrm{Z}}} % Labor productivity +\providecommand{\PtyLab}{\ensuremath{\mathrm{Z}}} % Labor productivity \providecommand{\ptyLab}{\ensuremath{z}} % usually, log of \PtyLab \providecommand{\PtyLev}{\ensuremath{A}} % Multiplies overall production function \providecommand{\ptyLev}{\ensuremath{a}} % Usually, log of \PtyLev @@ -360,7 +360,7 @@ \providecommand{\Rev}{\ensuremath{\Pi}} \providecommand{\rev}{\ensuremath{\pi}} \providecommand{\rfree}{\ensuremath{\mathsf{r}}} % The net return on the safe asset at an annual rate -\providecommand{\Rfree}{\ensuremath{\mathsf{R}}} % The return factor on the safe asset - unfortunately mathfrak fonts don't come through for tth +\providecommand{\Rfree}{\ensuremath{\mathsf{R}}} % The return factor on the safe asset - unfortunately mathfrak fonts don't come through for tth \providecommand{\RFunc}{\ensuremath{\mathrm{R}}} \providecommand{\RGross}{\ensuremath{\breve{\mathsf{R}}}} \providecommand{\rGross}{\ensuremath{\breve{\mathsf{r}}}} @@ -370,14 +370,14 @@ \providecommand{\riskyAlt}{\ensuremath{\pmb{\mathfrak{r}}}} % The net return on the risky asset annual rate \providecommand{\riskyshare}{\ensuremath{\varsigma}} \providecommand{\Risky}{\ensuremath{\mathbf{R}}} % The return on the risky asset -\providecommand{\risky}{\ensuremath{\mathbf{r}}} % The net return on the risky asset annual rate +\providecommand{\risky}{\ensuremath{\mathbf{r}}} % The net return on the risky asset annual rate \providecommand{\RLev}{\ensuremath{R}} % Rate of return (but better to use \Rfree or \Risky or something else more specific \providecommand{\RnormWGro}{\ensuremath{\mathcal{R}_{\WGro}}} % Normalized version of riskless return factor \providecommand{\rnormwGro}{\ensuremath{\mathit{r}_{\wGro}}} % Normalized version of riskless rate of return \providecommand{\Rnorm}{\ensuremath{\mathcal{R}}} % Normalized version of riskless return factor \providecommand{\rnorm}{\ensuremath{\mathit{r}}} % Normalized version of riskless rate of return \providecommand{\Rport}{\ensuremath{\mathbbmss{R}}} % Portfolio -weighted return -\providecommand{\rport}{\ensuremath{\mathbbmss{r}}} +\providecommand{\rport}{\ensuremath{\mathbbmss{r}}} \providecommand{\Rprod}{\ensuremath{\mathscr{R}}} \providecommand{\rprod}{\ensuremath{\mathscr{r}}} \providecommand{\rProd}{\ensuremath{\mathsf{r}}} @@ -388,8 +388,8 @@ \providecommand{\rboro}{\ensuremath{\bar{\rfree}}} %\providecommand{\R}{\Rfree} \providecommand{\saveRate}{\grave{s}} % saving (income minus consumption) over income -\providecommand{\Save}{S} % Saving (income minus consumption) -\providecommand{\save}{s} % saving (income minus consumption) +\providecommand{\Save}{S} % Saving (income minus consumption) +\providecommand{\save}{s} % saving (income minus consumption) \providecommand{\SDF}{\MLev} % Stochastic Discount Factor \providecommand{\sdr}{\mRat} % Stochastic Discount rate \providecommand{\Seniority}{\ensuremath{\mathsf{X}}} @@ -403,9 +403,9 @@ \providecommand{\sFunc}{\ensuremath{\mathrm{s}}} \providecommand{\shk}{\phi} \providecommand{\Shk}{\Phi} -\providecommand{\ShkLogZeroLogStd}{\sigma_{\cancel{\ShkMeanOneLog}}} % Std of that shock -\providecommand{\ShkLogZeroLogVar}{\sigma_{\cancel{\ShkMeanOneLog}}^{2}} % Variance of that shock -\providecommand{\ShkLogZeroLog}{\cancel{\ShkMeanOneLog}} % Log of that shock +\providecommand{\ShkLogZeroLogStd}{\sigma_{\cancel{\ShkMeanOneLog}}} % Std of that shock +\providecommand{\ShkLogZeroLogVar}{\sigma_{\cancel{\ShkMeanOneLog}}^{2}} % Variance of that shock +\providecommand{\ShkLogZeroLog}{\cancel{\ShkMeanOneLog}} % Log of that shock \providecommand{\ShkLogZero}{\cancel{\ShkMeanOne}} % A shock whose expectation in logs is zero; cancellation of the nonzero mean for the mean one shock \providecommand{\ShkMeanOneLogStd}{\sigma_{\ShkMeanOneLog}} % Std of that shock \providecommand{\ShkMeanOneLogVar}{\sigma^{2}_{\ShkMeanOneLog}} % Log of that shock @@ -468,16 +468,16 @@ \providecommand{\TLev}{\ensuremath{T}} \providecommand{\TMap}{\mathscr{T}} \providecommand{\tNow}{\ensuremath{t}} -\providecommand{\tShkAll}{\xi} % -\providecommand{\tShkEmpMin}{\underline{\theta}} % -\providecommand{\TShkEmp}{\Theta} % -\providecommand{\tShkEmp}{\theta} % -\providecommand{\tShkEmp}{\theta} % +\providecommand{\tShkAll}{\xi} % +\providecommand{\tShkEmpMin}{\underline{\theta}} % +\providecommand{\TShkEmp}{\Theta} % +\providecommand{\tShkEmp}{\theta} % +\providecommand{\tShkEmp}{\theta} % \providecommand{\tranShkInd}{\theta} % New \providecommand{\TranShkAgg}{\Theta} % New -\providecommand{\TShk}{\Xi} % -\providecommand{\tShk}{\xi} % -\providecommand{\tshk}{\xi} % +\providecommand{\TShk}{\Xi} % +\providecommand{\tShk}{\xi} % +\providecommand{\tshk}{\xi} % \providecommand{\tSS}{\ensuremath{t}} \providecommand{\tThen}{\ensuremath{\tau}} \providecommand{\uFunc}{{\ensuremath{\mathrm{u}}}} @@ -536,8 +536,8 @@ \providecommand{\wBeg}{\kLev} % wealth as of the beginning of the period (before R is received, not including Y) \providecommand{\Wealth}{\ensuremath{O}} \providecommand{\wealth}{\ensuremath{o}} -\providecommand{\WEndRat}{\ARat} % -\providecommand{\wEndRat}{\aRat} % +\providecommand{\WEndRat}{\ARat} % +\providecommand{\wEndRat}{\aRat} % \providecommand{\WEnd}{\ALev} % Wealth as of the end of the period (after C has been chosen) \providecommand{\wEnd}{\aLev} % wealth as of the end of the period (after C has been taken) \providecommand{\Wend}{\ARat} % Wealth as of the end of the period (after C has been chosen) @@ -547,9 +547,9 @@ \providecommand{\WGro}{\ensuremath{\mathsf{G}}} \providecommand{\wGro}{\ensuremath{\mathsf{g}}} \providecommand{\whumMin}{\underline{\hRat}} % human wealth -- individual -\providecommand{\WHum}{\HLev} % Human wealth -- aggregate +\providecommand{\WHum}{\HLev} % Human wealth -- aggregate \providecommand{\wHum}{\hLev} % human wealth -- individual -\providecommand{\Whum}{\HRat} % Human wealth -- aggregate +\providecommand{\Whum}{\HRat} % Human wealth -- aggregate \providecommand{\whum}{\hRat} % human wealth -- individual \providecommand{\WLev}{\ensuremath{W}} \providecommand{\wLev}{\pmb{w}} @@ -561,15 +561,15 @@ \providecommand{\WMkt}{\MLev} % Wealth as of the middle of the period (after R is received, including Y) \providecommand{\wMkt}{\mLev} % wealth as of the middle of the period (after R is received, including Y) \providecommand{\wmkt}{\mLev} % wealth as of the middle of the period (after R is received, including Y) -\providecommand{\wNet}{\ensuremath{x}} % +\providecommand{\wNet}{\ensuremath{x}} % \providecommand{\WNet}{\ensuremath{X}} % Total wealth \providecommand{\WPre}{{K}} \providecommand{\wPre}{{k}} -\providecommand{\wRat}{\ensuremath{o}} % +\providecommand{\wRat}{\ensuremath{o}} % \providecommand{\WRat}{\ensuremath{O}} % Ratio to permanent income -\providecommand{\wTot}{\ensuremath{\mathbf{o}}} % +\providecommand{\wTot}{\ensuremath{\mathbf{o}}} % \providecommand{\WTot}{\ensuremath{\mathbf{O}}} % Total wealth -\providecommand{\wtot}{\ensuremath{o}} % +\providecommand{\wtot}{\ensuremath{o}} % \providecommand{\Wtot}{\ensuremath{O}} % Total wealth \providecommand{\xFer}{\chi} \providecommand{\XFer}{X} @@ -628,4 +628,3 @@ \renewcommand{\recm}{\item[\phantom{$^{*}$}]} \newcommand{\pd}[2]{\frac{\partial#1}{\partial#2}} - diff --git a/Documentation/texmf-local/tex/latex/printvrb.sty b/Documentation/texmf-local/tex/latex/printvrb.sty index de4fd564a..b8757b3d4 100755 --- a/Documentation/texmf-local/tex/latex/printvrb.sty +++ b/Documentation/texmf-local/tex/latex/printvrb.sty @@ -6,9 +6,9 @@ %%% revised version, April 8, 2011 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% Uses moreverb.sty, Rainer Schopf author, +%%% Uses moreverb.sty, Rainer Schopf author, %%% as method to send verbatim text to -%%% another file, +%%% another file, %%% These commands allow user to type in text or math and %%% have it print in more than one document, @@ -18,7 +18,7 @@ %%% Each fragment will have a unique name given as an argument %%% to writetofile. -%%% +%%% \usepackage{moreverb} \newwrite\verbatimout @@ -54,10 +54,10 @@ \vskip1sp \ifnum\definitionnumber=0 \expandafter\openin1 \jobname.vrb -\ifeof1 +\ifeof1 \else \input \jobname.vrb -\fi%% to get the previous definitions +\fi%% to get the previous definitions \immediate\openout\verbatimout=\jobname.vrb \fi %% @@ -91,7 +91,7 @@ file one more time!\else %%% Using fragments in new file: %%% \input jobname.vrb will bring in the definitions -%%% for the fragments. +%%% for the fragments. %%% (jobname is the same as the filename of the source document) %%% \namesinmargin will make names print as well as as printing @@ -100,7 +100,7 @@ file one more time!\else %%% \printfrag{name} will bring in fragment defined in source file, %%% and sent to jobname.vrb. -%%% \printfrag will save the problem of remembering to use +%%% \printfrag will save the problem of remembering to use %%% \csname ...\endcsname, and will check to see if fragment is defined \def\printfrag#1{\expandafter\ifx\csname #1\endcsname\relax\vskip12pt diff --git a/Documentation/texmf-local/tex/latex/snapshot.sty b/Documentation/texmf-local/tex/latex/snapshot.sty index 23d4a505a..311018ebe 100644 --- a/Documentation/texmf-local/tex/latex/snapshot.sty +++ b/Documentation/texmf-local/tex/latex/snapshot.sty @@ -4,8 +4,8 @@ %% %% The original source files were: %% -%% snapshot.dtx -%% +%% snapshot.dtx +%% %%% ==================================================================== %%% @LaTeX-doc-source-file{ %%% filename = "snapshot.dtx", diff --git a/Documentation/texmf-local/tex/latex/tex4ht/pictureenv.4ht b/Documentation/texmf-local/tex/latex/tex4ht/pictureenv.4ht index 1dcae3abc..b51123edc 100644 --- a/Documentation/texmf-local/tex/latex/tex4ht/pictureenv.4ht +++ b/Documentation/texmf-local/tex/latex/tex4ht/pictureenv.4ht @@ -1,3 +1,3 @@ % pictureenv.4ht from https://tex.stackexchange.com/questions/448300/tex4ht-conflict-with-math-in-table-vs-outside-table-when-using-svg -\ConfigureEnv{pictureenv}{\Picture*{}}{\EndPicture}{}{} \ No newline at end of file +\ConfigureEnv{pictureenv}{\Picture*{}}{\EndPicture}{}{} diff --git a/Documentation/texmf-local/tex/latex/tex4ht/svg-math-and-subfigures.cfg b/Documentation/texmf-local/tex/latex/tex4ht/svg-math-and-subfigures.cfg index 97e2784e1..327ef3631 100644 --- a/Documentation/texmf-local/tex/latex/tex4ht/svg-math-and-subfigures.cfg +++ b/Documentation/texmf-local/tex/latex/tex4ht/svg-math-and-subfigures.cfg @@ -1,8 +1,8 @@ -\Preamble{charset="utf-8",p-width,pic-align,pic-tabular} -\DeclareGraphicsExtensions{.png,.jpg,.svg} -\Configure{Picture}{.svg} +\Preamble{charset="utf-8",p-width,pic-align,pic-tabular} +\DeclareGraphicsExtensions{.png,.jpg,.svg} +\Configure{Picture}{.svg} -\Configure{VERSION}{} +\Configure{VERSION}{} \DeclareGraphicsRule{.png}{bmp}{.xbb}{} @@ -31,38 +31,38 @@ \Css{.subfigure img{display:block; margin-left:auto; margin-right:auto}} % Should, but does not seem to, center captions % This is for figures, which should be png format -\Configure{graphics*} - {png} - {%the special command below so it will copy the png over - \special{t4ht+@File: \csname Gin@base\endcsname.png} - \Picture[pict]{\csname Gin@base\endcsname .png - \space width="\expandafter\the\csname Gin@req@width\endcsname" -}% -}% +\Configure{graphics*} + {png} + {%the special command below so it will copy the png over + \special{t4ht+@File: \csname Gin@base\endcsname.png} + \Picture[pict]{\csname Gin@base\endcsname .png + \space width="\expandafter\the\csname Gin@req@width\endcsname" +}% +}% -\Configure{Picture}{.svg} +\Configure{Picture}{.svg} \makeatletter -\newcommand\emwidth{10} -\newcommand\CalcRem[1]{\strip@pt\dimexpr(#1)/\emwidth} +\newcommand\emwidth{10} +\newcommand\CalcRem[1]{\strip@pt\dimexpr(#1)/\emwidth} -\Configure{graphics*} - {svg} - {\Picture[pict]{\csname Gin@base\endcsname.svg - \space style="width:\CalcRem{\Gin@req@width}em;" - }% - \special{t4ht+@File: \csname Gin@base\endcsname.svg} - } +\Configure{graphics*} + {svg} + {\Picture[pict]{\csname Gin@base\endcsname.svg + \space style="width:\CalcRem{\Gin@req@width}em;" + }% + \special{t4ht+@File: \csname Gin@base\endcsname.svg} + } \makeatother -%add any custom \Css or HTML commands here as needed. +%add any custom \Css or HTML commands here as needed. -%These to tell tex4ht to make inline math images also +%These to tell tex4ht to make inline math images also \begin{document} -\Configure{$}{\PicMath}{\EndPicMath}{} -\Configure{PicMath}{}{}{}{class="math";align="absmiddle"} +\Configure{$}{\PicMath}{\EndPicMath}{} +\Configure{PicMath}{}{}{}{class="math";align="absmiddle"} \EndPreamble diff --git a/Documentation/texmf-local/tex/latex/tex4htMakeCFG.sh b/Documentation/texmf-local/tex/latex/tex4htMakeCFG.sh index 3a7dbe9df..26e46cbad 100755 --- a/Documentation/texmf-local/tex/latex/tex4htMakeCFG.sh +++ b/Documentation/texmf-local/tex/latex/tex4htMakeCFG.sh @@ -14,4 +14,3 @@ echo cp `kpsewhich svg-math-and-subfigures.cfg` $handoutName.cfg echo cp `kpsewhich svg-set-size-to-1p0.mk4` $handoutName.mk4 cp `kpsewhich svg-math-and-subfigures.cfg` $handoutName.cfg cp `kpsewhich svg-set-size-to-1p0.mk4` $handoutName.mk4 - diff --git a/Documentation/texmf-local/tex/latex/texmf-local/tex/latex/econtex.cls b/Documentation/texmf-local/tex/latex/texmf-local/tex/latex/econtex.cls index 331bf3ad5..e3b35b317 100644 --- a/Documentation/texmf-local/tex/latex/texmf-local/tex/latex/econtex.cls +++ b/Documentation/texmf-local/tex/latex/texmf-local/tex/latex/econtex.cls @@ -1,11 +1,11 @@ %%% LaTeX class for economics %%% %%% author: Christopher Carroll -%%% license: LaTeX Project Public License +%%% license: LaTeX Project Public License %%% %%% Modified from style itaxpf by Arne Henningsen %%% version: 1.0 (09 July 2007) -%%% license: LaTeX Project Public License +%%% license: LaTeX Project Public License %%% %%% Further information is available at %%% http://www.uni-kiel.de/agrarpol/ahenningsen/latex-bibtex.html @@ -73,8 +73,8 @@ %% Added the above info to the definition of normalsize \def\normalsize{\@setfontsize \normalsize \@xiipt {14.5} -\abovedisplayskip 6\p@ \@plus 3\p@ \@minus 3\p@ -\belowdisplayskip \abovedisplayskip +\abovedisplayskip 6\p@ \@plus 3\p@ \@minus 3\p@ +\belowdisplayskip \abovedisplayskip \abovedisplayshortskip 6pt \belowdisplayshortskip 6pt \let \@listi \@listI} \normalsize @@ -118,8 +118,8 @@ amsmath,amssymb,amsfonts,amsthm %---------------Custom Definitions-------------- -\def\liminf{\mathop{\rm lim\, inf}\limits} -\DeclareMathOperator{\Ex}{\mathbb{E}} % Expectations operator +\def\liminf{\mathop{\rm lim\, inf}\limits} +\DeclareMathOperator{\Ex}{\mathbb{E}} % Expectations operator \def\var{\operatorname{var}} % variance \def\cov{\operatorname{cov}} % covariance \def\std{\operatorname{std}} % standard deviation @@ -142,7 +142,7 @@ amsmath,amssymb,amsfonts,amsthm %To prevent breaking math formula \relpenalty=4000 %from 0 to 10000, default is 500 -%To prevent breaking math formula after binary operator +%To prevent breaking math formula after binary operator \binoppenalty=10000 %from 0 to 10000, default is 700 %-------------------------------------------------------- @@ -207,13 +207,13 @@ amsmath,amssymb,amsfonts,amsthm % titlepage with title, author(s), and date \renewcommand{\maketitle}{ -\ifthenelse{ \isundefined\@forcedate }{ +\ifthenelse{ \isundefined\@forcedate }{ \ClassWarningNoLine{econtex}{{\protect\forcedate} is undefined in the .tex file; please define it and rerun}}{} \ifthenelse{\equal{\theIncludeTitlePage}{1}}{ \let\footnotesize\scriptsize \thispagestyle{empty} \vspace*{0mm} - \enlargethispage{0.4in} + \enlargethispage{0.4in} }{} \begin{center} \begin{LARGE} @@ -221,7 +221,7 @@ amsmath,amssymb,amsfonts,amsthm \textbf{\@title} \end{spacing} \end{LARGE}\medskip\medskip\medskip - {\normalsize \@date \par} + {\normalsize \@date \par} {\tiny{~}\par} \ifthenelse{\equal{\theIncludeTitlePage}{1}}{ \vspace*{3mm} @@ -242,7 +242,7 @@ amsmath,amssymb,amsfonts,amsthm \let\footnotesize\scriptsize \thispagestyle{empty} \vspace*{0mm} - \enlargethispage{0.4in} + \enlargethispage{0.4in} }{} \begin{center} \begin{LARGE} @@ -250,7 +250,7 @@ amsmath,amssymb,amsfonts,amsthm \textbf{\@title} \end{spacing} \end{LARGE}\medskip\medskip\medskip - {\normalsize #1 \par} + {\normalsize #1 \par} {\tiny{~}\par} \ifthenelse{\equal{\theIncludeTitlePage}{1}}{ \vspace*{3mm} @@ -276,7 +276,7 @@ amsmath,amssymb,amsfonts,amsthm \vspace*{4mm} \abstractSizeDefault \noindent \textbf{Abstract}\\ - \indent + \indent }{% \noindent {\tiny \phantom{.}} \\ % Trick to get proper spacing in html \noindent \hrule height 0.4pt depth 0.0pt width \textwidth \relax @@ -325,7 +325,7 @@ amsmath,amssymb,amsfonts,amsthm \pagestyle{plain} \thispagestyle{empty} -\newcommand{\titlepagefinish}{\newpage +\newcommand{\titlepagefinish}{\newpage \renewcommand\@makefnmark {\mbox{\textsuperscript{\tiny\@thefnmark}}} } @@ -346,11 +346,11 @@ amsmath,amssymb,amsfonts,amsthm %%% the original code. %% Sample use: -%% \author{Christopher D. Carroll\authNum \\ +%% \author{Christopher D. Carroll\authNum \\ %% \and -%% Jiri Slacalek\authNum \\ +%% Jiri Slacalek\authNum \\ %% \and -%% Martin Sommer\authNum \\ +%% Martin Sommer\authNum \\ %% \and %% Another Name\authNum %% \and diff --git a/Documentation/texmf-local/tex/latex/texmf-local/tex/latex/econtex.sty b/Documentation/texmf-local/tex/latex/texmf-local/tex/latex/econtex.sty index fcefb5736..1147b1e85 100644 --- a/Documentation/texmf-local/tex/latex/texmf-local/tex/latex/econtex.sty +++ b/Documentation/texmf-local/tex/latex/texmf-local/tex/latex/econtex.sty @@ -1,7 +1,7 @@ %---------------Custom Definitions-------------- -\def\liminf{\mathop{\rm lim\, inf}\limits} -\DeclareMathOperator{\Ex}{\mathbb{E}} % Expectations operator +\def\liminf{\mathop{\rm lim\, inf}\limits} +\DeclareMathOperator{\Ex}{\mathbb{E}} % Expectations operator \def\var{\operatorname{var}} % variance \def\cov{\operatorname{cov}} % covariance \def\std{\operatorname{std}} % standard deviation @@ -24,11 +24,7 @@ %To prevent breaking math formula \relpenalty=4000 %from 0 to 10000, default is 500 -%To prevent breaking math formula after binary operator +%To prevent breaking math formula after binary operator \binoppenalty=10000 %from 0 to 10000, default is 700 %-------------------------------------------------------- - - - - diff --git a/Documentation/texmf-local/tex/latex/texmf-local/tex/latex/econtexBibMake.tex b/Documentation/texmf-local/tex/latex/texmf-local/tex/latex/econtexBibMake.tex index ab0168a20..f7684326d 100644 --- a/Documentation/texmf-local/tex/latex/texmf-local/tex/latex/econtexBibMake.tex +++ b/Documentation/texmf-local/tex/latex/texmf-local/tex/latex/econtexBibMake.tex @@ -1,7 +1,7 @@ -%\write18{if [ `kpsewhich economics.bib` != '' ]; then touch economics.bib ; fi} # This should be done only for final versions AFTER bibexport has occurred and \jobname.bib is populated +%\write18{if [ `kpsewhich economics.bib` != '' ]; then touch economics.bib ; fi} # This should be done only for final versions AFTER bibexport has occurred and \jobname.bib is populated \write18{if [ ! -f \jobname.bib ]; then touch \jobname.bib ; fi} \write18{if [ ! -f \jobname-Add.bib ]; then touch \jobname-Add.bib ; fi} - + \bibliography{economics,\jobname,\jobname-Add} diff --git a/Documentation/texmf-local/tex/latex/texmf-local/tex/latex/econtexSetup.sty b/Documentation/texmf-local/tex/latex/texmf-local/tex/latex/econtexSetup.sty index db3c398f3..4088895a3 100644 --- a/Documentation/texmf-local/tex/latex/texmf-local/tex/latex/econtexSetup.sty +++ b/Documentation/texmf-local/tex/latex/texmf-local/tex/latex/econtexSetup.sty @@ -1,7 +1,7 @@ \RequirePackage{wasysym -,psibycus % Greek language package, including koppa +,psibycus % Greek language package, including koppa ,ushort -%,lscape % Pages in landscape mode go inside \begin{landscape}\end{landscape} % CONFLICTS WITH EPSTOPDF +%,lscape % Pages in landscape mode go inside \begin{landscape}\end{landscape} % CONFLICTS WITH EPSTOPDF } \newenvironment{CDCPrivate} % Environment for extra material not wanted in the public document @@ -22,7 +22,7 @@ \setboolean{BigAndWide}{true} \setboolean{BigAndWide}{false} -% Options to set if being run from the shell (so autocompiled) +% Options to set if being run from the shell (so autocompiled) \opt{FromShell}{ \setboolean{bigPrint}{false} \setboolean{wideMargins}{false} @@ -60,7 +60,7 @@ } % Keep the elements in the argument #1 together on the same page -\newcommand{\together}[1]{\noindent\parbox{\linewidth}{#1}} +\newcommand{\together}[1]{\noindent\parbox{\linewidth}{#1}} % html version of document must be constructed by running pdflatex in % dvi output mode; code below creates an ifdvi construct that detects @@ -74,7 +74,7 @@ % dvi compilation only occurs if making the html version \ifdvi - \setboolean{Web}{true} + \setboolean{Web}{true} \RequirePackage{tex4ht} \RequirePackage{graphicx} \RequirePackage[tex4ht]{hyperref} @@ -143,7 +143,7 @@ \definecolor{darkred}{rgb}{0.3,0,0} \hypersetup{colorlinks=true, % put a box around links linkbordercolor = {1 0 0}, % the box will be red - pdfborder = {1 0 0}, % + pdfborder = {1 0 0}, % % bookmarks=true, % PDF will contain an index on the RHS urlcolor=darkred, citecolor=darkblue, @@ -172,7 +172,7 @@ \newcommand{\Aggregation}{\href{https://www.econ2.jhu.edu/people/ccarroll/public/lecturenotes/MathFacts/Aggregation.pdf}{\texttt{Aggregation}}} -% If doing a web version, renewcommands link to the html versions of handouts +% If doing a web version, renewcommands link to the html versions of handouts \ifdvi \renewcommand{\handoutC}[1]{\href{https://www.econ2.jhu.edu/people/ccarroll/public/lecturenotes/consumption/#1}{\texttt{#1}}} \renewcommand{\handoutA}[1]{\href{https://www.econ2.jhu.edu/people/ccarroll/public/lecturenotes/AssetPricing/#1}{\texttt{#1}}} @@ -229,8 +229,3 @@ \end{quote} } {#2}} - - - - - diff --git a/Documentation/texmf-local/tex/latex/texmf-local/tex/latex/econtexShortcuts.sty b/Documentation/texmf-local/tex/latex/texmf-local/tex/latex/econtexShortcuts.sty index 32769751c..815471c61 100644 --- a/Documentation/texmf-local/tex/latex/texmf-local/tex/latex/econtexShortcuts.sty +++ b/Documentation/texmf-local/tex/latex/texmf-local/tex/latex/econtexShortcuts.sty @@ -75,7 +75,7 @@ \providecommand{\CLev}{\ensuremath{C}} \providecommand{\Cons}{\ensuremath{C}} \providecommand{\cons}{\ensuremath{c}} -\providecommand{\corr}{\varrho} +\providecommand{\corr}{\varrho} \providecommand{\cPDVFunc}{\ensuremath{\mathbb{C}}} \providecommand{\CPDV}{\ensuremath{\text{PDV($C$)}}} \providecommand{\cPPP}{\cons^{\prime\prime\prime}} @@ -105,7 +105,7 @@ \providecommand{\DeprFac}{\ensuremath{\daleth}} \providecommand{\Depr}{\ensuremath{\daleth}} \providecommand{\depr}{\ensuremath{\delta}} -\providecommand{\deprRte}{\ensuremath{\delta}} % New +\providecommand{\deprRte}{\ensuremath{\delta}} % New \providecommand{\DiscAltuAdj}{\ensuremath{\underline{\underline{\beth}}}} \providecommand{\DiscAlt}{\ensuremath{\beth}} \providecommand{\Discount}{\ensuremath{\beta}} @@ -127,7 +127,7 @@ \providecommand{\ek}{\ensuremath{\lambda}} \providecommand{\EmpGro}{\ensuremath{\Xi}} \providecommand{\empGro}{\ensuremath{\xi}} -\providecommand{\empState}{\xi} % employment state indicator variable +\providecommand{\empState}{\xi} % employment state indicator variable \providecommand{\EpremLog}{\varphi} % Not using regular \eprem because want to distinguish between \varphi = log E_{t}[\Phi_{t+1}] and \phi_{t} = E[\log \Phi_{t}] \providecommand{\EPrem}{\Phi} % equity premium \providecommand{\eprem}{\phi} % log equity premium @@ -195,7 +195,7 @@ \providecommand{\inv}{{i}} \providecommand{\IRat}{\ensuremath{I}} \providecommand{\iRat}{\ensuremath{i}} -\providecommand{\itc}{\ensuremath{\zeta}} +\providecommand{\itc}{\ensuremath{\zeta}} \providecommand{\jFunc}{\ensuremath{\mathrm{j}}} \providecommand{\JLev}{\ensuremath{J}} \providecommand{\kapRent}{\ensuremath{\varkappa}} @@ -214,12 +214,12 @@ \providecommand{\kRat}{\ensuremath{k}} \providecommand{\kTargE}{\ensuremath{\Target{k}^{e}}} \providecommand{\kTarg}{\ensuremath{\Target{k}}} -\providecommand{\labor}{\ensuremath{\ell}} % +\providecommand{\labor}{\ensuremath{\ell}} % \providecommand{\Labor}{\ensuremath{L}} \providecommand{\labShare}{\ensuremath{\nu}} -\providecommand{\Leisure}{Z} % -\providecommand{\leisure}{z} % -\providecommand{\leiShare}{\ensuremath{\zeta}} % +\providecommand{\Leisure}{Z} % +\providecommand{\leisure}{z} % +\providecommand{\leiShare}{\ensuremath{\zeta}} % \providecommand{\LGro}{\ensuremath{\Lambda}} \providecommand{\lGro}{\ensuremath{\lambda}} \providecommand{\LLevBF}{\ensuremath{\mathbf{L}}} @@ -266,7 +266,7 @@ \providecommand{\m}{\ensuremath{m}} \providecommand{\M}{\ensuremath{M}} \providecommand{\next}{2} % via search-and-replace -\providecommand{\Next}{t+1} % +\providecommand{\Next}{t+1} % \providecommand{\nFunc}{\ensuremath{\mathrm{n}}} \providecommand{\NLev}{\ensuremath{N}} \providecommand{\nLev}{\ensuremath{n}} @@ -297,7 +297,7 @@ \providecommand{\pDeadRate}{\ensuremath{\grave{\cancel{\mathsf{d}}}}} \providecommand{\pDead}{\ensuremath{\mathfrak{D}}} \providecommand{\pDieRate}{\ensuremath{\grave{\mathsf{d}}}} -\providecommand{\pDies}{\ensuremath{\mathrm{d}}} % Continuous time death rate +\providecommand{\pDies}{\ensuremath{\mathrm{d}}} % Continuous time death rate \providecommand{\PDies}{\ensuremath{\mathsf{D}}} % Discrete-time one-period death rate \providecommand{\PDV}{\ensuremath{\mathbb{P}}} % PDV \providecommand{\PGroAdj}{\ensuremath{\underline{\PGro}}} @@ -326,7 +326,7 @@ \providecommand{\PopLev}{\ensuremath{\pmb{N}}} \providecommand{\PopU}{\mathcal{U}} \providecommand{\Pop}{\ensuremath{L}} -\providecommand{\PostITC}{\ensuremath{\cancel{\zeta}}} +\providecommand{\PostITC}{\ensuremath{\cancel{\zeta}}} \providecommand{\power}{\ensuremath{\eta}} \providecommand{\pPDVFunc}{\ensuremath{\mathbb{P}}} \providecommand{\PPDV}{\ensuremath{\text{PDV($P$)}}} @@ -338,17 +338,17 @@ \providecommand{\prudEx}{\ensuremath{\omega}} \providecommand{\prud}{\ensuremath{\eta}} \providecommand{\pSav}{\ensuremath{\phi}} -\providecommand{\pShkMin}{\underline{\psi}} % -\providecommand{\PShk}{\Psi} % +\providecommand{\pShkMin}{\underline{\psi}} % +\providecommand{\PShk}{\Psi} % \providecommand{\PermShkAgg}{\Psi} % New \providecommand{\PermShk}{\Psi} % New \providecommand{\permShk}{\psi} % New -\providecommand{\pShk}{\psi} % +\providecommand{\pShk}{\psi} % \providecommand{\permShkInd}{\psi} % New -\providecommand{\pshk}{\psi} % +\providecommand{\pshk}{\psi} % \providecommand{\PtyGro}{\ensuremath{\Phi}} \providecommand{\ptyGro}{\ensuremath{\phi}} -\providecommand{\PtyLab}{\ensuremath{\mathrm{Z}}} % Labor productivity +\providecommand{\PtyLab}{\ensuremath{\mathrm{Z}}} % Labor productivity \providecommand{\ptyLab}{\ensuremath{z}} % usually, log of \PtyLab \providecommand{\PtyLev}{\ensuremath{A}} % Multiplies overall production function \providecommand{\ptyLev}{\ensuremath{a}} % Usually, log of \PtyLev @@ -361,7 +361,7 @@ \providecommand{\Rev}{\ensuremath{\Pi}} \providecommand{\rev}{\ensuremath{\pi}} \providecommand{\rfree}{\ensuremath{\mathsf{r}}} % The net return on the safe asset at an annual rate -\providecommand{\Rfree}{\ensuremath{\mathsf{R}}} % The return factor on the safe asset - unfortunately mathfrak fonts don't come through for tth +\providecommand{\Rfree}{\ensuremath{\mathsf{R}}} % The return factor on the safe asset - unfortunately mathfrak fonts don't come through for tth \providecommand{\RFunc}{\ensuremath{\mathrm{R}}} \providecommand{\RGross}{\ensuremath{\breve{\mathsf{R}}}} \providecommand{\rGross}{\ensuremath{\breve{\mathsf{r}}}} @@ -369,7 +369,7 @@ \providecommand{\riskyAlt}{\ensuremath{\acute{\mathbf{r}}}} % The net return on the risky asset annual rate \providecommand{\riskyshare}{\ensuremath{\varsigma}} \providecommand{\Risky}{\ensuremath{\mathbf{R}}} % The return on the risky asset -\providecommand{\risky}{\ensuremath{\mathbf{r}}} % The net return on the risky asset annual rate +\providecommand{\risky}{\ensuremath{\mathbf{r}}} % The net return on the risky asset annual rate \providecommand{\RLev}{\ensuremath{R}} % Rate of return (but better to use \Rfree or \Risky or something else more specific \providecommand{\RnormWGro}{\ensuremath{\mathcal{R}_{\WGro}}} % Normalized version of riskless return factor \providecommand{\rnormwGro}{\ensuremath{\mathit{r}_{\wGro}}} % Normalized version of riskless rate of return @@ -387,8 +387,8 @@ \providecommand{\rboro}{\ensuremath{\bar{\rfree}}} \providecommand{\R}{\Rfree} \providecommand{\saveRate}{\grave{s}} % saving (income minus consumption) over income -\providecommand{\Save}{S} % Saving (income minus consumption) -\providecommand{\save}{s} % saving (income minus consumption) +\providecommand{\Save}{S} % Saving (income minus consumption) +\providecommand{\save}{s} % saving (income minus consumption) \providecommand{\SDF}{\MLev} % Stochastic Discount Factor \providecommand{\sdr}{\mRat} % Stochastic Discount rate \providecommand{\Seniority}{\ensuremath{\mathsf{X}}} @@ -401,9 +401,9 @@ \providecommand{\sFunc}{\ensuremath{\mathrm{s}}} \providecommand{\shk}{\phi} \providecommand{\Shk}{\Phi} -\providecommand{\ShkLogZeroLogStd}{\sigma_{\cancel{\ShkMeanOneLog}}} % Std of that shock -\providecommand{\ShkLogZeroLogVar}{\sigma_{\cancel{\ShkMeanOneLog}}^{2}} % Variance of that shock -\providecommand{\ShkLogZeroLog}{\cancel{\ShkMeanOneLog}} % Log of that shock +\providecommand{\ShkLogZeroLogStd}{\sigma_{\cancel{\ShkMeanOneLog}}} % Std of that shock +\providecommand{\ShkLogZeroLogVar}{\sigma_{\cancel{\ShkMeanOneLog}}^{2}} % Variance of that shock +\providecommand{\ShkLogZeroLog}{\cancel{\ShkMeanOneLog}} % Log of that shock \providecommand{\ShkLogZero}{\cancel{\ShkMeanOne}} % A shock whose expectation in logs is zero; cancellation of the nonzero mean for the mean one shock \providecommand{\ShkMeanOneLogStd}{\sigma_{\ShkMeanOneLog}} % Std of that shock \providecommand{\ShkMeanOneLogVar}{\sigma^{2}_{\ShkMeanOneLog}} % Log of that shock @@ -466,16 +466,16 @@ \providecommand{\TLev}{\ensuremath{T}} \providecommand{\TMap}{\mathscr{T}} \providecommand{\tNow}{\ensuremath{t}} -\providecommand{\tShkAll}{\xi} % -\providecommand{\tShkEmpMin}{\underline{\theta}} % -\providecommand{\TShkEmp}{\Theta} % -\providecommand{\tShkEmp}{\theta} % -\providecommand{\tShkEmp}{\theta} % +\providecommand{\tShkAll}{\xi} % +\providecommand{\tShkEmpMin}{\underline{\theta}} % +\providecommand{\TShkEmp}{\Theta} % +\providecommand{\tShkEmp}{\theta} % +\providecommand{\tShkEmp}{\theta} % \providecommand{\tranShkInd}{\theta} % New \providecommand{\TranShkAgg}{\Theta} % New -\providecommand{\TShk}{\Xi} % -\providecommand{\tShk}{\xi} % -\providecommand{\tshk}{\xi} % +\providecommand{\TShk}{\Xi} % +\providecommand{\tShk}{\xi} % +\providecommand{\tshk}{\xi} % \providecommand{\tSS}{\ensuremath{t}} \providecommand{\tThen}{\ensuremath{\tau}} \providecommand{\uFunc}{{\ensuremath{\mathrm{u}}}} @@ -534,8 +534,8 @@ \providecommand{\wBeg}{\kLev} % wealth as of the beginning of the period (before R is received, not including Y) \providecommand{\Wealth}{\ensuremath{O}} \providecommand{\wealth}{\ensuremath{o}} -\providecommand{\WEndRat}{\ARat} % -\providecommand{\wEndRat}{\aRat} % +\providecommand{\WEndRat}{\ARat} % +\providecommand{\wEndRat}{\aRat} % \providecommand{\WEnd}{\ALev} % Wealth as of the end of the period (after C has been chosen) \providecommand{\wEnd}{\aLev} % wealth as of the end of the period (after C has been taken) \providecommand{\Wend}{\ARat} % Wealth as of the end of the period (after C has been chosen) @@ -545,9 +545,9 @@ \providecommand{\WGro}{\ensuremath{\mathsf{G}}} \providecommand{\wGro}{\ensuremath{\mathsf{g}}} \providecommand{\whumMin}{\underline{\hRat}} % human wealth -- individual -\providecommand{\WHum}{\HLev} % Human wealth -- aggregate +\providecommand{\WHum}{\HLev} % Human wealth -- aggregate \providecommand{\wHum}{\hLev} % human wealth -- individual -\providecommand{\Whum}{\HRat} % Human wealth -- aggregate +\providecommand{\Whum}{\HRat} % Human wealth -- aggregate \providecommand{\whum}{\hRat} % human wealth -- individual \providecommand{\WLev}{\ensuremath{W}} \providecommand{\wLev}{\pmb{w}} @@ -559,15 +559,15 @@ \providecommand{\WMkt}{\MLev} % Wealth as of the middle of the period (after R is received, including Y) \providecommand{\wMkt}{\mLev} % wealth as of the middle of the period (after R is received, including Y) \providecommand{\wmkt}{\mLev} % wealth as of the middle of the period (after R is received, including Y) -\providecommand{\wNet}{\ensuremath{x}} % +\providecommand{\wNet}{\ensuremath{x}} % \providecommand{\WNet}{\ensuremath{X}} % Total wealth \providecommand{\WPre}{{K}} \providecommand{\wPre}{{k}} -\providecommand{\wRat}{\ensuremath{o}} % +\providecommand{\wRat}{\ensuremath{o}} % \providecommand{\WRat}{\ensuremath{O}} % Ratio to permanent income -\providecommand{\wTot}{\ensuremath{\mathbf{o}}} % +\providecommand{\wTot}{\ensuremath{\mathbf{o}}} % \providecommand{\WTot}{\ensuremath{\mathbf{O}}} % Total wealth -\providecommand{\wtot}{\ensuremath{o}} % +\providecommand{\wtot}{\ensuremath{o}} % \providecommand{\Wtot}{\ensuremath{O}} % Total wealth \providecommand{\xFer}{\chi} \providecommand{\XFer}{X} @@ -626,4 +626,3 @@ \providecommand{\Severance}{\kappa} \newcommand{\pd}[2]{\frac{\partial#1}{\partial#2}} - diff --git a/Documentation/texmf-local/tex/latex/texmf-local/tex/latex/handout.cls b/Documentation/texmf-local/tex/latex/texmf-local/tex/latex/handout.cls index e1319d6eb..fe0f8aae8 100644 --- a/Documentation/texmf-local/tex/latex/texmf-local/tex/latex/handout.cls +++ b/Documentation/texmf-local/tex/latex/texmf-local/tex/latex/handout.cls @@ -1,11 +1,11 @@ %%% LaTeX class for economics %%% %%% author: Christopher Carroll -%%% license: LaTeX Project Public License +%%% license: LaTeX Project Public License %%% %%% Modified from style itaxpf by Arne Henningsen %%% version: 1.0 (09 July 2007) -%%% license: LaTeX Project Public License +%%% license: LaTeX Project Public License %%% %%% Further information is available at %%% http://www.uni-kiel.de/agrarpol/ahenningsen/latex-bibtex.html @@ -74,8 +74,8 @@ %% Added the above info to the definition of normalsize \def\normalsize{\@setfontsize \normalsize \@xiipt {14.5} -\abovedisplayskip 6\p@ \@plus 3\p@ \@minus 3\p@ -\belowdisplayskip \abovedisplayskip +\abovedisplayskip 6\p@ \@plus 3\p@ \@minus 3\p@ +\belowdisplayskip \abovedisplayskip \abovedisplayshortskip 6pt \belowdisplayshortskip 6pt \let \@listi \@listI} \normalsize @@ -174,13 +174,13 @@ amsmath,amssymb,amsfonts,amsthm % titlepage with title, author(s), and date \renewcommand{\maketitle}{ -\ifthenelse{ \isundefined\@forcedate }{ +\ifthenelse{ \isundefined\@forcedate }{ \ClassWarningNoLine{handout}{{\protect\forcedate} is undefined in the .tex file; please define it and rerun}}{} \ifthenelse{\equal{\theIncludeTitlePage}{1}}{ \let\footnotesize\scriptsize \thispagestyle{empty} \vspace*{0mm} - \enlargethispage{0.4in} + \enlargethispage{0.4in} }{} \begin{center} \begin{LARGE} @@ -188,7 +188,7 @@ amsmath,amssymb,amsfonts,amsthm \textbf{\@title} \end{spacing} \end{LARGE}\medskip\medskip\medskip - {\normalsize \@date \par} + {\normalsize \@date \par} {\tiny{~}\par} \ifthenelse{\equal{\theIncludeTitlePage}{1}}{ \vspace*{3mm} @@ -209,7 +209,7 @@ amsmath,amssymb,amsfonts,amsthm \let\footnotesize\scriptsize \thispagestyle{empty} \vspace*{0mm} - \enlargethispage{0.4in} + \enlargethispage{0.4in} }{} \begin{center} \begin{LARGE} @@ -217,7 +217,7 @@ amsmath,amssymb,amsfonts,amsthm \textbf{\@title} \end{spacing} \end{LARGE}\medskip\medskip\medskip - {\normalsize #1 \par} + {\normalsize #1 \par} {\tiny{~}\par} \ifthenelse{\equal{\theIncludeTitlePage}{1}}{ \vspace*{3mm} @@ -243,7 +243,7 @@ amsmath,amssymb,amsfonts,amsthm \vspace*{4mm} \abstractSizeDefault \noindent \textbf{Abstract}\\ - \indent + \indent }{% \noindent {\tiny \phantom{.}} \\ % Trick to get proper spacing in html \noindent \hrule height 0.4pt depth 0.0pt width \textwidth \relax @@ -292,7 +292,7 @@ amsmath,amssymb,amsfonts,amsthm \pagestyle{plain} \thispagestyle{empty} -\newcommand{\titlepagefinish}{\newpage +\newcommand{\titlepagefinish}{\newpage \renewcommand\@makefnmark {\mbox{\textsuperscript{\tiny\@thefnmark}}} } @@ -313,11 +313,11 @@ amsmath,amssymb,amsfonts,amsthm %%% the original code. %% Sample use: -%% \author{Christopher D. Carroll\authNum \\ +%% \author{Christopher D. Carroll\authNum \\ %% \and -%% Jiri Slacalek\authNum \\ +%% Jiri Slacalek\authNum \\ %% \and -%% Martin Sommer\authNum \\ +%% Martin Sommer\authNum \\ %% \and %% Another Name\authNum %% \and diff --git a/Documentation/texmf-local/tex/latex/texmf-local/tex/latex/handoutSetup.sty b/Documentation/texmf-local/tex/latex/texmf-local/tex/latex/handoutSetup.sty index ed89c4ab5..ef8c548ca 100644 --- a/Documentation/texmf-local/tex/latex/texmf-local/tex/latex/handoutSetup.sty +++ b/Documentation/texmf-local/tex/latex/texmf-local/tex/latex/handoutSetup.sty @@ -1,7 +1,7 @@ \RequirePackage{wasysym -,psibycus % Greek language package, including koppa +,psibycus % Greek language package, including koppa ,ushort -%,lscape % Pages in landscape mode go inside \begin{landscape}\end{landscape} % CONFLICTS WITH EPSTOPDF +%,lscape % Pages in landscape mode go inside \begin{landscape}\end{landscape} % CONFLICTS WITH EPSTOPDF } \newenvironment{CDCPrivate} % Environment for extra material not wanted in the public document @@ -22,7 +22,7 @@ \setboolean{BigAndWide}{true} \setboolean{BigAndWide}{false} -% Options to set if being run from the shell (so autocompiled) +% Options to set if being run from the shell (so autocompiled) \opt{FromShell}{ \setboolean{bigPrint}{false} \setboolean{wideMargins}{false} @@ -60,7 +60,7 @@ } % Keep the elements in the argument #1 together on the same page -\newcommand{\together}[1]{\noindent\parbox{\linewidth}{#1}} +\newcommand{\together}[1]{\noindent\parbox{\linewidth}{#1}} % html version of document must be constructed by running pdflatex in % dvi output mode; code below creates an ifdvi construct that detects @@ -74,7 +74,7 @@ % dvi compilation only occurs if making the html version \ifdvi - \setboolean{Web}{true} + \setboolean{Web}{true} \RequirePackage{tex4ht} \RequirePackage{graphicx} \RequirePackage[tex4ht]{hyperref} @@ -143,7 +143,7 @@ \definecolor{darkred}{rgb}{0.6,0,0} \hypersetup{colorlinks=true, % put a box around links linkbordercolor = {1 0 0}, % the box will be red - pdfborder = {1 0 0}, % + pdfborder = {1 0 0}, % % bookmarks=true, % PDF will contain an index on the RHS urlcolor=darkred, citecolor=darkblue, @@ -178,7 +178,7 @@ \newcommand{\Aggregation}{\href{https://www.econ2.jhu.edu/people/ccarroll/public/lecturenotes/MathFacts/Aggregation.pdf}{\texttt{Aggregation}}} -% If doing a web version, renewcommands link to the html versions of handouts +% If doing a web version, renewcommands link to the html versions of handouts \ifdvi \renewcommand{\handoutC}[1]{\href{https://www.econ2.jhu.edu/people/ccarroll/public/lecturenotes/consumption/#1}{\texttt{#1}}} \renewcommand{\handoutA}[1]{\href{https://www.econ2.jhu.edu/people/ccarroll/public/lecturenotes/AssetPricing/#1}{\texttt{#1}}} diff --git a/Documentation/texmf-local/tex/latex/texmf-local/tex/latex/handoutShortcuts.sty b/Documentation/texmf-local/tex/latex/texmf-local/tex/latex/handoutShortcuts.sty index 25f7143bc..93e774b79 100644 --- a/Documentation/texmf-local/tex/latex/texmf-local/tex/latex/handoutShortcuts.sty +++ b/Documentation/texmf-local/tex/latex/texmf-local/tex/latex/handoutShortcuts.sty @@ -76,7 +76,7 @@ \providecommand{\CLev}{\ensuremath{C}} \providecommand{\Cons}{\ensuremath{C}} \providecommand{\cons}{\ensuremath{c}} -\providecommand{\corr}{\varrho} +\providecommand{\corr}{\varrho} \providecommand{\cPDVFunc}{\ensuremath{\mathbb{C}}} \providecommand{\CPDV}{\ensuremath{\text{PDV($C$)}}} \providecommand{\cPPP}{\cons^{\prime\prime\prime}} @@ -106,7 +106,7 @@ \providecommand{\DeprFac}{\ensuremath{\daleth}} \providecommand{\Depr}{\ensuremath{\daleth}} \providecommand{\depr}{\ensuremath{\delta}} -\providecommand{\deprRte}{\ensuremath{\delta}} % New +\providecommand{\deprRte}{\ensuremath{\delta}} % New \providecommand{\DiscAltuAdj}{\ensuremath{\underline{\underline{\beth}}}} \providecommand{\DiscAlt}{\ensuremath{\beth}} \providecommand{\Discount}{\ensuremath{\beta}} @@ -117,7 +117,7 @@ \providecommand{\DivGro}{\ensuremath{\mathrm{G}}} \providecommand{\divGro}{\ensuremath{\mathsf{g}}} \providecommand{\Div}{\ensuremath{D}} -% \providecommand{\div}{\ensuremath{d}} reserved for divide +% \providecommand{\div}{\ensuremath{d}} reserved for divide \providecommand{\DLev}{\ensuremath{D}} \providecommand{\Dvdnd}{\ensuremath{\mathbf{D}}} \providecommand{\dvdnd}{\ensuremath{d}} @@ -129,7 +129,7 @@ \providecommand{\ek}{\ensuremath{\lambda}} \providecommand{\EmpGro}{\ensuremath{\Xi}} \providecommand{\empGro}{\ensuremath{\xi}} -\providecommand{\empState}{\xi} % employment state indicator variable +\providecommand{\empState}{\xi} % employment state indicator variable \providecommand{\EpremLog}{\varphi} % Not using regular \eprem because want to distinguish between \varphi = log E_{t}[\Phi_{t+1}] and \phi_{t} = E[\log \Phi_{t}] \providecommand{\EPrem}{\Phi} % equity premium \providecommand{\eprem}{\phi} % log equity premium @@ -195,7 +195,7 @@ \providecommand{\inv}{{i}} \providecommand{\IRat}{\ensuremath{I}} \providecommand{\iRat}{\ensuremath{i}} -\providecommand{\itc}{\ensuremath{\zeta}} +\providecommand{\itc}{\ensuremath{\zeta}} \providecommand{\jFunc}{\ensuremath{\mathrm{j}}} \providecommand{\JLev}{\ensuremath{J}} \providecommand{\kapRent}{\ensuremath{\varkappa}} @@ -214,12 +214,12 @@ \providecommand{\kRat}{\ensuremath{k}} \providecommand{\kTargE}{\ensuremath{\Target{k}^{e}}} \providecommand{\kTarg}{\ensuremath{\Target{k}}} -\providecommand{\labor}{\ensuremath{\ell}} % +\providecommand{\labor}{\ensuremath{\ell}} % \providecommand{\Labor}{\ensuremath{L}} \providecommand{\labShare}{\ensuremath{\nu}} -\providecommand{\Leisure}{Z} % -\providecommand{\leisure}{z} % -\providecommand{\leiShare}{\ensuremath{\zeta}} % +\providecommand{\Leisure}{Z} % +\providecommand{\leisure}{z} % +\providecommand{\leiShare}{\ensuremath{\zeta}} % \providecommand{\LGro}{\ensuremath{\Lambda}} \providecommand{\lGro}{\ensuremath{\lambda}} \providecommand{\LLevBF}{\ensuremath{\mathbf{L}}} @@ -266,7 +266,7 @@ %\providecommand{\m}{\ensuremath{m}} %\providecommand{\M}{\ensuremath{M}} %\providecommand{\next}{2} % via search-and-replace -\providecommand{\Next}{t+1} % +\providecommand{\Next}{t+1} % \providecommand{\nFunc}{\ensuremath{\mathrm{n}}} \providecommand{\NLev}{\ensuremath{N}} \providecommand{\nLev}{\ensuremath{n}} @@ -297,9 +297,9 @@ \providecommand{\pDeadRate}{\ensuremath{\grave{\cancel{\mathsf{d}}}}} \providecommand{\pDead}{\ensuremath{\mathfrak{D}}} \providecommand{\pDieRate}{\ensuremath{\grave{\mathsf{d}}}} -\providecommand{\pDies}{\ensuremath{\mathsf{d}}} % Continuous time death rate +\providecommand{\pDies}{\ensuremath{\mathsf{d}}} % Continuous time death rate \providecommand{\PDies}{\ensuremath{\mathsf{D}}} % Discrete-time one-period death rate -\providecommand{\diePrb}{\ensuremath{\mathsf{d}}} % Continuous time death rate +\providecommand{\diePrb}{\ensuremath{\mathsf{d}}} % Continuous time death rate \providecommand{\DiePrb}{\ensuremath{\mathsf{D}}} % Discrete-time one-period death rate \providecommand{\PDV}{\ensuremath{\mathbb{P}}} % PDV \providecommand{\PGroAdj}{\ensuremath{\underline{\PGro}}} @@ -334,7 +334,7 @@ \providecommand{\PopLev}{\ensuremath{\pmb{N}}} \providecommand{\PopU}{\mathcal{U}} \providecommand{\Pop}{\ensuremath{L}} -\providecommand{\PostITC}{\ensuremath{\cancel{\zeta}}} +\providecommand{\PostITC}{\ensuremath{\cancel{\zeta}}} \providecommand{\power}{\ensuremath{\eta}} \providecommand{\pPDVFunc}{\ensuremath{\mathbb{P}}} \providecommand{\PPDV}{\ensuremath{\text{PDV($P$)}}} @@ -346,17 +346,17 @@ \providecommand{\prudEx}{\ensuremath{\omega}} \providecommand{\prud}{\ensuremath{\eta}} \providecommand{\pSav}{\ensuremath{\phi}} -\providecommand{\pShkMin}{\underline{\psi}} % -\providecommand{\PShk}{\Psi} % +\providecommand{\pShkMin}{\underline{\psi}} % +\providecommand{\PShk}{\Psi} % \providecommand{\PermShkAgg}{\Psi} % New \providecommand{\PermShk}{\Psi} % New \providecommand{\permShk}{\psi} % New -\providecommand{\pShk}{\psi} % +\providecommand{\pShk}{\psi} % \providecommand{\permShkInd}{\psi} % New -\providecommand{\pshk}{\psi} % +\providecommand{\pshk}{\psi} % \providecommand{\PtyGro}{\ensuremath{\Phi}} \providecommand{\ptyGro}{\ensuremath{\phi}} -\providecommand{\PtyLab}{\ensuremath{\mathrm{Z}}} % Labor productivity +\providecommand{\PtyLab}{\ensuremath{\mathrm{Z}}} % Labor productivity \providecommand{\ptyLab}{\ensuremath{z}} % usually, log of \PtyLab \providecommand{\PtyLev}{\ensuremath{A}} % Multiplies overall production function \providecommand{\ptyLev}{\ensuremath{a}} % Usually, log of \PtyLev @@ -369,7 +369,7 @@ \providecommand{\Rev}{\ensuremath{\Pi}} \providecommand{\rev}{\ensuremath{\pi}} \providecommand{\rfree}{\ensuremath{\mathsf{r}}} % The net return on the safe asset at an annual rate -\providecommand{\Rfree}{\ensuremath{\mathsf{R}}} % The return factor on the safe asset - unfortunately mathfrak fonts don't come through for tth +\providecommand{\Rfree}{\ensuremath{\mathsf{R}}} % The return factor on the safe asset - unfortunately mathfrak fonts don't come through for tth \providecommand{\RFunc}{\ensuremath{\mathrm{R}}} \providecommand{\RGross}{\ensuremath{\breve{\mathsf{R}}}} \providecommand{\rGross}{\ensuremath{\breve{\mathsf{r}}}} @@ -379,14 +379,14 @@ \providecommand{\riskyAlt}{\ensuremath{\pmb{\mathfrak{r}}}} % The net return on the risky asset annual rate \providecommand{\riskyshare}{\ensuremath{\varsigma}} \providecommand{\Risky}{\ensuremath{\mathbf{R}}} % The return on the risky asset -\providecommand{\risky}{\ensuremath{\mathbf{r}}} % The net return on the risky asset annual rate +\providecommand{\risky}{\ensuremath{\mathbf{r}}} % The net return on the risky asset annual rate \providecommand{\RLev}{\ensuremath{R}} % Rate of return (but better to use \Rfree or \Risky or something else more specific \providecommand{\RnormWGro}{\ensuremath{\mathcal{R}_{\WGro}}} % Normalized version of riskless return factor \providecommand{\rnormwGro}{\ensuremath{\mathit{r}_{\wGro}}} % Normalized version of riskless rate of return \providecommand{\Rnorm}{\ensuremath{\mathcal{R}}} % Normalized version of riskless return factor \providecommand{\rnorm}{\ensuremath{\mathit{r}}} % Normalized version of riskless rate of return \providecommand{\Rport}{\ensuremath{\mathbbmss{R}}} % Portfolio -weighted return -\providecommand{\rport}{\ensuremath{\mathbbmss{r}}} +\providecommand{\rport}{\ensuremath{\mathbbmss{r}}} \providecommand{\Rprod}{\ensuremath{\mathscr{R}}} \providecommand{\rprod}{\ensuremath{\mathscr{r}}} \providecommand{\rProd}{\ensuremath{\mathsf{r}}} @@ -397,8 +397,8 @@ \providecommand{\rboro}{\ensuremath{\bar{\rfree}}} %\providecommand{\R}{\Rfree} \providecommand{\saveRate}{\grave{s}} % saving (income minus consumption) over income -\providecommand{\Save}{S} % Saving (income minus consumption) -\providecommand{\save}{s} % saving (income minus consumption) +\providecommand{\Save}{S} % Saving (income minus consumption) +\providecommand{\save}{s} % saving (income minus consumption) \providecommand{\SDF}{\MLev} % Stochastic Discount Factor \providecommand{\sdr}{\mRat} % Stochastic Discount rate \providecommand{\Seniority}{\ensuremath{\mathsf{X}}} @@ -412,9 +412,9 @@ \providecommand{\sFunc}{\ensuremath{\mathrm{s}}} \providecommand{\shk}{\phi} \providecommand{\Shk}{\Phi} -\providecommand{\ShkLogZeroLogStd}{\sigma_{\cancel{\ShkMeanOneLog}}} % Std of that shock -\providecommand{\ShkLogZeroLogVar}{\sigma_{\cancel{\ShkMeanOneLog}}^{2}} % Variance of that shock -\providecommand{\ShkLogZeroLog}{\cancel{\ShkMeanOneLog}} % Log of that shock +\providecommand{\ShkLogZeroLogStd}{\sigma_{\cancel{\ShkMeanOneLog}}} % Std of that shock +\providecommand{\ShkLogZeroLogVar}{\sigma_{\cancel{\ShkMeanOneLog}}^{2}} % Variance of that shock +\providecommand{\ShkLogZeroLog}{\cancel{\ShkMeanOneLog}} % Log of that shock \providecommand{\ShkLogZero}{\cancel{\ShkMeanOne}} % A shock whose expectation in logs is zero; cancellation of the nonzero mean for the mean one shock \providecommand{\ShkMeanOneLogStd}{\sigma_{\ShkMeanOneLog}} % Std of that shock \providecommand{\ShkMeanOneLogVar}{\sigma^{2}_{\ShkMeanOneLog}} % Log of that shock @@ -478,16 +478,16 @@ \providecommand{\TLev}{\ensuremath{T}} \providecommand{\TMap}{\mathscr{T}} \providecommand{\tNow}{\ensuremath{t}} -\providecommand{\tShkAll}{\xi} % -\providecommand{\tShkEmpMin}{\underline{\theta}} % -\providecommand{\TShkEmp}{\Theta} % -\providecommand{\tShkEmp}{\theta} % -\providecommand{\tShkEmp}{\theta} % +\providecommand{\tShkAll}{\xi} % +\providecommand{\tShkEmpMin}{\underline{\theta}} % +\providecommand{\TShkEmp}{\Theta} % +\providecommand{\tShkEmp}{\theta} % +\providecommand{\tShkEmp}{\theta} % \providecommand{\tranShkInd}{\theta} % New \providecommand{\TranShkAgg}{\Theta} % New -\providecommand{\TShk}{\Xi} % -\providecommand{\tShk}{\xi} % -\providecommand{\tshk}{\xi} % +\providecommand{\TShk}{\Xi} % +\providecommand{\tShk}{\xi} % +\providecommand{\tshk}{\xi} % \providecommand{\tSS}{\ensuremath{t}} \providecommand{\tThen}{\ensuremath{\tau}} \providecommand{\uFunc}{{\ensuremath{\mathrm{u}}}} @@ -546,8 +546,8 @@ \providecommand{\wBeg}{\kLev} % wealth as of the beginning of the period (before R is received, not including Y) \providecommand{\Wealth}{\ensuremath{O}} \providecommand{\wealth}{\ensuremath{o}} -\providecommand{\WEndRat}{\ARat} % -\providecommand{\wEndRat}{\aRat} % +\providecommand{\WEndRat}{\ARat} % +\providecommand{\wEndRat}{\aRat} % \providecommand{\WEnd}{\ALev} % Wealth as of the end of the period (after C has been chosen) \providecommand{\wEnd}{\aLev} % wealth as of the end of the period (after C has been taken) \providecommand{\Wend}{\ARat} % Wealth as of the end of the period (after C has been chosen) @@ -557,9 +557,9 @@ \providecommand{\WGro}{\ensuremath{\mathrm{G}}} \providecommand{\wGro}{\ensuremath{\mathsf{g}}} \providecommand{\whumMin}{\underline{\hRat}} % human wealth -- individual -\providecommand{\WHum}{\HLev} % Human wealth -- aggregate +\providecommand{\WHum}{\HLev} % Human wealth -- aggregate \providecommand{\wHum}{\hLev} % human wealth -- individual -\providecommand{\Whum}{\HRat} % Human wealth -- aggregate +\providecommand{\Whum}{\HRat} % Human wealth -- aggregate \providecommand{\whum}{\hRat} % human wealth -- individual \providecommand{\WLev}{\ensuremath{W}} \providecommand{\wLev}{\pmb{w}} @@ -571,15 +571,15 @@ \providecommand{\WMkt}{\MLev} % Wealth as of the middle of the period (after R is received, including Y) \providecommand{\wMkt}{\mLev} % wealth as of the middle of the period (after R is received, including Y) \providecommand{\wmkt}{\mLev} % wealth as of the middle of the period (after R is received, including Y) -\providecommand{\wNet}{\ensuremath{x}} % +\providecommand{\wNet}{\ensuremath{x}} % \providecommand{\WNet}{\ensuremath{X}} % Total wealth \providecommand{\WPre}{{K}} \providecommand{\wPre}{{k}} -\providecommand{\wRat}{\ensuremath{o}} % +\providecommand{\wRat}{\ensuremath{o}} % \providecommand{\WRat}{\ensuremath{O}} % Ratio to permanent income -\providecommand{\wTot}{\ensuremath{\mathbf{o}}} % +\providecommand{\wTot}{\ensuremath{\mathbf{o}}} % \providecommand{\WTot}{\ensuremath{\mathbf{O}}} % Total wealth -\providecommand{\wtot}{\ensuremath{o}} % +\providecommand{\wtot}{\ensuremath{o}} % \providecommand{\Wtot}{\ensuremath{O}} % Total wealth \providecommand{\xFer}{\chi} \providecommand{\XFer}{X} @@ -637,4 +637,3 @@ \renewcommand{\recm}{\item[\phantom{$^{*}$}]} \providecommand{\pd}[2]{\frac{\partial#1}{\partial#2}} - diff --git a/Documentation/texmf-local/web2c/texmf.cnf b/Documentation/texmf-local/web2c/texmf.cnf index 47388b406..41458805a 100644 --- a/Documentation/texmf-local/web2c/texmf.cnf +++ b/Documentation/texmf-local/web2c/texmf.cnf @@ -17,9 +17,9 @@ max_print_line = 255 TEXMFHOME = ~/.texmf % The default is for each user to have a separate location for the junk variables that are created on-the-fly; this can result in a hard-to-find pileup of junk across multiple users, so let's have a common location for all users: -TEXMFVAR = /usr/local/texlive/texmf-var +TEXMFVAR = /usr/local/texlive/texmf-var TEXMFCONFIG = /usr/local/texlive/texmf-config TEXMFLOCAL = /usr/local/texlive/texmf-local TEXMFMETHODS = /usr/local/texlive/texmf-local # Links should be created upon setup of TeXLive -TEXMF = {$TEXMFMETHODS,$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFMAIN,!!$TEXMFLOCAL,!!$TEXMFDIST} \ No newline at end of file +TEXMF = {$TEXMFMETHODS,$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFMAIN,!!$TEXMFLOCAL,!!$TEXMFDIST} diff --git a/HARK/Calibration/Income/IncomeTools.py b/HARK/Calibration/Income/IncomeTools.py index c95940c95..6163b2a6c 100644 --- a/HARK/Calibration/Income/IncomeTools.py +++ b/HARK/Calibration/Income/IncomeTools.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Sat Dec 19 15:08:54 2020 @@ -8,10 +7,10 @@ # %% Preamble import numpy as np -from HARK.interpolation import LinearInterp -from HARK.datasets.cpi.us.CPITools import cpi_deflator from HARK import _log +from HARK.datasets.cpi.us.CPITools import cpi_deflator +from HARK.interpolation import LinearInterp __all__ = [ "parse_time_params", @@ -113,7 +112,7 @@ def age_log_poly_to_growth_rates(coefs, age_min, age_max): def find_PermGroFacs(age_min, age_max, age_ret, AgePolyCoefs, ReplRate): - """ + r""" Finds initial income and sequence of growth factors from a polynomial specification of log-income, an optional retirement age and a replacement rate. @@ -147,13 +146,11 @@ def find_PermGroFacs(age_min, age_max, age_ret, AgePolyCoefs, ReplRate): """ if age_ret is None: - # If there is no retirement, the age polynomial applies for the whole # lifetime GroFacs, Y0 = age_log_poly_to_growth_rates(AgePolyCoefs, age_min, age_max) else: - # First find working age growth rates and starting income WrkGroFacs, Y0 = age_log_poly_to_growth_rates(AgePolyCoefs, age_min, age_ret) @@ -399,13 +396,11 @@ def sabelhaus_song_var_profile(age_min=27, age_max=54, cohort=None, smooth=True) # Determine which set of estimates to use based on wether a cohort is # provided or not. if cohort is None: - spec = Sabelhaus_Song_all_years cohort = 0 _log.debug("No cohort was provided. Using aggregate specification.") else: - spec = Sabelhaus_Song_cohort_trend # Extract coefficients @@ -416,7 +411,6 @@ def sabelhaus_song_var_profile(age_min=27, age_max=54, cohort=None, smooth=True) # Smooth out dummies using a 3rd degree polynomial if requested if smooth: - # Fit polynomials tran_poly = np.poly1d(np.polyfit(spec["Ages"], tran_age_dummies, deg=3)) perm_poly = np.poly1d(np.polyfit(spec["Ages"], perm_age_dummies, deg=3)) @@ -493,7 +487,7 @@ def parse_income_spec( SabelhausSong=False, adjust_infl_to=None, ): - """ + r""" A function that produces income growth rates and income shock volatilities Parameters @@ -578,15 +572,12 @@ def parse_income_spec( # Growth factors if AgePolyCoefs is not None: - if AgePolyRetir is None: - PermGroFac, P0 = find_PermGroFacs( age_min, age_max, age_ret, AgePolyCoefs, ReplRate ) else: - # Working period PermGroWrk, P0 = find_PermGroFacs( age_min, age_ret, None, AgePolyCoefs, ReplRate @@ -609,7 +600,6 @@ def parse_income_spec( # Apply the yearly trend if it is given if YearTrend is not None: - # Compute and apply the compounding yearly growth factor YearGroFac = np.exp(YearTrend["Coef"]) PermGroFac = [x * YearGroFac for x in PermGroFac] @@ -624,7 +614,6 @@ def parse_income_spec( income_params["PermGroFac"] = PermGroFac else: - # Placeholder for future ways of storing income calibrations raise NotImplementedError() @@ -636,9 +625,7 @@ def parse_income_spec( # IncomeDstn[3] would contain the distribution of income shocks that occur # at the start of age 4. if SabelhausSong: - if age_ret is None: - IncShkStds = sabelhaus_song_var_profile( cohort=1950, age_min=age_min + 1, age_max=age_max ) @@ -646,7 +633,6 @@ def parse_income_spec( TranShkStd = IncShkStds["TranShkStd"] else: - IncShkStds = sabelhaus_song_var_profile( cohort=1950, age_min=age_min + 1, age_max=age_ret ) @@ -654,16 +640,12 @@ def parse_income_spec( TranShkStd = IncShkStds["TranShkStd"] + [0.0] * (N_ret_periods + 1) else: - if isinstance(PermShkStd, float) and isinstance(TranShkStd, float): - if age_ret is None: - PermShkStd = [PermShkStd] * N_periods TranShkStd = [TranShkStd] * N_periods else: - PermShkStd = [PermShkStd] * (N_work_periods - 1) + [0.0] * ( N_ret_periods + 1 ) @@ -672,7 +654,6 @@ def parse_income_spec( ) else: - # Placeholder for future ways of specifying volatilities raise NotImplementedError() @@ -681,7 +662,6 @@ def parse_income_spec( # Apply inflation adjustment if requested if adjust_infl_to is not None: - # Deflate using the CPI september measurement, which is what the SCF # uses. defl = cpi_deflator( @@ -689,7 +669,6 @@ def parse_income_spec( )[0] else: - defl = 1 P0 = P0 * defl diff --git a/HARK/Calibration/Income/tests/test_IncomeTools.py b/HARK/Calibration/Income/tests/test_IncomeTools.py index baf672ee3..a8f6f5aff 100644 --- a/HARK/Calibration/Income/tests/test_IncomeTools.py +++ b/HARK/Calibration/Income/tests/test_IncomeTools.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Thu Jan 21 15:04:24 2021 @@ -7,19 +6,21 @@ # Bring in modules we need import unittest + import numpy as np + from HARK.Calibration.Income.IncomeTools import ( - sabelhaus_song_var_profile, - parse_income_spec, - find_profile, - CGM_income, Cagetti_income, + CGM_income, + find_profile, + parse_income_spec, + sabelhaus_song_var_profile, ) + # %% Mean income profile tests class test_income_paths(unittest.TestCase): def setUp(self): - # Assign a result from Cocco, Gomes, Maenhout self.cgm_hs_mean_p = np.array( [ @@ -180,7 +181,6 @@ def setUp(self): ) def test_CGM(self): - adjust_infl_to = 1992 age_min = 21 age_max = 100 @@ -193,7 +193,6 @@ def test_CGM(self): self.assertTrue(np.allclose(self.cgm_hs_mean_p, MeanP, atol=1e-03)) def test_Cagetti(self): - adjust_infl_to = 1992 age_min = 25 age_max = 91 @@ -214,7 +213,6 @@ def test_Cagetti(self): # %% Volatility profile tests class test_SabelhausSongProfiles(unittest.TestCase): def setUp(self): - # Write results from Figure 6 in the original paper self.Fig6Coh1940Tran = np.array( [ diff --git a/HARK/ConsumptionSaving/ConsIndShockModel.py b/HARK/ConsumptionSaving/ConsIndShockModel.py index 543351d38..ba9b67bee 100644 --- a/HARK/ConsumptionSaving/ConsIndShockModel.py +++ b/HARK/ConsumptionSaving/ConsIndShockModel.py @@ -278,9 +278,9 @@ def def_value_funcs(self): """ Defines the value and marginal value functions for this period. Uses the fact that for a perfect foresight CRRA utility problem, - if the MPC in period t is :math:`\kappa_{t}`, and relative risk + if the MPC in period t is :math:`\\kappa_{t}`, and relative risk aversion :math:`\rho`, then the inverse value vFuncNvrs has a - constant slope of :math:`\kappa_{t}^{-\rho/(1-\rho)}` and + constant slope of :math:`\\kappa_{t}^{-\rho/(1-\rho)}` and vFuncNvrs has value of zero at the lower bound of market resources mNrmMin. See PerfForesightConsumerType.ipynb documentation notebook for a brief explanation and the links below for a fuller treatment. @@ -3231,7 +3231,7 @@ def check_conditions(self, verbose=None): self.PermGroFac[0] * self.InvEx_PermShkInv ) # [url]/#PGroAdj - self.thorn = ((self.Rfree * self.DiscFac)) ** (1 / self.CRRA) + self.thorn = (self.Rfree * self.DiscFac) ** (1 / self.CRRA) # self.Ex_RNrm = self.Rfree*Ex_PermShkInv/(self.PermGroFac[0]*self.LivPrb[0]) self.GPFRaw = self.thorn / (self.PermGroFac[0]) # [url]/#GPF diff --git a/HARK/ConsumptionSaving/ConsIndShockModelFast.py b/HARK/ConsumptionSaving/ConsIndShockModelFast.py index 3eaae7c0a..f8e2d1e87 100644 --- a/HARK/ConsumptionSaving/ConsIndShockModelFast.py +++ b/HARK/ConsumptionSaving/ConsIndShockModelFast.py @@ -20,35 +20,33 @@ from numba import njit from quantecon.optimize import newton_secant -from HARK import make_one_period_oo_solver, MetricObject +from HARK import MetricObject, make_one_period_oo_solver from HARK.ConsumptionSaving.ConsIndShockModel import ( - ConsumerSolution, - ConsPerfForesightSolver, ConsIndShockSolverBasic, - PerfForesightConsumerType, + ConsPerfForesightSolver, + ConsumerSolution, IndShockConsumerType, + PerfForesightConsumerType, ) from HARK.interpolation import ( + CubicInterp, LinearInterp, LowerEnvelope, - CubicInterp, - ValueFuncCRRA, - MargValueFuncCRRA, MargMargValueFuncCRRA, + MargValueFuncCRRA, + ValueFuncCRRA, ) from HARK.numba_tools import ( CRRAutility, + CRRAutility_inv, + CRRAutility_invP, CRRAutilityP, - CRRAutilityPP, CRRAutilityP_inv, - CRRAutility_invP, - CRRAutility_inv, CRRAutilityP_invP, -) -from HARK.numba_tools import ( - linear_interp_fast, + CRRAutilityPP, cubic_interp_fast, linear_interp_deriv_fast, + linear_interp_fast, ) __all__ = [ @@ -1029,7 +1027,6 @@ def solve(self): ) if self.vFuncBool: - if self.CubicBool: self.cFuncNow, self.mNrmGrid = _cFuncCubic( self.aXtraGrid, @@ -1138,9 +1135,9 @@ def post_solve(self): """ Defines the value and marginal value functions for this period. Uses the fact that for a perfect foresight CRRA utility problem, - if the MPC in period t is :math:`\kappa_{t}`, and relative risk + if the MPC in period t is :math:`\\kappa_{t}`, and relative risk aversion :math:`\rho`, then the inverse value vFuncNvrs has a - constant slope of :math:`\kappa_{t}^{-\rho/(1-\rho)}` and + constant slope of :math:`\\kappa_{t}^{-\rho/(1-\rho)}` and vFuncNvrs has value of zero at the lower bound of market resources mNrmMin. See PerfForesightConsumerType.ipynb documentation notebook for a brief explanation and the links below for a fuller treatment. diff --git a/HARK/ConsumptionSaving/ConsPortfolioModel.py b/HARK/ConsumptionSaving/ConsPortfolioModel.py index 5ca58d9b1..d5b5b53b2 100644 --- a/HARK/ConsumptionSaving/ConsPortfolioModel.py +++ b/HARK/ConsumptionSaving/ConsPortfolioModel.py @@ -7,33 +7,46 @@ import numpy as np -from HARK import ( +from HARK import ( # Basic HARK features + AgentType, MetricObject, NullFunc, - AgentType, make_one_period_oo_solver, -) # Basic HARK features +) from HARK.ConsumptionSaving.ConsIndShockModel import ( IndShockConsumerType, # PortfolioConsumerType inherits from it - utility, # CRRA utility function +) +from HARK.ConsumptionSaving.ConsIndShockModel import ( + init_idiosyncratic_shocks, # Baseline dictionary to build on +) +from HARK.ConsumptionSaving.ConsIndShockModel import utility # CRRA utility function +from HARK.ConsumptionSaving.ConsIndShockModel import ( utility_inv, # Inverse CRRA utility function - utilityP, # CRRA marginal utility function +) +from HARK.ConsumptionSaving.ConsIndShockModel import ( utility_invP, # Derivative of inverse CRRA utility function +) +from HARK.ConsumptionSaving.ConsIndShockModel import ( + utilityP, # CRRA marginal utility function +) +from HARK.ConsumptionSaving.ConsIndShockModel import ( utilityP_inv, # Inverse CRRA marginal utility function - init_idiosyncratic_shocks, # Baseline dictionary to build on ) from HARK.ConsumptionSaving.ConsRiskyAssetModel import RiskyAssetConsumerType from HARK.distribution import calc_expectation +from HARK.interpolation import BilinearInterp # 2D interpolator from HARK.interpolation import ( - LinearInterp, # Piecewise linear interpolation - CubicInterp, # Piecewise cubic interpolation - LinearInterpOnInterp1D, # Interpolator over 1D interpolations - BilinearInterp, # 2D interpolator ConstantFunction, # Interpolator-like class that returns constant value +) +from HARK.interpolation import CubicInterp # Piecewise cubic interpolation +from HARK.interpolation import ( IdentityFunction, # Interpolator-like class that returns one of its arguments - ValueFuncCRRA, - MargValueFuncCRRA, ) +from HARK.interpolation import LinearInterp # Piecewise linear interpolation +from HARK.interpolation import ( + LinearInterpOnInterp1D, # Interpolator over 1D interpolations +) +from HARK.interpolation import MargValueFuncCRRA, ValueFuncCRRA # Define a class to represent the single period solution of the portfolio choice problem @@ -112,7 +125,6 @@ def __init__( EndOfPrddvds_fxd=None, AdjPrb=None, ): - # Change any missing function inputs to NullFunc if cFuncAdj is None: cFuncAdj = NullFunc() @@ -194,7 +206,6 @@ def pre_solve(self): self.update_solution_terminal() def update(self): - RiskyAssetConsumerType.update(self) self.update_ShareGrid() self.update_ShareLimit() @@ -611,7 +622,6 @@ def dvds_dist(shocks, b_nrm, Share_next): # Evaluate realizations of value and marginal value after asset returns are realized def EndOfPrddvda_dist(shock, a_nrm, Share_next): - # Calculate future realizations of bank balances bNrm Rxs = shock - self.Rfree Rport = self.Rfree + Share_next * Rxs @@ -623,7 +633,6 @@ def EndOfPrddvda_dist(shock, a_nrm, Share_next): return Rport * dvdbFunc_intermed(b_nrm_next, Share_next_rep) def EndOfPrddvds_dist(shock, a_nrm, Share_next): - # Calculate future realizations of bank balances bNrm Rxs = shock - self.Rfree Rport = self.Rfree + Share_next * Rxs @@ -813,7 +822,6 @@ def v_intermed_dist(shocks, b_nrm, Share_next): vFunc_intermed = ValueFuncCRRA(vNvrsFunc_intermed, self.CRRA) def EndOfPrdv_dist(shock, a_nrm, Share_next): - # Calculate future realizations of bank balances bNrm Rxs = shock - self.Rfree Rport = self.Rfree + Share_next * Rxs @@ -884,7 +892,6 @@ def make_vFunc(self): self.vFuncFxd_now = ValueFuncCRRA(vNvrsFuncFxd, self.CRRA) def make_porfolio_solution(self): - self.solution = PortfolioSolution( cFuncAdj=self.cFuncAdj_now, ShareFuncAdj=self.ShareFuncAdj_now, diff --git a/HARK/ConsumptionSaving/ConsRepAgentModel.py b/HARK/ConsumptionSaving/ConsRepAgentModel.py index 5327b8980..e0c9f8ca9 100644 --- a/HARK/ConsumptionSaving/ConsRepAgentModel.py +++ b/HARK/ConsumptionSaving/ConsRepAgentModel.py @@ -5,14 +5,15 @@ time invariant or exist on a short cycle; models must be infinite horizon. """ import numpy as np -from HARK.interpolation import LinearInterp, MargValueFuncCRRA -from HARK.distribution import MarkovProcess, Uniform + from HARK.ConsumptionSaving.ConsIndShockModel import ( - IndShockConsumerType, ConsumerSolution, + IndShockConsumerType, init_idiosyncratic_shocks, ) from HARK.ConsumptionSaving.ConsMarkovModel import MarkovConsumerType +from HARK.distribution import MarkovProcess, Uniform +from HARK.interpolation import LinearInterp, MargValueFuncCRRA __all__ = ["RepAgentConsumerType", "RepAgentMarkovConsumerType"] diff --git a/HARK/ConsumptionSaving/ConsRiskyContribModel.py b/HARK/ConsumptionSaving/ConsRiskyContribModel.py index a10f0837b..0e9d15b07 100644 --- a/HARK/ConsumptionSaving/ConsRiskyContribModel.py +++ b/HARK/ConsumptionSaving/ConsRiskyContribModel.py @@ -10,7 +10,7 @@ @software{mateo_velasquez_giraldo_2021_4977915, author = {Mateo Velásquez-Giraldo}, - title = {{Mv77/RiskyContrib: A Two-Asset Savings Model with + title = {{Mv77/RiskyContrib: A Two-Asset Savings Model with an Income-Contribution Scheme}}, month = jun, year = 2021, @@ -21,36 +21,38 @@ } """ -import numpy as np from copy import deepcopy + +import numpy as np + from HARK import MetricObject, NullFunc # Basic HARK features +from HARK.ConsumptionSaving.ConsIndShockModel import utility # CRRA utility function from HARK.ConsumptionSaving.ConsIndShockModel import ( - utility, # CRRA utility function utility_inv, # Inverse CRRA utility function +) +from HARK.ConsumptionSaving.ConsIndShockModel import ( utilityP, # CRRA marginal utility function +) +from HARK.ConsumptionSaving.ConsIndShockModel import ( utilityP_inv, # Inverse CRRA marginal utility function - init_lifecycle, ) - +from HARK.ConsumptionSaving.ConsIndShockModel import init_lifecycle from HARK.ConsumptionSaving.ConsRiskyAssetModel import ( RiskyAssetConsumerType, - risky_asset_parms, init_risky_asset, + risky_asset_parms, ) - from HARK.distribution import calc_expectation - +from HARK.interpolation import BilinearInterp # 2D interpolator from HARK.interpolation import ( - LinearInterp, # Piecewise linear interpolation - BilinearInterp, # 2D interpolator - TrilinearInterp, # 3D interpolator ConstantFunction, # Interpolator-like class that returns constant value +) +from HARK.interpolation import ( IdentityFunction, # Interpolator-like class that returns one of its arguments - ValueFuncCRRA, - MargValueFuncCRRA, - DiscreteInterp, ) - +from HARK.interpolation import LinearInterp # Piecewise linear interpolation +from HARK.interpolation import TrilinearInterp # 3D interpolator +from HARK.interpolation import DiscreteInterp, MargValueFuncCRRA, ValueFuncCRRA from HARK.utilities import make_grid_exp_mult @@ -92,7 +94,6 @@ class RiskyContribConsumerType(RiskyAssetConsumerType): shock_vars_ = RiskyAssetConsumerType.shock_vars_ def __init__(self, verbose=False, quiet=False, joint_dist_solver=False, **kwds): - params = init_risky_contrib.copy() params.update(kwds) kwds = params @@ -135,7 +136,6 @@ def pre_solve(self): self.update_solution_terminal() def update(self): - RiskyAssetConsumerType.update(self) self.update_share_grid() self.update_dfrac_grid() @@ -473,7 +473,6 @@ def get_controls_Reb(self): # Loop over each period of the cycle, getting controls separately depending on "age" for t in range(self.T_cycle): - # Find agents in this period-stage these = t == self.t_cycle @@ -511,7 +510,6 @@ def get_states_Sha(self): # Post-states are assets after rebalancing if not "tau" in self.time_vary: - mNrmTilde, nNrmTilde = rebalance_assets( self.controls["dfrac"], self.state_now["mNrm"], @@ -520,14 +518,12 @@ def get_states_Sha(self): ) else: - # Initialize mNrmTilde = np.zeros_like(self.state_now["mNrm"]) + np.nan nNrmTilde = np.zeros_like(self.state_now["mNrm"]) + np.nan # Loop over each period of the cycle, getting controls separately depending on "age" for t in range(self.T_cycle): - # Find agents in this period-stage these = t == self.t_cycle @@ -553,7 +549,6 @@ def get_controls_Sha(self): # Loop over each period of the cycle, getting controls separately depending on "age" for t in range(self.T_cycle): - # Find agents in this period-stage these = t == self.t_cycle @@ -600,7 +595,6 @@ def get_controls_Cns(self): # Loop over each period of the cycle, getting controls separately depending on "age" for t in range(self.T_cycle): - # Find agents in this period-stage these = t == self.t_cycle @@ -631,6 +625,7 @@ def get_post_states(self): # %% Classes for RiskyContrib type solution objects + # Class for asset adjustment stage solution class RiskyContribRebSolution(MetricObject): """ @@ -687,7 +682,6 @@ def __init__( dvdnFunc_Fxd=None, dvdsFunc_Fxd=None, ): - # Rebalancing stage if vFunc_Adj is None: vFunc_Adj = NullFunc() @@ -780,7 +774,6 @@ def __init__( dvdnFunc_Fxd=None, dvdsFunc_Fxd=None, ): - # Contribution stage, adjust if vFunc_Adj is None: vFunc_Adj = NullFunc() @@ -849,7 +842,6 @@ def __init__( dvdnFunc=None, dvdsFunc=None, ): - if vFunc is None: vFunc = NullFunc() if cFunc is None: @@ -888,7 +880,6 @@ class RiskyContribSolution(MetricObject): distance_criteria = ["stage_sols"] def __init__(self, Reb, Sha, Cns): - # Dictionary of stage solutions self.stage_sols = {"Reb": Reb, "Sha": Sha, "Cns": Cns} @@ -1016,6 +1007,7 @@ def n_nrm_next(shocks, nNrm, Share, PermGroFac): # %% RiskyContrib solvers + # Consumption stage solver def solve_RiskyContrib_Cns( solution_next, @@ -1129,7 +1121,6 @@ def solve_RiskyContrib_Cns( # Start by constructing functions for next-period's pre-adjustment-shock # expected value functions if AdjustPrb < 1.0: - dvdm_next = lambda m, n, s: AdjustPrb * dvdmFunc_Reb_Adj_next(m, n) + ( 1.0 - AdjustPrb ) * dvdmFunc_Reb_Fxd_next(m, n, s) @@ -1140,13 +1131,11 @@ def solve_RiskyContrib_Cns( # Value function if needed if vFuncBool: - v_next = lambda m, n, s: AdjustPrb * vFunc_Reb_Adj_next(m, n) + ( 1.0 - AdjustPrb ) * vFunc_Reb_Fxd_next(m, n, s) else: - dvdm_next = lambda m, n, s: dvdmFunc_Reb_Adj_next(m, n) dvdn_next = lambda m, n, s: dvdnFunc_Reb_Adj_next(m, n) dvds_next = ConstantFunction(0.0) @@ -1155,7 +1144,6 @@ def solve_RiskyContrib_Cns( v_next = lambda m, n, s: vFunc_Reb_Adj_next(m, n) if IndepDstnBool and not joint_dist_solver: - # If income and returns are independent we can use the law of iterated # expectations to speed up the computation of end-of-period derivatives @@ -1166,7 +1154,6 @@ def solve_RiskyContrib_Cns( # as functions of those and the contribution share def post_return_derivs(inc_shocks, b_aux, g_aux, s): - perm_shk = inc_shocks[0] tran_shk = inc_shocks[1] @@ -1232,7 +1219,6 @@ def post_return_derivs(inc_shocks, b_aux, g_aux, s): pr_dvds_func = TrilinearInterp(pr_derivs[2], b_aux_grid, g_aux_grid, ShareGrid) if vFuncBool: - pr_vFunc = ValueFuncCRRA( TrilinearInterp(uInv(pr_derivs[3]), b_aux_grid, g_aux_grid, ShareGrid), CRRA, @@ -1286,7 +1272,6 @@ def end_of_period_derivs(risky_ret, a, nTil, s): return np.stack([end_of_prd_dvda, end_of_prd_dvdn, end_of_prd_dvds]) else: - # If income and returns are not independent, we just integrate over # them jointly. @@ -1412,13 +1397,11 @@ def end_of_period_derivs(shocks, a, nTil, s): Share_N = ShareGrid.size for nInd in range(nNrm_N): for sInd in range(Share_N): - # Extract the endogenous m grid for particular (n,s). m_ns = mNrm_end[:, nInd, sInd] # Check if there is a natural constraint if m_ns[0] == 0.0: - # There's no need to insert points since we have m==0.0 # c @@ -1437,7 +1420,6 @@ def end_of_period_derivs(shocks, a, nTil, s): ) else: - # We know that: # -The lowest gridpoints of both a and n are 0. # -Consumption at m < m0 is m. @@ -1581,7 +1563,6 @@ def solve_RiskyContrib_Sha( vNvrsSha = vFunc_Cns_next.vFuncNvrs(mNrm_tiled, nNrm_tiled, opt_Share) else: - # Figure out optimal share by evaluating all alternatives at all # (m,n) combinations m_idx_tiled, n_idx_tiled = np.meshgrid( @@ -1593,7 +1574,6 @@ def solve_RiskyContrib_Sha( ) if DiscreteShareBool: - # Evaluate value function to optimize over shares. # Do it in inverse space vNvrs = vFunc_Cns_next.vFuncNvrs(mNrm_tiled, nNrm_tiled, Share_tiled) @@ -1610,7 +1590,6 @@ def solve_RiskyContrib_Sha( nNrm_tiled = nNrm_tiled[:, :, 0] else: - # Evaluate the marginal value of the contribution share at # every (m,n,s) gridpoint dvds = dvdsFunc_Cns_next(mNrm_tiled, nNrm_tiled, Share_tiled) diff --git a/HARK/ConsumptionSaving/TractableBufferStockModel.py b/HARK/ConsumptionSaving/TractableBufferStockModel.py index dd24566c4..ed2cb0af0 100644 --- a/HARK/ConsumptionSaving/TractableBufferStockModel.py +++ b/HARK/ConsumptionSaving/TractableBufferStockModel.py @@ -345,6 +345,7 @@ def pre_solve(self): ------- none """ + # Define utility functions def uPP(x): return utilityPP(x, rho=self.CRRA) diff --git a/HARK/ConsumptionSaving/tests/test_ConsLaborModel.py b/HARK/ConsumptionSaving/tests/test_ConsLaborModel.py index b7aedf1d7..5ab2efb6d 100644 --- a/HARK/ConsumptionSaving/tests/test_ConsLaborModel.py +++ b/HARK/ConsumptionSaving/tests/test_ConsLaborModel.py @@ -1,8 +1,9 @@ +import unittest + from HARK.ConsumptionSaving.ConsLaborModel import ( LaborIntMargConsumerType, init_labor_lifecycle, ) -import unittest class test_LaborIntMargConsumerType(unittest.TestCase): diff --git a/HARK/ConsumptionSaving/tests/test_ConsMarkovModel.py b/HARK/ConsumptionSaving/tests/test_ConsMarkovModel.py index 135f13108..b557f81ae 100644 --- a/HARK/ConsumptionSaving/tests/test_ConsMarkovModel.py +++ b/HARK/ConsumptionSaving/tests/test_ConsMarkovModel.py @@ -15,7 +15,6 @@ class test_ConsMarkovSolver(unittest.TestCase): def setUp(self): - # Define the Markov transition matrix for serially correlated unemployment unemp_length = 5 # Averange length of unemployment spell urate_good = 0.05 # Unemployment rate when economy is in good state @@ -195,7 +194,6 @@ def test_simulation(self): class test_make_EndOfPrdvFuncCond(unittest.TestCase): def main_test(self): - Markov_vFuncBool_example = MarkovConsumerType(**Markov_Dict) TranShkDstn_e = MeanOneLogNormal( diff --git a/HARK/ConsumptionSaving/tests/test_ConsMedModel.py b/HARK/ConsumptionSaving/tests/test_ConsMedModel.py index 702d99ccc..662a73dba 100644 --- a/HARK/ConsumptionSaving/tests/test_ConsMedModel.py +++ b/HARK/ConsumptionSaving/tests/test_ConsMedModel.py @@ -5,11 +5,9 @@ class testMedShockConsumerType(unittest.TestCase): def setUp(self): - self.agent = MedShockConsumerType() def test_solution(self): - self.agent.solve() self.agent.T_sim = 10 diff --git a/HARK/ConsumptionSaving/tests/test_ConsPrefShockModel.py b/HARK/ConsumptionSaving/tests/test_ConsPrefShockModel.py index 1884815c6..045bfa7cf 100644 --- a/HARK/ConsumptionSaving/tests/test_ConsPrefShockModel.py +++ b/HARK/ConsumptionSaving/tests/test_ConsPrefShockModel.py @@ -11,13 +11,11 @@ class testPrefShockConsumerType(unittest.TestCase): def setUp(self): - self.agent = PrefShockConsumerType() self.agent.cycles = 0 self.agent.solve() def test_solution(self): - self.assertEqual(self.agent.solution[0].mNrmMin, 0) m = np.linspace(self.agent.solution[0].mNrmMin, 5, 200) @@ -58,7 +56,6 @@ def test_simulation(self): class testKinkyPrefConsumerType(unittest.TestCase): def setUp(self): - self.agent = KinkyPrefConsumerType() self.agent.cycles = 0 # Infinite horizon self.agent.solve() diff --git a/HARK/ConsumptionSaving/tests/test_ConsRiskyContribModel.py b/HARK/ConsumptionSaving/tests/test_ConsRiskyContribModel.py index 043fa543f..e823e5733 100644 --- a/HARK/ConsumptionSaving/tests/test_ConsRiskyContribModel.py +++ b/HARK/ConsumptionSaving/tests/test_ConsRiskyContribModel.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Tue Jan 26 10:06:51 2021 @@ -19,7 +18,6 @@ class test_(unittest.TestCase): def setUp(self): - # A set of finite parameters self.par_finite = init_risky_contrib.copy() diff --git a/HARK/ConsumptionSaving/tests/test_IndShockConsumerType.py b/HARK/ConsumptionSaving/tests/test_IndShockConsumerType.py index 0a4a55aaf..92923bd1d 100644 --- a/HARK/ConsumptionSaving/tests/test_IndShockConsumerType.py +++ b/HARK/ConsumptionSaving/tests/test_IndShockConsumerType.py @@ -506,7 +506,6 @@ class testPerfMITShk(unittest.TestCase): def jacobian(self): class Test_agent(IndShockConsumerType): def __init__(self, cycles=0, **kwds): - IndShockConsumerType.__init__(self, cycles=0, **kwds) def get_Rfree(self): @@ -666,9 +665,8 @@ def transition(self): "pLvlInitStd": 0, # Standard deviation of log initial permanent income "PermGroFacAgg": 1.0, # Aggregate permanent income growth factor "T_age": None, # Age after which simulated agents are automatically killed - - #Parameters for Transition Matrix Simulation - "mMin": .001, + # Parameters for Transition Matrix Simulation + "mMin": 0.001, "mMax": 20, "mCount": 48, "mFac": 3, @@ -677,7 +675,6 @@ def transition(self): class test_Harmenbergs_method(unittest.TestCase): def test_Harmenberg_mtd(self): - example = IndShockConsumerType(**dict_harmenberg, verbose=0) example.cycles = 0 example.track_vars = ["aNrm", "mNrm", "cNrm", "pLvl", "aLvl"] @@ -822,7 +819,6 @@ def setUp(self): ) def test_compare_t_age_t_cycle(self): - # Make agent, shock and initial condition histories agent = IndShockConsumerType(**self.base_params) agent.make_shock_history() @@ -853,7 +849,6 @@ def test_compare_t_age_t_cycle(self): ) def test_compare_t_age_t_cycle_premature_death(self): - # Re-do the previous test in an instance where we prematurely # kill agents par = copy(self.base_params) @@ -877,16 +872,15 @@ def test_compare_t_age_t_cycle_premature_death(self): self.assertTrue(np.all(hist["t_age"] == hist["t_cycle"])) -#%% Test Transition Matrix Methods +# %% Test Transition Matrix Methods class test_Transition_Matrix_Methods(unittest.TestCase): def test_calc_tran_matrix(self): - example1 = IndShockConsumerType(**dict_harmenberg) example1.cycles = 0 example1.solve() - + example1.define_distribution_grid() p = example1.dist_pGrid # Grid of permanent income levels @@ -914,14 +908,13 @@ def test_calc_tran_matrix(self): self.assertAlmostEqual(AggC[0], 1.00417, places=4) -#%% Test Heterogenous Agent Jacobian Methods +# %% Test Heterogenous Agent Jacobian Methods class test_Jacobian_methods(unittest.TestCase): def test_calc_jacobian(self): - Agent = IndShockConsumerType(**dict_harmenberg) - + Agent.compute_steady_state() CJAC_Perm, AJAC_Perm = Agent.calc_jacobian("PermShkStd", 50) diff --git a/HARK/ConsumptionSaving/tests/test_KinkedRconsumerType.py b/HARK/ConsumptionSaving/tests/test_KinkedRconsumerType.py index bc0ebbf28..c53d0e19a 100644 --- a/HARK/ConsumptionSaving/tests/test_KinkedRconsumerType.py +++ b/HARK/ConsumptionSaving/tests/test_KinkedRconsumerType.py @@ -6,7 +6,6 @@ class testKinkedRConsumerType(unittest.TestCase): def test_liquidity_constraint(self): - KinkyExample = KinkedRconsumerType() KinkyExample.cycles = 0 diff --git a/HARK/ConsumptionSaving/tests/test_PerfForesightConsumerType.py b/HARK/ConsumptionSaving/tests/test_PerfForesightConsumerType.py index 9201370a2..2f37ae64c 100644 --- a/HARK/ConsumptionSaving/tests/test_PerfForesightConsumerType.py +++ b/HARK/ConsumptionSaving/tests/test_PerfForesightConsumerType.py @@ -50,7 +50,6 @@ def test_check_conditions(self): self.assertTrue(self.agent_infinite.conditions["FHWC"]) def test_simulation(self): - self.agent_infinite.solve() # Create parameter values necessary for simulation @@ -109,7 +108,6 @@ def test_simulation(self): # ) def test_stable_points(self): - # Solve the constrained agent. Stable points exists only with a # borrowing constraint. constrained_agent = PerfForesightConsumerType(cycles=0, BoroCnstArt=0.0) diff --git a/HARK/ConsumptionSaving/tests/test_PerfForesightFastConsumerType.py b/HARK/ConsumptionSaving/tests/test_PerfForesightFastConsumerType.py index 13d4b640e..4d249232c 100644 --- a/HARK/ConsumptionSaving/tests/test_PerfForesightFastConsumerType.py +++ b/HARK/ConsumptionSaving/tests/test_PerfForesightFastConsumerType.py @@ -1,5 +1,5 @@ -from HARK.ConsumptionSaving.ConsIndShockModelFast import PerfForesightConsumerTypeFast from HARK.ConsumptionSaving.ConsIndShockModel import PerfForesightConsumerType +from HARK.ConsumptionSaving.ConsIndShockModelFast import PerfForesightConsumerTypeFast from HARK.ConsumptionSaving.tests.test_PerfForesightConsumerType import ( testPerfForesightConsumerType, ) diff --git a/HARK/ConsumptionSaving/tests/test_SmallOpenEconomy.py b/HARK/ConsumptionSaving/tests/test_SmallOpenEconomy.py index 9b4ca9d78..f27ca7471 100644 --- a/HARK/ConsumptionSaving/tests/test_SmallOpenEconomy.py +++ b/HARK/ConsumptionSaving/tests/test_SmallOpenEconomy.py @@ -1,4 +1,8 @@ import copy +import unittest + +import numpy as np + from HARK import distribute_params from HARK.ConsumptionSaving.ConsAggShockModel import ( AggShockConsumerType, @@ -6,8 +10,6 @@ init_cobb_douglas, ) from HARK.distribution import Uniform -import numpy as np -import unittest class testSmallOpenEconomy(unittest.TestCase): diff --git a/HARK/ConsumptionSaving/tests/test_TractableBufferStockModel.py b/HARK/ConsumptionSaving/tests/test_TractableBufferStockModel.py index 9a9f739e9..cf9e6ead4 100644 --- a/HARK/ConsumptionSaving/tests/test_TractableBufferStockModel.py +++ b/HARK/ConsumptionSaving/tests/test_TractableBufferStockModel.py @@ -1,6 +1,7 @@ -from HARK.ConsumptionSaving.TractableBufferStockModel import TractableConsumerType import unittest +from HARK.ConsumptionSaving.TractableBufferStockModel import TractableConsumerType + class testTractableBufferStock(unittest.TestCase): def setUp(self): @@ -10,7 +11,6 @@ def setUp(self): self.tct.solve() def test_simulation(self): - self.tct.T_sim = 30 # Number of periods to simulate self.tct.AgentCount = 10 # Number of agents to simulate self.tct.aLvlInitMean = 0.0 # Mean of log initial assets for new agents diff --git a/HARK/ConsumptionSaving/tests/test_modelInits.py b/HARK/ConsumptionSaving/tests/test_modelInits.py index 4327d20dd..032f40da5 100644 --- a/HARK/ConsumptionSaving/tests/test_modelInits.py +++ b/HARK/ConsumptionSaving/tests/test_modelInits.py @@ -5,17 +5,20 @@ # Bring in modules we need import unittest +from copy import copy + import numpy as np -from HARK.ConsumptionSaving.ConsIndShockModel import PerfForesightConsumerType -from HARK.ConsumptionSaving.ConsIndShockModel import KinkedRconsumerType, init_kinked_R + from HARK.ConsumptionSaving.ConsIndShockModel import ( IndShockConsumerType, + KinkedRconsumerType, + PerfForesightConsumerType, init_idiosyncratic_shocks, + init_kinked_R, init_lifecycle, ) from HARK.ConsumptionSaving.ConsMarkovModel import MarkovConsumerType -from HARK.utilities import plot_funcs_der, plot_funcs -from copy import copy +from HARK.utilities import plot_funcs, plot_funcs_der class testInitialization(unittest.TestCase): diff --git a/HARK/core.py b/HARK/core.py index 67815d8bb..b15a99425 100644 --- a/HARK/core.py +++ b/HARK/core.py @@ -61,12 +61,10 @@ def distance_metric(thing_a, thing_b): distance = float(abs(len_a - len_b)) # If both inputs are dictionaries, call distance on the list of its elements elif type_a is dict and type_b is dict: - len_a = len(thing_a) len_b = len(thing_b) if len_a == len_b: - # Create versions sorted by key sorted_a = dict(sorted(thing_a.items())) sorted_b = dict(sorted(thing_b.items())) @@ -114,7 +112,7 @@ def distance_metric(thing_a, thing_b): return distance -class MetricObject(object): +class MetricObject: """ A superclass for object classes in HARK. Comes with two useful methods: a generic/universal distance method and an attribute assignment method. @@ -152,7 +150,7 @@ def distance(self, other): return max(distance_list) -class Model(object): +class Model: """ A class with special handling of parameters assignment. """ @@ -202,7 +200,6 @@ def __init__(self): self.parameters = {} def __str__(self): - type_ = type(self) module = type_.__module__ qualname = type_.__qualname__ @@ -529,12 +526,9 @@ def initialize_sim(self): # If we are asked to use existing shocks and a set of initial conditions # exist, use them if self.read_shocks and bool(self.newborn_init_history): - for var_name in self.state_now: - # Check that we are actually given a value for the variable if var_name in self.newborn_init_history.keys(): - # Copy only array-like idiosyncratic states. Aggregates should # not be set by newborns idio = ( @@ -547,7 +541,6 @@ def initialize_sim(self): ] else: - warn( "The option for reading shocks was activated but " + "the model requires state " @@ -663,7 +656,6 @@ def make_shock_history(self): # Make and store the history of shocks for each period for t in range(self.T_sim): - # Deaths self.get_mortality() self.shock_history["who_dies"][t, :] = self.who_dies @@ -717,12 +709,10 @@ def get_mortality(self): None """ if self.read_shocks: - who_dies = self.shock_history["who_dies"][self.t_sim, :] # Instead of simulating births, assign the saved newborn initial conditions if np.sum(who_dies) > 0: for var_name in self.state_now: - if var_name in self.newborn_init_history.keys(): # Copy only array-like idiosyncratic states. Aggregates should # not be set by newborns @@ -731,7 +721,6 @@ def get_mortality(self): and len(self.state_now[var_name]) == self.AgentCount ) if idio: - self.state_now[var_name][ who_dies ] = self.newborn_init_history[var_name][ @@ -739,7 +728,6 @@ def get_mortality(self): ] else: - warn( "The option for reading shocks was activated but " + "the model requires state " @@ -1254,16 +1242,16 @@ def __init__( self.agents = agents if agents is not None else list() # NOQA reap_vars = reap_vars if reap_vars is not None else list() # NOQA - self.reap_state = dict([(var, []) for var in reap_vars]) + self.reap_state = {var: [] for var in reap_vars} self.sow_vars = sow_vars if sow_vars is not None else list() # NOQA # dictionaries for tracking initial and current values # of the sow variables. - self.sow_init = dict([(var, None) for var in self.sow_vars]) - self.sow_state = dict([(var, None) for var in self.sow_vars]) + self.sow_init = {var: None for var in self.sow_vars} + self.sow_state = {var: None for var in self.sow_vars} const_vars = const_vars if const_vars is not None else list() # NOQA - self.const_vars = dict([(var, None) for var in const_vars]) + self.const_vars = {var: None for var in const_vars} self.track_vars = track_vars if track_vars is not None else list() # NOQA self.dyn_vars = dyn_vars if dyn_vars is not None else list() # NOQA diff --git a/HARK/datasets/SCF/WealthIncomeDist/README.md b/HARK/datasets/SCF/WealthIncomeDist/README.md index 8aa3619f9..3cdfff717 100644 --- a/HARK/datasets/SCF/WealthIncomeDist/README.md +++ b/HARK/datasets/SCF/WealthIncomeDist/README.md @@ -13,20 +13,22 @@ Both the file and this description come from the repository This is a table with summary statistics from the SCF. The file has the following columns, described by groups: + - Demographic and sample-defining variables: these variables describe the sample on which the summary statistics were computed on. Their values should be read as filters applied to the SCF's population before computing the summary statistics. + - `Educ`: education level. It can take the levels `NoHS` for individuals without a high-school diploma, `HS` for individuals with a high-school diploma but no college degree, and `College` for individuals with a college degree. `All` marks rows in which individuals from all educational attainment levels were used. - `Age_grp`: age group. I split the sample in 5-year brackets according to their age and this variable indicates which bracket the statistics correspond to. Note that the left - extreme of brackets is not included, so `(20,25]` corresponds to ages `{21,22,23,24,25}`. `All` marks rows in which all age groups were used. + extreme of brackets is not included, so `(20,25]` corresponds to ages `{21,22,23,24,25}`. `All` marks rows in which all age groups were used. - `YEAR`: survey wave of the SCF. It indicates which waves of the SCF were used in calculating the row's statistics. `All` marks rows in which all waves were pooled. **NOTE:** - when combining multiple waves, I do not re-weight observations: I continue to use the weight variable as if all observations came from the same wave. + when combining multiple waves, I do not re-weight observations: I continue to use the weight variable as if all observations came from the same wave. - - Summary statistics: - - `lnPermIncome.mean` and `lnPermIncome.sd`: survey-weighted mean and standard deviation of the natural logarithm of "permanent income", as measured by the variable `norminc` - in the SCF's summary files. Note that this measure contains, among others, capital gains and pension-fund withdrawals and might therefore substantially differ from the - popular concept of the "permanent component" of labor income, especially at older ages - (see [the SCF's website for exact definitions](https://www.federalreserve.gov/econres/scfindex.htm)). +- Summary statistics: +- `lnPermIncome.mean` and `lnPermIncome.sd`: survey-weighted mean and standard deviation of the natural logarithm of "permanent income", as measured by the variable `norminc` + in the SCF's summary files. Note that this measure contains, among others, capital gains and pension-fund withdrawals and might therefore substantially differ from the + popular concept of the "permanent component" of labor income, especially at older ages + (see [the SCF's website for exact definitions](https://www.federalreserve.gov/econres/scfindex.htm)). # SCFDistTools.py diff --git a/HARK/datasets/SCF/WealthIncomeDist/SCFDistTools.py b/HARK/datasets/SCF/WealthIncomeDist/SCFDistTools.py index d72c4e190..6c0ae76d2 100644 --- a/HARK/datasets/SCF/WealthIncomeDist/SCFDistTools.py +++ b/HARK/datasets/SCF/WealthIncomeDist/SCFDistTools.py @@ -1,15 +1,16 @@ -# -*- coding: utf-8 -*- """ Created on Fri Jan 8 15:36:14 2021 @author: Mateo """ +import os + import numpy as np import pandas as pd -from HARK.datasets.cpi.us.CPITools import cpi_deflator -import os + from HARK import _log +from HARK.datasets.cpi.us.CPITools import cpi_deflator scf_sumstats_dir = os.path.dirname(os.path.abspath(__file__)) @@ -71,7 +72,6 @@ def parse_scf_distr_stats(age=None, education=None, wave=None): # Pre-process year to make it a five-year bracket as in the table if age is not None: - u_bound = int(np.ceil(age / 5) * 5) l_bound = u_bound - 5 age_bracket = "(" + str(l_bound) + "," + str(u_bound) + "]" @@ -79,13 +79,11 @@ def parse_scf_distr_stats(age=None, education=None, wave=None): _log.debug("Returning SCF summary statistics for ages " + age_bracket + ".") else: - # If no age is given, use all age brackets. age_bracket = "All" # Check whether education is in one of the allowed categories if education is not None: - message = ( "If an education level is provided, it must be one of " + "'NoHS', 'HS', or 'College'." @@ -93,7 +91,6 @@ def parse_scf_distr_stats(age=None, education=None, wave=None): assert education in ["NoHS", "HS", "College"], message else: - education = "All" # Parse the wave @@ -112,11 +109,9 @@ def parse_scf_distr_stats(age=None, education=None, wave=None): # Try to access the requested combination try: - row = table.loc[(education, wave_str, age_bracket)] except KeyError as e: - message = ( "The summary statistics do not contain the " + "Age/Wave/Education combination that was requested." diff --git a/HARK/datasets/cpi/us/CPITools.py b/HARK/datasets/cpi/us/CPITools.py index 86c9dff93..a90e6c55d 100644 --- a/HARK/datasets/cpi/us/CPITools.py +++ b/HARK/datasets/cpi/us/CPITools.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Wed Jan 20 18:07:41 2021 @@ -7,8 +6,9 @@ import os import urllib.request -import pandas as pd + import numpy as np +import pandas as pd from HARK import _log @@ -88,7 +88,6 @@ def cpi_deflator(from_year, to_year, base_month=None): # Check month is conforming if base_month is not None: - months = [ "JAN", "FEB", @@ -119,13 +118,11 @@ def cpi_deflator(from_year, to_year, base_month=None): cpi_series = cpi[[column]].dropna() try: - deflator = np.divide( cpi_series.loc[to_year].to_numpy(), cpi_series.loc[from_year].to_numpy() ) except KeyError as e: - message = ( "Could not find a CPI value for the requested " + "year-month combinations." ) diff --git a/HARK/datasets/cpi/us/README.md b/HARK/datasets/cpi/us/README.md index 9be324894..79d0dbeec 100644 --- a/HARK/datasets/cpi/us/README.md +++ b/HARK/datasets/cpi/us/README.md @@ -17,6 +17,7 @@ additional column labeled `AVG` which corresponds to the average of CPI measurem ## Tools `CPITools.py` contains functions to: + - Download the latest series file from the BLS to the working directory. - Read and format the CPI series as a Pandas DataFrame. - Produce CPI deflators using the series for any given pair of years (between 1977 and 2019) and taking any month as base. diff --git a/HARK/datasets/data/EducMortAdj.txt b/HARK/datasets/data/EducMortAdj.txt index df8c3c9c5..172fd52a6 100644 --- a/HARK/datasets/data/EducMortAdj.txt +++ b/HARK/datasets/data/EducMortAdj.txt @@ -73,4 +73,4 @@ 97 0.946537 1.049985 1.064264 0.779154 0.767676 0.986801 98 0.942108 1.055461 1.076390 0.762723 0.756685 0.996955 99 0.939474 1.062435 1.089863 0.748476 0.747586 1.008572 -100 0.939091 1.071408 1.105174 0.736714 0.740721 1.022134 \ No newline at end of file +100 0.939091 1.071408 1.105174 0.736714 0.740721 1.022134 diff --git a/HARK/datasets/data/USactuarial.txt b/HARK/datasets/data/USactuarial.txt index bc2353b58..ebae82b4d 100644 --- a/HARK/datasets/data/USactuarial.txt +++ b/HARK/datasets/data/USactuarial.txt @@ -117,4 +117,4 @@ 116 0.772225 0 0.78 0.760720 0 0.79 117 0.810837 0 0.72 0.806363 0 0.73 118 0.851378 0 0.67 0.851378 0 0.67 -119 0.893947 0 0.61 0.893947 0 0.61 \ No newline at end of file +119 0.893947 0 0.61 0.893947 0 0.61 diff --git a/HARK/datasets/life_tables/us_ssa/README.md b/HARK/datasets/life_tables/us_ssa/README.md index 2bf45bd38..190ec4eab 100644 --- a/HARK/datasets/life_tables/us_ssa/README.md +++ b/HARK/datasets/life_tables/us_ssa/README.md @@ -14,12 +14,14 @@ on January 7, 2021. ## Format There are four `.csv` files: + - `PerLifeTables_F_Hist_TR2020.csv` contains historical (1900-2017) information for females. - `PerLifeTables_F_Alt2_TR2020.csv` contains projected (2018-2095) information for females. - `PerLifeTables_M_Hist_TR2020.csv` contains historical (1900-2017) information for males. - `PerLifeTables_M_Alt2_TR2020.csv` contains projected (2018-2095) information for males. All the tables have the same format. There are three columns of interest for our purposes: + - `Year`. - `x`: age. - `q(x)`: probability of death. diff --git a/HARK/datasets/life_tables/us_ssa/SSATools.py b/HARK/datasets/life_tables/us_ssa/SSATools.py index d77503312..baf530161 100644 --- a/HARK/datasets/life_tables/us_ssa/SSATools.py +++ b/HARK/datasets/life_tables/us_ssa/SSATools.py @@ -1,14 +1,15 @@ -# -*- coding: utf-8 -*- """ Created on Fri Jan 8 15:36:14 2021 @author: Mateo """ +import os + import numpy as np import pandas as pd + from HARK import _log -import os ssa_tables_dir = os.path.dirname(os.path.abspath(__file__)) @@ -30,7 +31,6 @@ def get_ssa_life_tables(): dsets = [] for sex in ["M", "F"]: for method in ["Historical", "Projected"]: - # Construct file name infix = "Hist" if method == "Historical" else "Alt2" filename = os.path.join( @@ -107,7 +107,6 @@ def parse_ssa_life_table( ages = np.arange(min_age, max_age + 1) if cross_sec: - if year is None: raise ( TypeError( @@ -119,7 +118,6 @@ def parse_ssa_life_table( years = np.repeat(year, ages.shape) else: - if cohort is None: raise ( TypeError( @@ -161,7 +159,7 @@ def parse_ssa_life_table( # Warn the user if projections are used. if max(years) > max_hist: - message = "Survival probabilities beyond {} are projections.".format(max_hist) + message = f"Survival probabilities beyond {max_hist} are projections." _log.debug(message) # Concatenate them @@ -174,11 +172,9 @@ def parse_ssa_life_table( + "age-year combinations." ) try: - DeathPrb = tab.loc[zip(years, ages)].sort_values(by="x") except KeyError as e: - raise Exception(message).with_traceback(e.__traceback__) # Transform to numpy survival probabilities diff --git a/HARK/datasets/load_data.py b/HARK/datasets/load_data.py index 8ea073e1c..27a9712f4 100644 --- a/HARK/datasets/load_data.py +++ b/HARK/datasets/load_data.py @@ -1,7 +1,8 @@ import csv -import numpy as np -from copy import deepcopy import os +from copy import deepcopy + +import numpy as np DATASETS = os.path.dirname(os.path.abspath(__file__)) + "/data/" @@ -13,7 +14,7 @@ def load_SCF_wealth_weights(): ------- SCF_wealth, SCF_weights: np.ndarray, np.ndarray """ - with open(DATASETS + "SCFwealthDataReduced.txt", "r") as f: + with open(DATASETS + "SCFwealthDataReduced.txt") as f: SCF_reader = csv.reader(f, delimiter="\t") SCF_raw = list(SCF_reader) SCF_wealth = np.zeros(len(SCF_raw)) + np.nan diff --git a/HARK/datasets/tests/test_load_data.py b/HARK/datasets/tests/test_load_data.py index 7ce2e445d..a2bdb9383 100644 --- a/HARK/datasets/tests/test_load_data.py +++ b/HARK/datasets/tests/test_load_data.py @@ -1,4 +1,5 @@ import unittest + from HARK.datasets import load_SCF_wealth_weights from HARK.datasets.cpi.us.CPITools import cpi_deflator from HARK.datasets.SCF.WealthIncomeDist.SCFDistTools import income_wealth_dists_from_scf @@ -16,7 +17,6 @@ def test_shape(self): # %% US CPI tests class test_cpi_deflators(unittest.TestCase): def test_month_deflators(self): - # Same year test defl_same_year = cpi_deflator(2000, 2000, "SEP") self.assertEqual(defl_same_year[0], 1.0) @@ -26,7 +26,6 @@ def test_month_deflators(self): self.assertAlmostEqual(defl_diff_year[0], 1.57279534) def test_avg_deflators(self): - # Same year test defl_same_year = cpi_deflator(2000, 2000) self.assertEqual(defl_same_year[0], 1.0) @@ -42,7 +41,6 @@ def setUp(self): self.BaseYear = 1992 def test_at_21(self): - # Get stats for various groups and test them NoHS = income_wealth_dists_from_scf( self.BaseYear, age=21, education="NoHS", wave=1995 @@ -69,7 +67,6 @@ def test_at_21(self): self.assertAlmostEqual(Coll["pLvlInitStd"], 0.746362502979793) def test_at_60(self): - # Get stats for various groups and test them NoHS = income_wealth_dists_from_scf( self.BaseYear, age=60, education="NoHS", wave=1995 diff --git a/HARK/dcegm.py b/HARK/dcegm.py index 4818b1abe..131f96c35 100644 --- a/HARK/dcegm.py +++ b/HARK/dcegm.py @@ -105,13 +105,11 @@ def calc_cross_points(x_grid, cond_ys, opt_idx): # If no changes, return empty arrays if len(idx_change) == 0: - points = np.zeros((0, 2), dtype=np.float64) segments = np.zeros((0, 2), dtype=np.int64) return points, segments else: - # To find the crossing points we need the extremes of the intervals in # which they happen, and the two candidate segments evaluated in both # extremes. switch_interv[0] has the left points and switch_interv[1] @@ -128,7 +126,6 @@ def calc_cross_points(x_grid, cond_ys, opt_idx): right_y = np.zeros_like(segments, dtype=np.float64) for i, idx in enumerate(idx_change): - left_y[i, 0] = cond_ys[segments[i, 0], idx] left_y[i, 1] = cond_ys[segments[i, 1], idx] @@ -144,14 +141,12 @@ def calc_cross_points(x_grid, cond_ys, opt_idx): ) if not np.any(valid): - # If there are no valid crossings, return empty arrays. points = np.zeros((0, 2), dtype=np.float64) segments = np.zeros((0, 2), dtype=np.int64) return points, segments else: - # Otherwise, subset valid crossings segments = segments[valid, :] switch_interv = switch_interv[valid, :] @@ -247,7 +242,6 @@ def upper_envelope(segments, calc_crossings=True): # Interpolate all segments on every x point, without extrapolating. y_cond = np.zeros((n_seg, len(x))) for i in range(n_seg): - if len(segments[i][0]) == 1: # If the segment is a single point, we can only know its value # at the observed point. @@ -268,11 +262,9 @@ def upper_envelope(segments, calc_crossings=True): # Get crossing points if needed if calc_crossings: - xing_points, xing_lines = calc_cross_points(x, y_cond, env_inds) if len(xing_points) > 0: - # Extract x and y coordinates xing_x = np.array([p[0] for p in xing_points]) xing_y = np.array([p[1] for p in xing_points]) diff --git a/HARK/distribution.py b/HARK/distribution.py index 0eb7a552c..37be02226 100644 --- a/HARK/distribution.py +++ b/HARK/distribution.py @@ -334,7 +334,7 @@ def __new__( # If sigma is zero, return a DiscreteDistribution with a single atom return DiscreteDistribution([1.0], [np.exp(mu)], seed=seed) - return super(Lognormal, cls).__new__(cls) + return super().__new__(cls) def __init__( self, @@ -795,7 +795,6 @@ def __init__( seed: int = 0, limit: Optional[Dict[str, Any]] = None, ) -> None: - super().__init__(seed=seed) self.pmv = np.asarray(pmv) @@ -1031,7 +1030,6 @@ def __init__( var_names: Optional[List[str]] = None, var_attrs: Optional[List[Optional[Dict[str, Any]]]] = None, ): - super().__init__(pmv, atoms, seed=seed, limit=limit) # vector-value distributions @@ -1087,7 +1085,6 @@ def from_unlabeled( var_names=None, var_attrs=None, ): - ldd = cls( dist.pmv, dist.atoms, @@ -1103,7 +1100,6 @@ def from_unlabeled( @classmethod def from_dataset(cls, x_obj, pmf): - ldd = cls.__new__(cls) if isinstance(x_obj, xr.Dataset): @@ -1282,7 +1278,6 @@ class (such as Bernoulli, LogNormal, etc.) with information engine = None def __init__(self, engine, conditional, RNG=None, seed=0): - if RNG is None: # Set up the RNG super().__init__(seed) @@ -1312,7 +1307,6 @@ def __init__(self, engine, conditional, RNG=None, seed=0): ) elif type(item0) is float: - self.dstns = [ self.engine(seed=self._rng.integers(0, 2**31 - 1), **conditional) ] @@ -1325,7 +1319,6 @@ def __init__(self, engine, conditional, RNG=None, seed=0): ) def __getitem__(self, y): - return self.dstns[y] def discretize(self, N, **kwds): @@ -1792,7 +1785,6 @@ def combine_indep_dstns(*distributions, seed=0): dist_is_labeled = () var_labels = () for dist in distributions: - if len(dist.dim()) > 1: raise NotImplementedError( "We currently only support combining vector-valued distributions." diff --git a/HARK/econforgeinterp.py b/HARK/econforgeinterp.py index f3bf264ae..06410b268 100644 --- a/HARK/econforgeinterp.py +++ b/HARK/econforgeinterp.py @@ -1,9 +1,10 @@ -from HARK.core import MetricObject -from interpolation.splines import eval_linear, eval_spline, CGrid -from interpolation.splines import extrap_options as xto +from copy import copy import numpy as np -from copy import copy +from interpolation.splines import CGrid, eval_linear, eval_spline +from interpolation.splines import extrap_options as xto + +from HARK.core import MetricObject extrap_opts = { "linear": xto.LINEAR, @@ -259,9 +260,7 @@ def __call__(self, *args): # Get indices, points, and closest in-grid point to points that # require extrapolation. upper_ex_inds = np.any(col_args > self.upper_limits[None, :], axis=1) - upper_ex_points = col_args[ - upper_ex_inds, - ] + upper_ex_points = col_args[upper_ex_inds,] upper_ex_nearest = np.minimum(upper_ex_points, self.upper_limits[None, :]) # Find function evaluations with regular extrapolation diff --git a/HARK/estimation.py b/HARK/estimation.py index 6c3117091..dd58fc342 100644 --- a/HARK/estimation.py +++ b/HARK/estimation.py @@ -193,11 +193,7 @@ def bootstrap_sample_from_data(data, weights=None, seed=0): indices = np.searchsorted(cutoffs, RNG.uniform(size=N)) # Create a bootstrapped sample - new_data = deepcopy( - data[ - indices, - ] - ) + new_data = deepcopy(data[indices,]) return new_data @@ -542,7 +538,7 @@ def load_nelder_mead_data(name): The cumulative number of function evaluations in the search process. """ # Open the Nelder-Mead progress file - with open(name + ".txt", "r") as f: + with open(name + ".txt") as f: my_reader = csv.reader(f, delimiter=",") # Get the shape of the simplex and initialize it diff --git a/HARK/frame.py b/HARK/frame.py index f17675deb..10613dba2 100644 --- a/HARK/frame.py +++ b/HARK/frame.py @@ -1,14 +1,15 @@ -from collections import OrderedDict import copy -from sre_constants import SRE_FLAG_ASCII -from HARK import AgentType, Model -from HARK.distribution import Distribution, TimeVaryingDiscreteDistribution import itertools +from collections import OrderedDict +from sre_constants import SRE_FLAG_ASCII import matplotlib.pyplot as plt import networkx as nx import numpy as np +from HARK import AgentType, Model +from HARK.distribution import Distribution, TimeVaryingDiscreteDistribution + class Frame: """ @@ -108,18 +109,16 @@ def add_suffix(self, suffix: str): This is used when copying or repreating frames. """ - self.target = tuple((var + suffix for var in self.target)) + self.target = tuple(var + suffix for var in self.target) self.scope = tuple( - ( - var - if any( - var in pa and isinstance(self.parents[pa], BackwardFrameReference) - for pa in self.parents - ) - else var + suffix - for var in self.scope + var + if any( + var in pa and isinstance(self.parents[pa], BackwardFrameReference) + for pa in self.parents ) + else var + suffix + for var in self.scope ) def add_backwards_suffix(self, suffix: str): @@ -128,15 +127,13 @@ def add_backwards_suffix(self, suffix: str): include an additional suffix. """ self.scope = tuple( - ( - var + suffix - if any( - var in pa and isinstance(self.parents[pa], BackwardFrameReference) - for pa in self.parents - ) - else var - for var in self.scope + var + suffix + if any( + var in pa and isinstance(self.parents[pa], BackwardFrameReference) + for pa in self.parents ) + else var + for var in self.scope ) @@ -299,12 +296,10 @@ def __init__(self, frames, parameters, infinite=True): frame.clear_relations() for frame_target in self.frames: - frame = self.frames[frame_target] if frame.scope is not None: for var in frame.scope: - ## Should replace this with a new data structure that allows for multiple keys into the same frame scope_frames = [ self.frames[frame_target] @@ -324,7 +319,6 @@ def __init__(self, frames, parameters, infinite=True): if scope_frame not in frame.parents: frame.parents[scope_frame.target] = scope_frame else: - ## Do I need to keep backward references even in a finite model, because these ## are initial conditions? bfr = BackwardFrameReference(frame) @@ -367,7 +361,6 @@ def prepend(self, model, suffix="_0"): frames = list(copy.deepcopy(self.frames).values()) for frame in frames: - frame.add_backwards_suffix(suffix) return FrameModel(pre_frames + frames, self.parameters, infinite=self.infinite) @@ -480,10 +473,8 @@ def __init__(self, model, **kwds): self.decision_rules = {} def initialize_sim(self): - for frame in self.frames.values(): for var in frame.target: - if frame.aggregate: val = np.empty(1) if frame.default is not None and var in frame.default: @@ -571,7 +562,6 @@ def sim_birth(self, which_agents): for frame in self.frames.values(): if not frame.aggregate: for var in frame.target: - N = np.sum(which_agents) if frame.default is not None and var in frame.default: @@ -687,7 +677,7 @@ def control_transition_age_varying(self, target, **context): frame = self.model.frames[target] scope = frame.scope - target_values = tuple((np.zeros(self.AgentCount) + np.nan for var in scope)) + target_values = tuple(np.zeros(self.AgentCount) + np.nan for var in scope) # Loop over each period of the cycle, getting controls separately depending on "age" for t in range(self.T_cycle): diff --git a/HARK/helpers.py b/HARK/helpers.py index df81dec60..0691e70ba 100644 --- a/HARK/helpers.py +++ b/HARK/helpers.py @@ -6,6 +6,7 @@ # Code to copy entire modules to a local directory # ------------------------------------------------------------------------------ + # Define a function to run the copying: def copy_module(target_path, my_directory_full_path, my_module): """ @@ -69,7 +70,6 @@ def copy_module(target_path, my_directory_full_path, my_module): def print_helper(): - my_directory_full_path = os.path.dirname(os.path.realpath(__file__)) print(my_directory_full_path) diff --git a/HARK/interpolation.py b/HARK/interpolation.py index 8d2e9b4f7..f238df6b8 100644 --- a/HARK/interpolation.py +++ b/HARK/interpolation.py @@ -2159,7 +2159,6 @@ class LowerEnvelope(HARKinterpolator1D): distance_criteria = ["functions"] def __init__(self, *functions, nan_bool=True): - if nan_bool: self.compare = np.nanmin self.argcompare = np.nanargmin @@ -4571,14 +4570,12 @@ def __call__(self, *vFuncArgs): return CRRAutility(self.vFuncNvrs(*vFuncArgs), self.CRRA) def gradient(self, *args): - NvrsGrad = self.vFuncNvrs.gradient(*args) grad = [CRRAutilityP(g, self.CRRA) for g in NvrsGrad] return grad def _eval_and_grad(self, *args): - return (self.__call__(*args), self.gradient(*args)) @@ -4760,7 +4757,7 @@ def dfdy(x, y): xInterpolators = [] xInterpolators_alt = [] for y in y_list: - this_x_list = np.sort((RNG.random(100) * 5.0)) + this_x_list = np.sort(RNG.random(100) * 5.0) this_interpolation = LinearInterp( this_x_list, f(this_x_list, y * np.ones(this_x_list.size)) ) @@ -4822,7 +4819,7 @@ def dfdz(x, y, z): for y in y_list: temp = [] for z in z_list: - this_x_list = np.sort((RNG.random(100) * 5.0)) + this_x_list = np.sort(RNG.random(100) * 5.0) this_interpolation = LinearInterp( this_x_list, f( @@ -4887,7 +4884,7 @@ def dfdz(w, x, y, z): for y in y_list: temptemp = [] for z in z_list: - this_w_list = np.sort((RNG.random(16) * 5.0)) + this_w_list = np.sort(RNG.random(16) * 5.0) this_interpolation = LinearInterp( this_w_list, f( diff --git a/HARK/parallel.py b/HARK/parallel.py index abfb15283..61df0d596 100644 --- a/HARK/parallel.py +++ b/HARK/parallel.py @@ -1,6 +1,7 @@ -from typing import List, Type, Any -from joblib import Parallel, delayed import multiprocessing +from typing import Any, List, Type + +from joblib import Parallel, delayed def multi_thread_commands_fake( diff --git a/HARK/rewards.py b/HARK/rewards.py index e947739f4..7b011e501 100644 --- a/HARK/rewards.py +++ b/HARK/rewards.py @@ -668,7 +668,6 @@ def const_elast_subs_p(x, zeta, subs, factor, power, arg=0): class UtilityFunction(MetricObject): - distance_criteria = ["eval_func"] def __init__(self, eval_func, der_func=None, inv_func=None): @@ -764,7 +763,7 @@ def derivative(self, c, order=1): elif order == 4: return CRRAutilityPPPP(c, self.CRRA) else: - raise ValueError("Derivative of order {} not supported".format(order)) + raise ValueError(f"Derivative of order {order} not supported") def inverse(self, u, order=(0, 0)): """ @@ -800,7 +799,7 @@ def inverse(self, u, order=(0, 0)): elif order == (1, 1): return CRRAutilityP_invP(u, self.CRRA) else: - raise ValueError("Inverse of order {} not supported".format(order)) + raise ValueError(f"Inverse of order {order} not supported") def derinv(self, u, order=(1, 0)): """ @@ -831,7 +830,7 @@ def __init__(self, EOS, factor=1.0): assert np.isclose( np.sum(self.EOS), 1.0 - ), """The sum of the elasticity of substitution + ), """The sum of the elasticity of substitution parameters must be less than or equal to 1.""" assert factor > 0, "Factor must be positive." @@ -869,7 +868,6 @@ class UtilityFuncCobbDouglasCRRA(UtilityFuncCobbDouglas): distance_criteria = ["EOS", "factor", "CRRA"] def __init__(self, EOS, factor, CRRA): - super().__init__(EOS, factor) self.CRRA = CRRA @@ -898,7 +896,6 @@ class UtilityFuncConstElastSubs(UtilityFunction): distance_criteria = ["shares", "subs", "factor", "homogeneity"] def __init__(self, shares, subs, homogeneity=1.0, factor=1.0): - assert subs != 0.0, "Consider using a Cobb-Douglas utility function instead." assert subs != 1.0, "Linear utility is not implemented." diff --git a/HARK/simulation.py b/HARK/simulation.py index 24ffc7263..918e4e377 100644 --- a/HARK/simulation.py +++ b/HARK/simulation.py @@ -3,4 +3,5 @@ """ import warnings # A library for runtime warnings + import numpy as np # Numerical Python diff --git a/HARK/tests/OpenCLtest.py b/HARK/tests/OpenCLtest.py index bdd23e8c9..665d508b3 100644 --- a/HARK/tests/OpenCLtest.py +++ b/HARK/tests/OpenCLtest.py @@ -3,8 +3,9 @@ """ import os -import opencl4py as cl + import numpy as np +import opencl4py as cl os.environ[ "PYOPENCL_CTX" @@ -13,7 +14,6 @@ from time import time if __name__ == "__main__": - N = 20000000 # Size of vectors to work with use_DP = True # Whether to use double precision floating point @@ -52,7 +52,7 @@ double_code = """ #pragma OPENCL EXTENSION cl_khr_fp64 : enable #pragma OPENCL EXTENSION cl_amd_fp64 : enable - + __kernel void test(__global const double *a, __global const double *b, __global double *c, const double k) { size_t i = get_global_id(0); diff --git a/HARK/tests/test_HARKutilities.py b/HARK/tests/test_HARKutilities.py index 64065aae4..2c9e27fc8 100644 --- a/HARK/tests/test_HARKutilities.py +++ b/HARK/tests/test_HARKutilities.py @@ -40,7 +40,6 @@ def derivative_func_comparison(self, deriv, func): for c in self.c_vals: # Loop through different values of risk aversion for CRRA in self.CRRA_vals: - # Calculate the difference between the derivative of the function and the # first difference approximation to that derivative. diff = abs( diff --git a/HARK/tests/test_TractableBufferStockModel.py b/HARK/tests/test_TractableBufferStockModel.py index 38999403a..3aa437709 100644 --- a/HARK/tests/test_TractableBufferStockModel.py +++ b/HARK/tests/test_TractableBufferStockModel.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Thu Mar 24 11:01:50 2016 diff --git a/HARK/tests/test_approxDstns.py b/HARK/tests/test_approxDstns.py index 338dd2e38..2a0ff75f6 100644 --- a/HARK/tests/test_approxDstns.py +++ b/HARK/tests/test_approxDstns.py @@ -41,7 +41,6 @@ def test_mu_lognormal_from_normal(self): class test_MVNormalApprox(unittest.TestCase): def setUp(self): - N = 5 # 2-D distribution @@ -57,7 +56,6 @@ def setUp(self): self.dist3D_approx = self.dist3D.discretize(N, method="hermite") def test_means(self): - mu_2D = distribution.calc_expectation(self.dist2D_approx) self.assertTrue(np.allclose(mu_2D, self.mu2, rtol=1e-5)) diff --git a/HARK/tests/test_dcegm.py b/HARK/tests/test_dcegm.py index 165036eaf..7632c4fae 100644 --- a/HARK/tests/test_dcegm.py +++ b/HARK/tests/test_dcegm.py @@ -1,12 +1,13 @@ """ This file implements unit tests to check discrete choice functions """ -from HARK import dcegm - # Bring in modules we need import unittest + import numpy as np +from HARK import dcegm + class envelope_test(unittest.TestCase): def setUp(self): @@ -16,7 +17,6 @@ def setUp(self): ] def test_upper_envelope(self): - # Compute x_env, y_env, inds = dcegm.upper_envelope(self.segments) diff --git a/HARK/tests/test_discrete.py b/HARK/tests/test_discrete.py index 19325860d..8ee9afec7 100644 --- a/HARK/tests/test_discrete.py +++ b/HARK/tests/test_discrete.py @@ -1,12 +1,13 @@ """ This file implements unit tests to check discrete choice functions """ -from HARK import interpolation - # Bring in modules we need import unittest + import numpy as np +from HARK import interpolation + class testsForDiscreteChoice(unittest.TestCase): def setUp(self): diff --git a/HARK/tests/test_distribution.py b/HARK/tests/test_distribution.py index 9647890f8..ced58fbf5 100644 --- a/HARK/tests/test_distribution.py +++ b/HARK/tests/test_distribution.py @@ -37,7 +37,6 @@ def test_draw(self): ) def test_distr_of_function(self): - # Function 1 -> 1 # Approximate the lognormal expectation sig = 0.05 @@ -178,7 +177,6 @@ def test_self_expected_value(self): self.assertAlmostEqual(ce9[3], 9.51802, places=HARK_PRECISION) def test_self_dist_of_func(self): - # Function 1 -> 1 # Approximate the lognormal expectation sig = 0.05 @@ -226,7 +224,6 @@ class MatrixDiscreteDistributionTests(unittest.TestCase): """ def setUp(self): - self.draw_1 = np.array( [ [[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]], @@ -251,7 +248,6 @@ def test_draw(self): self.assertTrue(np.allclose(draw[..., 0], self.draw_2)) def test_expected(self): - # Expectation without transformation exp = calc_expectation(self.mat_distr) @@ -267,11 +263,9 @@ def test_expected(self): self.assertTrue(float(exp) == 0.0) def test_distr_of_fun(self): - # A function that receives a (2,n,m) matrix # and sums across n, getting a (2,1,m) matrix def myfunc(mat): - return np.sum(mat, axis=1, keepdims=True) mydistr = distr_of_function(self.mat_distr, myfunc) @@ -310,7 +304,6 @@ def test_Normal(self): dist.draw(1)[0] def test_MVNormal(self): - # Are these tests generator/backend specific? dist = MVNormal() @@ -429,7 +422,6 @@ def test_norm_to_lognorm(self): class NormalDistTest(unittest.TestCase): def test_approx_equiprobable(self): - mu, sigma = 5.0, 27.0 points = Normal(mu, sigma).discretize(701, method="equiprobable").atoms @@ -451,7 +443,6 @@ def test_draw(self): ) def test_self_dist_of_func(self): - # Function 1 -> 1 # Approximate the lognormal expectation sig = 0.05 @@ -509,7 +500,6 @@ def test_self_dist_of_func(self): self.assertAlmostEqual(exp[3], si_b**2) def test_self_expected_value(self): - PermShkDstn = MeanOneLogNormal().discretize(200, method="equiprobable") TranShkDstn = MeanOneLogNormal().discretize(200, method="equiprobable") IncShkDstn = combine_indep_dstns( @@ -542,7 +532,6 @@ def test_self_expected_value(self): self.assertAlmostEqual(ce2[3], 9.51802, places=HARK_PRECISION) def test_getters_setters(self): - # Create some dummy dsnt dist = DiscreteDistributionLabeled( pmv=np.array([0.5, 0.5]), atoms=np.array([-1.0, 1.0]), var_names=["my_var"] @@ -559,7 +548,6 @@ def test_getters_setters(self): self.assertTrue(my_rng == dist.RNG) def test_combine_labeled_dist(self): - # Create some dstns a = DiscreteDistributionLabeled( pmv=np.array([0.1, 0.9]), atoms=np.array([-1.0, 1.0]), var_names="a" diff --git a/HARK/tests/test_econforgeinterp.py b/HARK/tests/test_econforgeinterp.py index 64b69791d..73f22c781 100644 --- a/HARK/tests/test_econforgeinterp.py +++ b/HARK/tests/test_econforgeinterp.py @@ -1,9 +1,10 @@ import unittest + import numpy as np -from HARK.interpolation import LinearInterp, BilinearInterp -from HARK.econforgeinterp import LinearFast, DecayInterp from HARK.core import distance_metric +from HARK.econforgeinterp import DecayInterp, LinearFast +from HARK.interpolation import BilinearInterp, LinearInterp class CompareLinearInterp(unittest.TestCase): @@ -12,12 +13,10 @@ class CompareLinearInterp(unittest.TestCase): """ def setUp(self): - self.n_grid_points = 100 self.n_eval_points = 3 def compare_output(self, x, y, eval_points): - h_interp = LinearInterp(x, y, lower_extrap=True) e_interp = LinearFast(y, [x]) @@ -76,12 +75,10 @@ class CompareBilinearInterp(unittest.TestCase): """ def setUp(self): - self.n_grid_points = 100 self.n_eval_points = 3 def compare_output(self, x, y, z, eval_x, eval_y): - h_interp = BilinearInterp(z, x, y) e_interp = LinearFast(z, [x, y]) @@ -164,7 +161,6 @@ class Check1DDerivatives(unittest.TestCase): """ def test_linear(self): - # A linear function on a non-uniform grid x = np.exp(np.linspace(0, 2, 6)) y0 = 2 @@ -181,7 +177,6 @@ def test_linear(self): self.assertTrue(np.allclose(grad, result)) def test_nonlinear(self): - # A non linear function on uniform grid x = np.linspace(-10, 10, 21) * (1 / 2) * np.pi y = np.sin(x) @@ -196,7 +191,6 @@ def test_nonlinear(self): self.assertTrue(np.allclose(grad, result)) def test_nonlinear_approx(self): - # A non linear function on uniform grid x = np.linspace(-10, 10, 10000) y = np.power(x, 3) @@ -215,7 +209,6 @@ class Check2DDerivatives(unittest.TestCase): """ def test_linear(self): - # A linear function on a non-uniform grid x = np.exp(np.linspace(0, 2, 6)) y = np.power(np.linspace(0, 5, 10), 2) @@ -243,7 +236,6 @@ def test_linear(self): self.assertTrue(np.allclose(grad[1], np.ones_like(y_ev) * slope_y)) def test_nonlinear_approx(self): - # A non linear function on uniform grid n_grid = 100 x = np.linspace(1, 5, n_grid) @@ -277,7 +269,6 @@ class TestLinearDecay(unittest.TestCase): """ def setUp(self): - # Set up a bilinear extrapolator for a simple function self.x = np.linspace(0, 10, 11) self.y = np.linspace(0, 10, 11) @@ -306,7 +297,6 @@ def setUp(self): def ndim_extrap_test( self, ndim, f_interp, g_lim, g_lim_grad, extrap_method, atol=0.1 ): - # Create grids grids = [np.linspace(0, 10, 11) for i in range(ndim)] mesh = np.meshgrid(*grids, indexing="ij") @@ -335,9 +325,7 @@ def ndim_extrap_test( self.assertTrue(np.allclose(extrap, g_lim(*off_points), atol=atol)) def test_decay(self): - for method in ["decay_prop", "decay_hark"]: - # 1D self.ndim_extrap_test( 1, @@ -366,7 +354,6 @@ def test_decay(self): ) def test_compare_smooth_with_LinearInterp(self): - lim_slope = 0.1 lim_inter = 1.0 diff --git a/HARK/tests/test_frame.py b/HARK/tests/test_frame.py index 49144b9ae..fbe5169b5 100644 --- a/HARK/tests/test_frame.py +++ b/HARK/tests/test_frame.py @@ -37,7 +37,6 @@ def setUp(self): self.model = FrameModel(frames_A, init_parameters) def test_init(self): - self.model.frames.var("aNrm") self.assertTrue( @@ -55,19 +54,16 @@ def test_init(self): ) def test_make_terminal(self): - terminal_model = self.model.make_terminal() self.assertEqual(len(self.model.make_terminal().frames.var("aNrm").children), 0) def test_prepend(self): - double_model = self.model.prepend(self.model) self.assertEqual(len(double_model.frames), 10) def test_repeat(self): - repeat_model = self.model.repeat({"bNrm": {"Rfree": [1.01, 1.03, 1.02]}}) self.assertEqual(len(repeat_model.frames), 15) diff --git a/HARK/tests/test_interpolation.py b/HARK/tests/test_interpolation.py index c24689de1..ad0008330 100644 --- a/HARK/tests/test_interpolation.py +++ b/HARK/tests/test_interpolation.py @@ -1,17 +1,13 @@ """ This file implements unit tests for interpolation methods """ -from HARK.interpolation import ( - LinearInterp, - BilinearInterp, - TrilinearInterp, - QuadlinearInterp, -) - -from HARK.interpolation import CubicHermiteInterp as CubicInterp +import unittest import numpy as np -import unittest + +from HARK.interpolation import BilinearInterp +from HARK.interpolation import CubicHermiteInterp as CubicInterp +from HARK.interpolation import LinearInterp, QuadlinearInterp, TrilinearInterp class testsLinearInterp(unittest.TestCase): diff --git a/HARK/tests/test_parallel.py b/HARK/tests/test_parallel.py index 1146fad20..5351ba50a 100644 --- a/HARK/tests/test_parallel.py +++ b/HARK/tests/test_parallel.py @@ -1,8 +1,9 @@ import unittest + from HARK.ConsumptionSaving.ConsIndShockModel import PerfForesightConsumerType from HARK.parallel import ( - multi_thread_commands_fake, multi_thread_commands, + multi_thread_commands_fake, run_commands, ) @@ -29,6 +30,6 @@ def test_multi_thread_commands(self): ) def test_run_commands(self): - self.assertEquals(run_commands(self.agent, ["solve()"]), self.agent) + self.assertEqual(run_commands(self.agent, ["solve()"]), self.agent) # check if an undefined method of agent is called self.assertRaises(AttributeError, run_commands, self.agent, ["foobar()"]) diff --git a/HARK/tests/test_validators.py b/HARK/tests/test_validators.py index a9a273da8..ba4041c6d 100644 --- a/HARK/tests/test_validators.py +++ b/HARK/tests/test_validators.py @@ -1,4 +1,5 @@ -import unittest, sys +import sys +import unittest from HARK.validators import non_empty @@ -19,7 +20,7 @@ def foo(list_a, list_b): self.fail() if sys.version[0] == "2": - with self.assertRaisesRegexp( + with self.assertRaisesRegex( TypeError, "Expected non-empty argument for parameter list_a", ): @@ -36,12 +37,12 @@ def foo(list_a, list_b): pass if sys.version[0] == "2": - with self.assertRaisesRegexp( + with self.assertRaisesRegex( TypeError, "Expected non-empty argument for parameter list_b", ): foo([1], []) - with self.assertRaisesRegexp( + with self.assertRaisesRegex( TypeError, "Expected non-empty argument for parameter list_a", ): diff --git a/HARK/utilities.py b/HARK/utilities.py index 6a32c195a..2bed83e06 100644 --- a/HARK/utilities.py +++ b/HARK/utilities.py @@ -66,7 +66,7 @@ def get_arg_names(function): return argNames -class NullFunc(object): +class NullFunc: """ A trivial class that acts as a placeholder "do nothing" function. """ @@ -998,26 +998,26 @@ def make_figs(figure_name, saveFigs, drawFigs, target_dir="Figures"): # Where to put any figures that the user wants to save my_file_path = os.getcwd() # Find pathname to this file: Figures_dir = os.path.join( - my_file_path, "{}".format(target_dir) + my_file_path, f"{target_dir}" ) # LaTeX document assumes figures will be here if not os.path.exists(Figures_dir): os.makedirs(Figures_dir) # If dir does not exist, create it # Save the figures in several formats - print("Saving figure {} in {}".format(figure_name, target_dir)) + print(f"Saving figure {figure_name} in {target_dir}") plt.savefig( - os.path.join(target_dir, "{}.jpg".format(figure_name)), + os.path.join(target_dir, f"{figure_name}.jpg"), metadata={"CreationDate": None}, ) # For web/html plt.savefig( - os.path.join(target_dir, "{}.png".format(figure_name)), + os.path.join(target_dir, f"{figure_name}.png"), metadata={"CreationDate": None}, ) # For web/html plt.savefig( - os.path.join(target_dir, "{}.pdf".format(figure_name)), + os.path.join(target_dir, f"{figure_name}.pdf"), metadata={"CreationDate": None}, ) # For LaTeX plt.savefig( - os.path.join(target_dir, "{}.svg".format(figure_name)), + os.path.join(target_dir, f"{figure_name}.svg"), metadata={"Date": None}, ) # For html5 # Make sure it's possible to plot it by checking for GUI @@ -1089,7 +1089,7 @@ def benchmark( def mround(match): - return "{:.5f}".format(float(match.group())) + return f"{float(match.group()):.5f}" def round_in_file(filename): diff --git a/README.md b/README.md index e6a07bfdc..011733aff 100644 --- a/README.md +++ b/README.md @@ -14,12 +14,10 @@ [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Powered by NumFOCUS](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A)](https://numfocus.org/) [![Donate](https://img.shields.io/badge/donate-$2-brightgreen.svg)](https://numfocus.salsalabs.org/donate-to-econ-ark/index.html) -[![Actions Status](https://github.com/econ-ark/hark/workflows/HARK%20build%20on%20MacOS%2C%20Ubuntu%20and%20Windows/badge.svg -)](https://github.com/econ-ark/hark/actions) +[![Actions Status](https://github.com/econ-ark/hark/workflows/HARK%20build%20on%20MacOS%2C%20Ubuntu%20and%20Windows/badge.svg)](https://github.com/econ-ark/hark/actions) [![badge](https://img.shields.io/badge/HARK-DemARK-579ACA.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFkAAABZCAMAAABi1XidAAAB8lBMVEX///9XmsrmZYH1olJXmsr1olJXmsrmZYH1olJXmsr1olJXmsrmZYH1olL1olJXmsr1olJXmsrmZYH1olL1olJXmsrmZYH1olJXmsr1olL1olJXmsrmZYH1olL1olJXmsrmZYH1olL1olL0nFf1olJXmsrmZYH1olJXmsq8dZb1olJXmsrmZYH1olJXmspXmspXmsr1olL1olJXmsrmZYH1olJXmsr1olL1olJXmsrmZYH1olL1olLeaIVXmsrmZYH1olL1olL1olJXmsrmZYH1olLna31Xmsr1olJXmsr1olJXmsrmZYH1olLqoVr1olJXmsr1olJXmsrmZYH1olL1olKkfaPobXvviGabgadXmsqThKuofKHmZ4Dobnr1olJXmsr1olJXmspXmsr1olJXmsrfZ4TuhWn1olL1olJXmsqBi7X1olJXmspZmslbmMhbmsdemsVfl8ZgmsNim8Jpk8F0m7R4m7F5nLB6jbh7jbiDirOEibOGnKaMhq+PnaCVg6qWg6qegKaff6WhnpKofKGtnomxeZy3noG6dZi+n3vCcpPDcpPGn3bLb4/Mb47UbIrVa4rYoGjdaIbeaIXhoWHmZYHobXvpcHjqdHXreHLroVrsfG/uhGnuh2bwj2Hxk17yl1vzmljzm1j0nlX1olL3AJXWAAAAbXRSTlMAEBAQHx8gICAuLjAwMDw9PUBAQEpQUFBXV1hgYGBkcHBwcXl8gICAgoiIkJCQlJicnJ2goKCmqK+wsLC4usDAwMjP0NDQ1NbW3Nzg4ODi5+3v8PDw8/T09PX29vb39/f5+fr7+/z8/Pz9/v7+zczCxgAABC5JREFUeAHN1ul3k0UUBvCb1CTVpmpaitAGSLSpSuKCLWpbTKNJFGlcSMAFF63iUmRccNG6gLbuxkXU66JAUef/9LSpmXnyLr3T5AO/rzl5zj137p136BISy44fKJXuGN/d19PUfYeO67Znqtf2KH33Id1psXoFdW30sPZ1sMvs2D060AHqws4FHeJojLZqnw53cmfvg+XR8mC0OEjuxrXEkX5ydeVJLVIlV0e10PXk5k7dYeHu7Cj1j+49uKg7uLU61tGLw1lq27ugQYlclHC4bgv7VQ+TAyj5Zc/UjsPvs1sd5cWryWObtvWT2EPa4rtnWW3JkpjggEpbOsPr7F7EyNewtpBIslA7p43HCsnwooXTEc3UmPmCNn5lrqTJxy6nRmcavGZVt/3Da2pD5NHvsOHJCrdc1G2r3DITpU7yic7w/7Rxnjc0kt5GC4djiv2Sz3Fb2iEZg41/ddsFDoyuYrIkmFehz0HR2thPgQqMyQYb2OtB0WxsZ3BeG3+wpRb1vzl2UYBog8FfGhttFKjtAclnZYrRo9ryG9uG/FZQU4AEg8ZE9LjGMzTmqKXPLnlWVnIlQQTvxJf8ip7VgjZjyVPrjw1te5otM7RmP7xm+sK2Gv9I8Gi++BRbEkR9EBw8zRUcKxwp73xkaLiqQb+kGduJTNHG72zcW9LoJgqQxpP3/Tj//c3yB0tqzaml05/+orHLksVO+95kX7/7qgJvnjlrfr2Ggsyx0eoy9uPzN5SPd86aXggOsEKW2Prz7du3VID3/tzs/sSRs2w7ovVHKtjrX2pd7ZMlTxAYfBAL9jiDwfLkq55Tm7ifhMlTGPyCAs7RFRhn47JnlcB9RM5T97ASuZXIcVNuUDIndpDbdsfrqsOppeXl5Y+XVKdjFCTh+zGaVuj0d9zy05PPK3QzBamxdwtTCrzyg/2Rvf2EstUjordGwa/kx9mSJLr8mLLtCW8HHGJc2R5hS219IiF6PnTusOqcMl57gm0Z8kanKMAQg0qSyuZfn7zItsbGyO9QlnxY0eCuD1XL2ys/MsrQhltE7Ug0uFOzufJFE2PxBo/YAx8XPPdDwWN0MrDRYIZF0mSMKCNHgaIVFoBbNoLJ7tEQDKxGF0kcLQimojCZopv0OkNOyWCCg9XMVAi7ARJzQdM2QUh0gmBozjc3Skg6dSBRqDGYSUOu66Zg+I2fNZs/M3/f/Grl/XnyF1Gw3VKCez0PN5IUfFLqvgUN4C0qNqYs5YhPL+aVZYDE4IpUk57oSFnJm4FyCqqOE0jhY2SMyLFoo56zyo6becOS5UVDdj7Vih0zp+tcMhwRpBeLyqtIjlJKAIZSbI8SGSF3k0pA3mR5tHuwPFoa7N7reoq2bqCsAk1HqCu5uvI1n6JuRXI+S1Mco54YmYTwcn6Aeic+kssXi8XpXC4V3t7/ADuTNKaQJdScAAAAAElFTkSuQmCC)](https://mybinder.org/v2/gh/econ-ark/DemARK/master?filepath=notebooks) [![badge](https://img.shields.io/badge/HARK-examples-579ACA.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFkAAABZCAMAAABi1XidAAAB8lBMVEX///9XmsrmZYH1olJXmsr1olJXmsrmZYH1olJXmsr1olJXmsrmZYH1olL1olJXmsr1olJXmsrmZYH1olL1olJXmsrmZYH1olJXmsr1olL1olJXmsrmZYH1olL1olJXmsrmZYH1olL1olL0nFf1olJXmsrmZYH1olJXmsq8dZb1olJXmsrmZYH1olJXmspXmspXmsr1olL1olJXmsrmZYH1olJXmsr1olL1olJXmsrmZYH1olL1olLeaIVXmsrmZYH1olL1olL1olJXmsrmZYH1olLna31Xmsr1olJXmsr1olJXmsrmZYH1olLqoVr1olJXmsr1olJXmsrmZYH1olL1olKkfaPobXvviGabgadXmsqThKuofKHmZ4Dobnr1olJXmsr1olJXmspXmsr1olJXmsrfZ4TuhWn1olL1olJXmsqBi7X1olJXmspZmslbmMhbmsdemsVfl8ZgmsNim8Jpk8F0m7R4m7F5nLB6jbh7jbiDirOEibOGnKaMhq+PnaCVg6qWg6qegKaff6WhnpKofKGtnomxeZy3noG6dZi+n3vCcpPDcpPGn3bLb4/Mb47UbIrVa4rYoGjdaIbeaIXhoWHmZYHobXvpcHjqdHXreHLroVrsfG/uhGnuh2bwj2Hxk17yl1vzmljzm1j0nlX1olL3AJXWAAAAbXRSTlMAEBAQHx8gICAuLjAwMDw9PUBAQEpQUFBXV1hgYGBkcHBwcXl8gICAgoiIkJCQlJicnJ2goKCmqK+wsLC4usDAwMjP0NDQ1NbW3Nzg4ODi5+3v8PDw8/T09PX29vb39/f5+fr7+/z8/Pz9/v7+zczCxgAABC5JREFUeAHN1ul3k0UUBvCb1CTVpmpaitAGSLSpSuKCLWpbTKNJFGlcSMAFF63iUmRccNG6gLbuxkXU66JAUef/9LSpmXnyLr3T5AO/rzl5zj137p136BISy44fKJXuGN/d19PUfYeO67Znqtf2KH33Id1psXoFdW30sPZ1sMvs2D060AHqws4FHeJojLZqnw53cmfvg+XR8mC0OEjuxrXEkX5ydeVJLVIlV0e10PXk5k7dYeHu7Cj1j+49uKg7uLU61tGLw1lq27ugQYlclHC4bgv7VQ+TAyj5Zc/UjsPvs1sd5cWryWObtvWT2EPa4rtnWW3JkpjggEpbOsPr7F7EyNewtpBIslA7p43HCsnwooXTEc3UmPmCNn5lrqTJxy6nRmcavGZVt/3Da2pD5NHvsOHJCrdc1G2r3DITpU7yic7w/7Rxnjc0kt5GC4djiv2Sz3Fb2iEZg41/ddsFDoyuYrIkmFehz0HR2thPgQqMyQYb2OtB0WxsZ3BeG3+wpRb1vzl2UYBog8FfGhttFKjtAclnZYrRo9ryG9uG/FZQU4AEg8ZE9LjGMzTmqKXPLnlWVnIlQQTvxJf8ip7VgjZjyVPrjw1te5otM7RmP7xm+sK2Gv9I8Gi++BRbEkR9EBw8zRUcKxwp73xkaLiqQb+kGduJTNHG72zcW9LoJgqQxpP3/Tj//c3yB0tqzaml05/+orHLksVO+95kX7/7qgJvnjlrfr2Ggsyx0eoy9uPzN5SPd86aXggOsEKW2Prz7du3VID3/tzs/sSRs2w7ovVHKtjrX2pd7ZMlTxAYfBAL9jiDwfLkq55Tm7ifhMlTGPyCAs7RFRhn47JnlcB9RM5T97ASuZXIcVNuUDIndpDbdsfrqsOppeXl5Y+XVKdjFCTh+zGaVuj0d9zy05PPK3QzBamxdwtTCrzyg/2Rvf2EstUjordGwa/kx9mSJLr8mLLtCW8HHGJc2R5hS219IiF6PnTusOqcMl57gm0Z8kanKMAQg0qSyuZfn7zItsbGyO9QlnxY0eCuD1XL2ys/MsrQhltE7Ug0uFOzufJFE2PxBo/YAx8XPPdDwWN0MrDRYIZF0mSMKCNHgaIVFoBbNoLJ7tEQDKxGF0kcLQimojCZopv0OkNOyWCCg9XMVAi7ARJzQdM2QUh0gmBozjc3Skg6dSBRqDGYSUOu66Zg+I2fNZs/M3/f/Grl/XnyF1Gw3VKCez0PN5IUfFLqvgUN4C0qNqYs5YhPL+aVZYDE4IpUk57oSFnJm4FyCqqOE0jhY2SMyLFoo56zyo6becOS5UVDdj7Vih0zp+tcMhwRpBeLyqtIjlJKAIZSbI8SGSF3k0pA3mR5tHuwPFoa7N7reoq2bqCsAk1HqCu5uvI1n6JuRXI+S1Mco54YmYTwcn6Aeic+kssXi8XpXC4V3t7/ADuTNKaQJdScAAAAAElFTkSuQmCC)](https://mybinder.org/v2/gh/econ-ark/HARK/master?filepath=examples) -