diff --git a/.copier-answers.yml b/.copier-answers.yml new file mode 100644 index 000000000..7b50606ab --- /dev/null +++ b/.copier-answers.yml @@ -0,0 +1,12 @@ +# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY +_commit: 2024.08.19 +_src_path: gh:scientific-python/cookie +backend: hatch +email: econ-ark@jhuecon.org +full_name: Econ-ARK Team +license: MIT +org: econ-ark +project_name: HARK +project_short_description: Heterogeneous Agents Resources and toolKit +url: https://github.com/econ-ark/HARK +vcs: true diff --git a/.git_archival.txt b/.git_archival.txt new file mode 100644 index 000000000..7c5100942 --- /dev/null +++ b/.git_archival.txt @@ -0,0 +1,3 @@ +node: $Format:%H$ +node-date: $Format:%cI$ +describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$ diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..00a7b00c9 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +.git_archival.txt export-subst diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 000000000..368750a6b --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,89 @@ +See the [Scientific Python Developer Guide][spc-dev-intro] for a detailed +description of best practices for developing scientific packages. + +[spc-dev-intro]: https://learn.scientific-python.org/development/ + +# Quick development + +The fastest way to start with development is to use nox. If you don't have nox, +you can use `pipx run nox` to run it without installing, or `pipx install nox`. +If you don't have pipx (pip for applications), then you can install with +`pip install pipx` (the only case were installing an application with regular +pip is reasonable). If you use macOS, then pipx and nox are both in brew, use +`brew install pipx nox`. + +To use, run `nox`. This will lint and test using every installed version of +Python on your system, skipping ones that are not installed. You can also run +specific jobs: + +```console +$ nox -s lint # Lint only +$ nox -s tests # Python tests +$ nox -s docs -- --serve # Build and serve the docs +$ nox -s build # Make an SDist and wheel +``` + +Nox handles everything for you, including setting up an temporary virtual +environment for each run. + +# Setting up a development environment manually + +You can set up a development environment by running: + +```bash +python3 -m venv .venv +source ./.venv/bin/activate +pip install -v -e .[dev] +``` + +If you have the +[Python Launcher for Unix](https://github.com/brettcannon/python-launcher), you +can instead do: + +```bash +py -m venv .venv +py -m install -v -e .[dev] +``` + +# Pre-commit + +You should prepare pre-commit, which will help you by checking that commits pass +required checks: + +```bash +pip install pre-commit # or brew install pre-commit on macOS +pre-commit install # Will install a pre-commit hook into the git repo +``` + +You can also/alternatively run `pre-commit run` (changes only) or +`pre-commit run --all-files` to check even without installing the hook. + +# Testing + +Use pytest to run the unit checks: + +```bash +pytest +``` + +# Coverage + +Use pytest-cov to generate coverage reports: + +```bash +pytest --cov=HARK +``` + +# Building docs + +You can build the docs using: + +```bash +nox -s docs +``` + +You can see a preview with: + +```bash +nox -s docs -- --serve +``` diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..6c4b36953 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +version: 2 +updates: + # Maintain dependencies for GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + groups: + actions: + patterns: + - "*" diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 000000000..9d1e0987b --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,5 @@ +changelog: + exclude: + authors: + - dependabot + - pre-commit-ci diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 000000000..efc7d0612 --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,60 @@ +name: CD + +on: + workflow_dispatch: + pull_request: + push: + branches: + - main + release: + types: + - published + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + # Many color libraries just need this to be set to any value, but at least + # one distinguishes color depth, where "3" -> "256-bit color". + FORCE_COLOR: 3 + +jobs: + dist: + name: Distribution build + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: hynek/build-and-inspect-python-package@v2 + + publish: + needs: [dist] + name: Publish to PyPI + environment: pypi + permissions: + id-token: write + attestations: write + contents: read + runs-on: ubuntu-latest + if: github.event_name == 'release' && github.event.action == 'published' + + steps: + - uses: actions/download-artifact@v4 + with: + name: Packages + path: dist + + - name: Generate artifact attestation for sdist and wheel + uses: actions/attest-build-provenance@v1.4.1 + with: + subject-path: "dist/*" + + - uses: pypa/gh-action-pypi-publish@release/v1 + with: + # Remember to tell (test-)pypi about this repo before publishing + # Remove this line to publish to PyPI + repository-url: https://test.pypi.org/legacy/ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..fe68bf967 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,67 @@ +name: CI + +on: + workflow_dispatch: + pull_request: + push: + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + # Many color libraries just need this to be set to any value, but at least + # one distinguishes color depth, where "3" -> "256-bit color". + FORCE_COLOR: 3 + +jobs: + pre-commit: + name: Format + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-python@v5 + with: + python-version: "3.x" + - uses: pre-commit/action@v3.0.1 + with: + extra_args: --hook-stage manual --all-files + - name: Run PyLint + run: pipx run nox -s pylint -- --output-format=github + + checks: + name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }} + runs-on: ${{ matrix.runs-on }} + needs: [pre-commit] + strategy: + fail-fast: false + matrix: + python-version: ["3.10", "3.11", "3.12"] + runs-on: [ubuntu-latest, windows-latest, macos-14] + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + allow-prereleases: true + + - name: Install package + run: python -m pip install .[test] + + - name: Test package + run: >- + python -m pytest -ra --cov --cov-report=xml --cov-report=term + --durations=20 + + - name: Upload coverage report + uses: codecov/codecov-action@v4.5.0 + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 3b2437b62..3372df68b 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -35,7 +35,7 @@ jobs: cache: "pip" cache-dependency-path: | requirements/base.txt - requirements/doc.txt + requirements/docs.txt - name: Install Pandoc run: sudo apt-get install --yes pandoc @@ -44,16 +44,11 @@ jobs: run: python -m pip install --upgrade pip - name: Install HARK - run: python -m pip install .[doc] + run: python -m pip install .[docs] - name: Run Sphinx run: > - sphinx-build - -M html . HARK-docs - -T - -c Documentation - -W - -j 1 + sphinx-build -M html docs HARK-docs -T -c docs -j 1 - name: Set up git for deployment run: | @@ -69,12 +64,13 @@ jobs: - name: Deploy to GitHub Pages # Only deploy to Pages on pushes to HEAD - if: (github.repository_owner == 'Econ-ARK') && (github.event_name == 'push') && (github.ref_name == 'master') + if: + (github.repository_owner == 'Econ-ARK') && (github.event_name == + 'push') && (github.ref_name == 'master') run: > - git push - --force - https://x-access-token:${{ github.token }}@github.com/${{ github.repository }} - `git subtree split --prefix HARK-docs/html gh-pages`:refs/heads/gh-pages + git push --force https://x-access-token:${{ github.token + }}@github.com/${{ github.repository }} `git subtree split --prefix + HARK-docs/html gh-pages`:refs/heads/gh-pages lint: runs-on: ubuntu-latest @@ -91,9 +87,5 @@ jobs: python -m pip install --upgrade sphinx-lint - name: Lint documentation with sphinx-lint run: > - sphinx-lint - --ignore Documentation/example_notebooks/GenIncProcessModel.py - --enable all - --max-line-length 85 - README.md - Documentation/ + sphinx-lint --ignore docs/example_notebooks/GenIncProcessModel.py + --enable all --max-line-length 85 README.md docs/ diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 81d3a6d44..6cec8b04d 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -6,13 +6,13 @@ on: - master paths-ignore: - ".github/workflows/documentation.yml" - - "Documentation/**" + - "docs/**" pull_request: branches: - master paths-ignore: - ".github/workflows/documentation.yml" - - "Documentation/**" + - "docs/**" schedule: - cron: 0 0 * * * @@ -35,4 +35,4 @@ jobs: pip install ".[dev]" - name: Run examples run: | - pytest --nbval-lax --nbval-current-env --dist loadscope -n auto examples/ + pytest --nbval-lax --nbval-current-env --dist loadscope -n auto docs/examples/ diff --git a/.github/workflows/execute-notebooks.yml b/.github/workflows/execute-notebooks.yml index d9ddf59ab..d201eb971 100644 --- a/.github/workflows/execute-notebooks.yml +++ b/.github/workflows/execute-notebooks.yml @@ -49,11 +49,11 @@ jobs: python -m pip install ipykernel nbclient nbformat - name: Strip output - run: nbstripout examples/**/*.ipynb + run: nbstripout docs/examples/**/*.ipynb # This step takes c. 20 minutes - name: Execute notebooks - run: python tools/nb_exec.py examples/**/*.ipynb + run: python tools/nb_exec.py docs/examples/**/*.ipynb env: PYTHONUNBUFFERED: "1" @@ -67,7 +67,8 @@ jobs: title: "[bot] Execute example notebooks" # language=Markdown body: > - This PR was [automatically generated] to re-execute - the example notebooks for use in the documentation. + This PR was [automatically generated] to re-execute the example + notebooks for use in the documentation. - [automatically generated]: https://github.com/Econ-ARK/HARK/actions/workflows/execute-notebooks.yml + [automatically generated]: + https://github.com/Econ-ARK/HARK/actions/workflows/execute-notebooks.yml diff --git a/.github/workflows/hark.yml b/.github/workflows/hark.yml deleted file mode 100644 index e52ed1ece..000000000 --- a/.github/workflows/hark.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: HARK build on MacOS, Ubuntu and Windows - -on: - push: - branches: - - master - paths-ignore: - - ".github/workflows/documentation.yml" - - "Documentation/**" - pull_request: - branches: - - master - paths-ignore: - - ".github/workflows/documentation.yml" - - "Documentation/**" - -jobs: - build: - runs-on: ${{ matrix.os }} - strategy: - max-parallel: 5 - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.10", "3.11", "3.12"] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install ".[dev]" - - name: Test with pytest - run: | - pytest -n auto diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 86723ac74..000000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: pre-commit - -on: [push, pull_request] - -jobs: - format: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.12"] - - steps: - - uses: actions/checkout@v4 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - - name: Install packages - run: | - python -m pip install --upgrade pip - python -m pip install ".[dev]" - pip list - - - name: Lint - run: pre-commit run --all-files --show-diff-on-failure --color always diff --git a/.gitignore b/.gitignore index 87f333f6e..25cf9a498 100644 --- a/.gitignore +++ b/.gitignore @@ -3,16 +3,11 @@ __pycache__/ *.py[cod] *$py.class -# Virtual Environments -venv/ -econ-ark/ - # C extensions *.so # Distribution / packaging .Python -env/ build/ develop-eggs/ dist/ @@ -24,9 +19,12 @@ lib64/ parts/ sdist/ var/ +wheels/ +share/python-wheels/ *.egg-info/ .installed.cfg *.egg +MANIFEST # PyInstaller # Usually these files are written by a python script from a template @@ -41,13 +39,17 @@ pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ .tox/ +.nox/ .coverage .coverage.* .cache nosetests.xml coverage.xml -*,cover +*.cover +*.py,cover .hypothesis/ +.pytest_cache/ +cover/ # Translations *.mo @@ -55,240 +57,102 @@ coverage.xml # Django stuff: *.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy # Sphinx documentation -Documentation/generated -Documentation/_build -Documentation/TractableBufferStockModel.rst -Documentation/MultithreadDemo.rst -Documentation/modules.rst -Documentation/ConsumerParameters.rst -Documentation/ConsPrefShockModel.rst -Documentation/ConsMarkovModel.rst -Documentation/ConsIndShockModel.rst -Documentation/ConsAggShockModel.rst -Documentation/StructEstimation.rst -Documentation/SetupSCFdata.rst -Documentation/EstimationParameters.rst -Documentation/SetupParamsCSTW.rst -Documentation/cstwMPC.rst -Documentation/FashionVictimParams.rst -Documentation/FashionVictimModel.rst -Documentation/HARKutilities.rst -Documentation/HARKsimulation.rst -Documentation/HARKparallel.rst -Documentation/HARKinterpolation.rst -Documentation/HARKestimation.rst -Documentation/HARKcore.rst -doc/_build/ -doc/generated/ +docs/_build/ # PyBuilder +.pybuilder/ target/ -#Ipython Notebook +# Jupyter Notebook .ipynb_checkpoints -#Windows files -Thumbs.db - -## Core latex/pdflated auxiliary files: -*.aux -*.lof -*.log -*.lot -*.fls -*.out -*.toc -*.fmt - -## Intermediate documents: -*.dvi -*-converted-to.* - -## Bibliography auxiliary files (bibtex/biblatex/biber): -*.bbl -*.bcf -*.blg -*-blx.aux -*-blx.bib -*.brf -*.run.xml - -## Files created by htlatex -*.4tc -*.tmp -*.xref - -## Build tool auxiliary files: -*.fdb_latexmk -*.synctex -*.synctex.gz -*.synctex.gz(busy) -*.pdfsync - -## Auxiliary and intermediate files from other packages: -# algorithms -*.alg -*.loa - -# achemso -acs-*.bib - -# amsthm -*.thm - -# beamer -*.nav -*.snm -*.vrb - -# cprotect -*.cpt - -#(e)ledmac/(e)ledpar -*.end -*.[1-9] -*.[1-9][0-9] -*.[1-9][0-9][0-9] -*.[1-9]R -*.[1-9][0-9]R -*.[1-9][0-9][0-9]R -*.eledsec[1-9] -*.eledsec[1-9]R -*.eledsec[1-9][0-9] -*.eledsec[1-9][0-9]R -*.eledsec[1-9][0-9][0-9] -*.eledsec[1-9][0-9][0-9]R - -# glossaries -*.acn -*.acr -*.glg -*.glo -*.gls - -# gnuplottex -*-gnuplottex-* - -# hyperref -*.brf - -# knitr -*-concordance.tex -*.tikz -*-tikzDictionary - -# listings -*.lol +# IPython +profile_default/ +ipython_config.py -# makeidx -*.idx -*.ilg -*.ind -*.ist +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version -# minitoc -*.maf -*.mtc -*.mtc[0-9] -*.mtc[1-9][0-9] +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock -# minted -_minted* -*.pyg +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ -# morewrites -*.mw +# Celery stuff +celerybeat-schedule +celerybeat.pid -# mylatexformat -*.fmt +# SageMath parsed files +*.sage.py -# nomencl -*.nlo - -# sagetex -*.sagetex.sage -*.sagetex.py -*.sagetex.scmd - -# sympy -*.sout -*.sympy -sympy-plots-for-*.tex/ - -#pdfcomment -*.upa -*.upb - -# pythontex -*.pytxcode -pythontex-filse-*/ - -# Texpad -*.texpadtmp +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ -# TikZ & PGF -*.dpth -*.md5 -*.auxlock +# Spyder project settings +.spyderproject +.spyproject -# todonotes -*.tdo +# Rope project settings +.ropeproject -# xindy -*.xdy +# mkdocs documentation +/site -# xypic precompiled matrices -*.xyc +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json -# WinEdt -*.bak -*.sav +# Pyre type checker +.pyre/ -# endfloat -*.ttt -*.fff +# pytype static type analyzer +.pytype/ -# Latexian -TSWLatexianTemp +# Cython debug symbols +cython_debug/ -# Files for initializing subfolders -# Filename.md +# setuptools_scm +src/*/_version.py -# Version that generates html -Web +# ruff +.ruff_cache/ -# Mac system files +# OS specific stuff .DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db -# Emacs automatic backup and hash files +# Common editor files *~ -\#*# - -# Vim swap files *.swp - -# Autogenerated equations -eq - -# Emacs -*.el - -# Particular user scratchwork directories -nate-notes/ - -*_region_*.* - -# VSCode -settings.json -.idea - -# Spyder project settings -.spyderproject -spyproject -.spyproject - -# 20240608: CDC added *private* to avoid accidentally uploading private material -*private* diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d2360c4e3..469485112 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,20 +1,91 @@ -exclude: Documentation/example_notebooks/ +ci: + autoupdate_commit_msg: "chore: update pre-commit hooks" + autofix_commit_msg: "style: pre-commit fixes" + +exclude: ^.cruft.json|.copier-answers.yml$|docs/example_notebooks/ repos: - - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.3.2 + - repo: https://github.com/adamchainz/blacken-docs + rev: "1.18.0" hooks: - - id: ruff - types_or: [ python, pyi, jupyter ] - args: - - --fix - - id: ruff-format - types_or: [ python, pyi, jupyter ] + - id: blacken-docs + additional_dependencies: [black==24.*] - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: "v4.6.0" hooks: + - id: check-added-large-files + - id: check-case-conflict + - id: check-merge-conflict + - id: check-symlinks + # - id: check-yaml + - id: debug-statements - id: end-of-file-fixer - - id: trailing-whitespace + - id: mixed-line-ending + - id: name-tests-test + args: ["--pytest-test-first"] - id: requirements-txt-fixer - exclude: ^examples/ + - id: trailing-whitespace + + - repo: https://github.com/pre-commit/pygrep-hooks + rev: "v1.10.0" + hooks: + - id: rst-backticks + - id: rst-directive-colons + - id: rst-inline-touching-normal + + - repo: https://github.com/rbubley/mirrors-prettier + rev: "v3.3.3" + hooks: + - id: prettier + types_or: [yaml, html, css, scss, javascript, json] + args: [--prose-wrap=always] + + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: "v0.6.1" + hooks: + - id: ruff + types_or: [python, pyi, jupyter] + args: ["--fix"] + - id: ruff-format + types_or: [python, pyi, jupyter] + + # - repo: https://github.com/pre-commit/mirrors-mypy + # rev: "v1.11.1" + # hooks: + # - id: mypy + # files: src|tests + # args: [] + # additional_dependencies: + # - pytest + + # - repo: https://github.com/codespell-project/codespell + # rev: "v2.3.0" + # hooks: + # - id: codespell + + # - repo: https://github.com/shellcheck-py/shellcheck-py + # rev: "v0.10.0.1" + # hooks: + # - id: shellcheck + + # - repo: local + # hooks: + # - id: disallow-caps + # name: Disallow improper capitalization + # language: pygrep + # entry: PyBind|Numpy|Cmake|CCache|Github|PyTest + # exclude: .pre-commit-config.yaml + + - repo: https://github.com/abravalheri/validate-pyproject + rev: "v0.19" + hooks: + - id: validate-pyproject + additional_dependencies: ["validate-pyproject-schema-store[all]"] + + - repo: https://github.com/python-jsonschema/check-jsonschema + rev: "0.29.1" + hooks: + - id: check-dependabot + - id: check-github-workflows + - id: check-readthedocs diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 000000000..67c194c82 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,17 @@ +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +version: 2 + +build: + os: ubuntu-22.04 + tools: + python: "3.12" + commands: + - asdf plugin add uv + - asdf install uv latest + - asdf global uv latest + - uv venv + - uv pip install .[docs] + - .venv/bin/python -m sphinx -T -b html -d docs/_build/doctrees -D + language=en docs $READTHEDOCS_OUTPUT/html diff --git a/Documentation/example_notebooks/Include_list.txt b/Documentation/example_notebooks/Include_list.txt deleted file mode 100644 index 79beabd2c..000000000 --- a/Documentation/example_notebooks/Include_list.txt +++ /dev/null @@ -1,14 +0,0 @@ -examples/Gentle-Intro/Gentle-Intro-To-HARK.ipynb -examples/LifecycleModel/Cycles_tutorial.ipynb -examples/ConsIndShockModel/PerfForesightConsumerType.ipynb -examples/ConsIndShockModel/IndShockConsumerType.ipynb -examples/ConsIndShockModel/KinkedRconsumerType.ipynb -examples/ConsPortfolioModel/example_ConsPortfolioModel.ipynb -examples/GenIncProcessModel/GenIncProcessModel.ipynb -examples/LifecycleModel/LifecycleModel.ipynb -examples/HowWeSolveIndShockConsumerType/HowWeSolveIndShockConsumerType.ipynb -examples/Journeys/Journey-PhD.ipynb -examples/ConsNewKeynesianModel/Transition_Matrix_Example.ipynb -examples/ConsNewKeynesianModel/Jacobian_Example.ipynb -examples/ConsNewKeynesianModel/KS-HARK-presentation.ipynb -examples/ConsNewKeynesianModel/SSJ_example.ipynb \ No newline at end of file diff --git a/Documentation/overview/index.rst b/Documentation/overview/index.rst deleted file mode 100644 index ebbfe66ef..000000000 --- a/Documentation/overview/index.rst +++ /dev/null @@ -1,38 +0,0 @@ -Overview -======== - -.. toctree:: - :caption: Introduction to HARK - :maxdepth: 1 - - introduction - ARKitecture - -.. nbgallery is a wrapper around the toctree directive, see - https://nbsphinx.readthedocs.io/en/latest/a-normal-rst-file.html#thumbnail-galleries - -.. nbgallery:: - :caption: Examples - :maxdepth: 1 - - ../../examples/Gentle-Intro/Gentle-Intro-To-HARK.ipynb - ../../examples/LifecycleModel/Cycles_tutorial.ipynb - ../../examples/ConsIndShockModel/PerfForesightConsumerType.ipynb - ../../examples/ConsIndShockModel/IndShockConsumerType.ipynb - ../../examples/ConsIndShockModel/KinkedRconsumerType.ipynb - ../../examples/ConsPortfolioModel/example_ConsPortfolioModel.ipynb - ../../examples/GenIncProcessModel/GenIncProcessModel.ipynb - ../../examples/LifecycleModel/LifecycleModel.ipynb - ../../examples/HowWeSolveIndShockConsumerType/HowWeSolveIndShockConsumerType.ipynb - ../../examples/Journeys/Journey-PhD.ipynb - ../../examples/ConsNewKeynesianModel/Transition_Matrix_Example.ipynb - ../../examples/ConsNewKeynesianModel/Jacobian_Example.ipynb - ../../examples/ConsNewKeynesianModel/KS-HARK-presentation.ipynb - ../../examples/ConsNewKeynesianModel/SSJ_example.ipynb - -.. toctree:: - :hidden: - :caption: Extras - - ../CHANGELOG - ../license diff --git a/HARK/models/consumer.yaml b/HARK/models/consumer.yaml deleted file mode 100644 index a7a315e45..000000000 --- a/HARK/models/consumer.yaml +++ /dev/null @@ -1,43 +0,0 @@ -# -# A YAML configuration file for the consumption portfolio problem blocks. -# - -calibration: - DiscFac: 0.96 - CRRA: 2.0 - R: 1.03 # can be overriden by portfolio dynamics - Rfree: 1.03 - EqP: 0.02 - LivPrb: 0.98 - PermGroFac: 1.01 - BoroCnstArt: None - TranShkStd: 0.1 - RiskyStd: 0.1 - -blocks: - - &cons_normalized - name: consumption normalized - shocks: - live: !Bernoulli - p: LivPrb - theta: !MeanOneLogNormal - sigma: TranShkStd - dynamics: - b: k * R / PermGroFac - m: b + theta - c: !Control - info: m - a: m - c - - reward: - u: c ** (1 - CRRA) / (1 - CRRA) - - &portfolio_choice - name: portfolio choice - shocks: - risky_return: !Lognormal - mean: Rfree + EqP - std: RiskyStd - dynamics: - stigma: !Control - info: a - R: Rfree + (risky_return - Rfree) * stigma diff --git a/HARK/tests/OpenCLtest.py b/HARK/tests/OpenCLtest.py deleted file mode 100644 index 78fccd458..000000000 --- a/HARK/tests/OpenCLtest.py +++ /dev/null @@ -1,124 +0,0 @@ -""" -Simple test for opencl4py, edited from the example distributed in that package. -""" - -import os - -import numpy as np -import opencl4py as cl - -os.environ["PYOPENCL_CTX"] = ( - "0:0" # This is where you set which devices are in the context -) -# EVERY machine will have a device 0:0 -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 - - # Print all of the platforms and devices to screen - platforms = cl.Platforms() - print("List of all platforms and devices:") - print(platforms.dump_devices()) - print("") - - # Create a context and a queue - ctx = platforms.create_some_context() - queue = ctx.create_queue(ctx.devices[0]) # This is where you choose a device - - # Tell the user about the test that will be run - device_can_use_DP = ("cl_khr_fp64" in queue.device.extensions) or ( - "cl_amd_fp64" in queue.device.extensions - ) - print("Will test OpenCL on " + queue.device.name + ".") - if use_DP and device_can_use_DP: - print("The test will use double precision, which this device can handle.") - elif (not use_DP) and device_can_use_DP: - print( - "The test will use single precision, but the device is capable of double precision." - ) - elif use_DP and (not device_can_use_DP): - print( - "The test would use double precision, but the device is not capable; expect an error." - ) - elif (not use_DP) and (not device_can_use_DP): - print( - "The test will use single precision. This device is not capable of double precision." - ) - print("Test vectors have " + str(N) + " elements each.\n") - - # Define a simple kernel using double precision floating point - 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); - c[i] = (a[i] + b[i]) * k; - } - """ - - # Define a simple kernel using single precision floating point - single_code = """ - __kernel void test(__global const float *a, __global const float *b, - __global float *c, const float k) { - size_t i = get_global_id(0); - c[i] = (a[i] + b[i]) * k; - } - """ - - # Define the kernel using single or double precision as selected above - if use_DP: - my_type = np.float64 - prg = ctx.create_program(double_code) - else: - my_type = np.float32 - prg = ctx.create_program(single_code) - krn = prg.get_kernel("test") - - # Define numpy arrays with arbitrary numbers - a = np.arange(N, dtype=my_type) # Input array a - b = np.arange(N, dtype=my_type) # Input array b - c = np.empty( - N, dtype=my_type - ) # Input array c (which will hold result of calculation) - k = np.array([0.8], dtype=my_type) # Constant scalar - - # Define OpenCL memory buffers, passing appropriate flags and inputs - a_buf = ctx.create_buffer( - cl.CL_MEM_READ_ONLY | cl.CL_MEM_COPY_HOST_PTR, a - ) # Read only, copy values from host, use array a - b_buf = ctx.create_buffer( - cl.CL_MEM_READ_ONLY | cl.CL_MEM_COPY_HOST_PTR, b - ) # Read only, copy values from host, use array b - c_buf = ctx.create_buffer( - cl.CL_MEM_WRITE_ONLY | cl.CL_MEM_ALLOC_HOST_PTR, size=c.nbytes - ) # Write only, allocate memory, use byte size of array c - - # Run the kernel and time it - t_start = time() - krn.set_args( - a_buf, b_buf, c_buf, k[0:1] - ) # Set kernel arguments as the three buffers and a float - queue.execute_kernel( - krn, [N], None - ) # Execute the simple kernel, specifying the global workspace dimensionality and local workspace dimensionality (None uses some default) - queue.read_buffer( - c_buf, c - ) # Read the memory buffer for c into the numpy array for c - t_end = time() - print("OpenCL took " + str(t_end - t_start) + " seconds.") - - # Now do the equivalent work as the kernel, but in Python (and time it) - t_start = time() - truth = (a + b) * k[0] - t_end = time() - print("Python took " + str(t_end - t_start) + " seconds.") - - # Make sure that OpenCL and Python actually agree on their results - max_diff = np.max(np.fabs(c - truth)) - print( - "Maximum difference between OpenCL and Python calculations is " + str(max_diff) - ) diff --git a/LICENSE b/LICENSE index d64569567..bc78a2f35 100644 --- a/LICENSE +++ b/LICENSE @@ -1,202 +1,19 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. +Copyright 2024 Econ-ARK Team + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index c50f2aff0..e30547d30 100644 --- a/README.md +++ b/README.md @@ -7,25 +7,25 @@ [![Anaconda Cloud](https://anaconda.org/conda-forge/econ-ark/badges/version.svg?style=flat)](https://anaconda.org/conda-forge/econ-ark) [![PyPi](https://img.shields.io/pypi/v/econ-ark.png?style=flat)](https://pypi.org/project/econ-ark/) -[![Documentation Status](https://readthedocs.org/projects/hark/badge/?style=flat&version=latest)](https://docs.econ-ark.org/?badge=latest) -[![Code Coverage](https://codecov.io/gh/econ-ark/hark/branch/master/graph/badge.svg)](https://app.codecov.io/gh/econ-ark/hark/branch/master) +[![Documentation Status](https://readthedocs.org/projects/HARK/badge/?style=flat&version=latest)](https://docs.econ-ark.org/?badge=latest) +[![Code Coverage](https://codecov.io/gh/econ-ark/HARK/branch/master/graph/badge.svg)](https://app.codecov.io/gh/econ-ark/HARK/branch/master) [![GitHub Good First Issues](https://img.shields.io/github/issues/econ-ark/HARK/good%20first%20issue.svg)](https://github.com/econ-ark/HARK/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) [![DOI](https://zenodo.org/badge/50448254.svg)](https://zenodo.org/badge/latestdoi/50448254) [![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.org/donate-to-econ-ark) -[![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///9XmsrmZYH1olJXmsr1olJXmsrmZYH1olJXmsr1olJXmsrmZYH1olL1olJXmsr1olJXmsrmZYH1olL1olJXmsrmZYH1olJXmsr1olL1olJXmsrmZYH1ol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.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/d19PUfYeO67Znqtf2KH33Id1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IUfFLqvgUN4C0qNqYs5YhPL+aVZYDE4IpUk57oSFnJm4FyCqqOE0jhY2SMyLFoo56zyo6becOS5UVDdj7Vih0zp+tcMhwRpBeLyqtIjlJKAIZSbI8SGSF3k0pA3mR5tHuwPFoa7N7reoq2bqCsAk1HqCu5uvI1n6JuRXI+S1Mco54YmYTwcn6Aeic+kssXi8XpXC4V3t7/ADuTNKaQJdScAAAAAElFTkSuQmCC)](https://mybinder.org/v2/gh/econ-ark/HARK/master?filepath=examples) @@ -33,9 +33,15 @@ # Heterogeneous Agents Resources and toolKit (HARK) -HARK is a toolkit for the structural modeling of economic choices of optimizing and non-optimizing heterogeneous agents. For more information on using HARK, see the [Econ-ARK Website](https://econ-ark.org). +HARK is a toolkit for the structural modeling of economic choices of optimizing +and non-optimizing heterogeneous agents. For more information on using HARK, see +the [Econ-ARK Website](https://econ-ark.org). -The Econ-ARK project is fiscally sponsored by [NumFOCUS](https://numfocus.org/). Consider making a [tax-deductible donation](https://numfocus.org/donate-to-econ-ark) to help the project pay for developer time, professional services, travel, workshops, and a variety of other needs. +The Econ-ARK project is fiscally sponsored by [NumFOCUS](https://numfocus.org/). +Consider making a +[tax-deductible donation](https://numfocus.org/donate-to-econ-ark) to help the +project pay for developer time, professional services, travel, workshops, and a +variety of other needs.
@@ -48,26 +54,32 @@ The Econ-ARK project is fiscally sponsored by [NumFOCUS](https://numfocus.org/). # Questions/Comments/Help -We have a [Gitter](https://gitter.im) Econ-ARK [community](https://gitter.im/econ-ark/community). +We have a [Gitter](https://gitter.im) Econ-ARK +[community](https://gitter.im/econ-ark/community). # Table of Contents -- [Install](#install) -- [Usage](#usage) -- [Citation](#citation) -- [Support](#support) -- [Release Types](#release-types) -- [Documentation](#Documentation) -- [Introduction](#introduction) - - [For Students: A Gentle Introduction to Hark](#for-students-a-gentle-introduction-to-hark) - - [For Economists: Structural Modeling with Hark](#for-economists-structural-modeling-with-hark) - - [For Computational Economics Developers](#for-computational-economics-developers) -- [Contributing to HARK](#contributing-to-hark) -- [Disclaimer](#disclaimer) +- [Heterogeneous Agents Resources and toolKit (HARK)](#heterogeneous-agents-resources-and-toolkit-hark) +- [Questions/Comments/Help](#questionscommentshelp) +- [Table of Contents](#table-of-contents) + - [Install](#install) + - [Usage](#usage) + - [Citation](#citation) + - [Support](#support) + - [Release Types](#release-types) + - [Documentation](#documentation) + - [Introduction](#introduction) + - [For Students: A Gentle Introduction to HARK](#for-students-a-gentle-introduction-to-hark) + - [For Economists: Structural Modeling with HARK](#for-economists-structural-modeling-with-hark) + - [For Computational Economics Developers](#for-computational-economics-developers) + - [Contributing to HARK](#contributing-to-hark) + - [Disclaimer](#disclaimer) +- [HARK](#hark) ## Install -Install from [Anaconda Cloud](https://docs.anaconda.com/anaconda/install/) by running: +Install from [Anaconda Cloud](https://docs.anaconda.com/anaconda/install/) by +running: `conda install -c conda-forge econ-ark` @@ -77,23 +89,27 @@ Install from [PyPi](https://pypi.org/) by running: ## Usage -We start with almost the simplest possible consumption model: A consumer with CRRA utility +We start with almost the simplest possible consumption model: A consumer with +CRRA utility
- +
has perfect foresight about everything except the (stochastic) date of death. -The agent's problem can be written in [Bellman form](https://en.wikipedia.org/wiki/Bellman_equation) as: +The agent's problem can be written in +[Bellman form](https://en.wikipedia.org/wiki/Bellman_equation) as:
- +

-To model the above problem, start by importing the `PerfForesightConsumerType` model from the appropriate `HARK` module then create an agent instance using the appropriate paramaters: +To model the above problem, start by importing the `PerfForesightConsumerType` +model from the appropriate `HARK` module then create an agent instance using the +appropriate paramaters: ```python import HARK @@ -115,40 +131,53 @@ PF_params = { PFexample = PerfForesightConsumerType(**PF_params) ``` -Once the model is created, ask the the agent to solve the problem with `.solve()`: +Once the model is created, ask the the agent to solve the problem with +`.solve()`: ```python # Tell the agent to solve the problem PFexample.solve() ``` -Solving the problem populates the agent's `.solution` list attribute with solutions to each period of the problem. In the case of an infinite horizon model, there is just one element in the list, at **index-zero**. +Solving the problem populates the agent's `.solution` list attribute with +solutions to each period of the problem. In the case of an infinite horizon +model, there is just one element in the list, at **index-zero**. -You can retrieve the solution's consumption function from the `.cFunc` attribute: +You can retrieve the solution's consumption function from the `.cFunc` +attribute: ```python # Retrieve the consumption function of the solution PFexample.solution[0].cFunc ``` -Or you can retrieve the solved value for human wealth normalized by permanent income from the solution's `.hNrm` attribute: +Or you can retrieve the solved value for human wealth normalized by permanent +income from the solution's `.hNrm` attribute: ```python # Retrieve the solved value for human wealth normalized by permanent income PFexample.solution[0].hNrm ``` -For a detailed explanation of the above example please see the demo notebook [_A Gentle Introduction to HARK_](https://docs.econ-ark.org/examples/Gentle-Intro/Gentle-Intro-To-HARK.html). +For a detailed explanation of the above example please see the demo notebook +[_A Gentle Introduction to HARK_](https://docs.econ-ark.org/examples/Gentle-Intro/Gentle-Intro-To-HARK.html). -For more examples please visit the [examples](https://docs.econ-ark.org/Documentation/overview/index.html) section of the [documentation](https://docs.econ-ark.org/index.html), or the [econ-ark/DemARK](https://github.com/econ-ark/DemARK) repository. +For more examples please visit the +[examples](https://docs.econ-ark.org/docs/overview/index.html) section of the +[documentation](https://docs.econ-ark.org/index.html), or the +[econ-ark/DemARK](https://github.com/econ-ark/DemARK) repository. ## Citation -If using Econ-ARK in your work or research please [cite our Digital Object Identifier](https://doi.org/10.5281/zenodo.1332015) or copy the BibTex below. +If using Econ-ARK in your work or research please +[cite our Digital Object Identifier](https://doi.org/10.5281/zenodo.1332015) or +copy the BibTex below. [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1332015.svg)](https://doi.org/10.5281/zenodo.1332015) -[1] Carroll, Christopher D, Palmer, Nathan, White, Matthew N., Kazil, Jacqueline, Low, David C, & Kaufman, Alexander. (2017, October 3). _econ-ark/HARK_ +[1] Carroll, Christopher D, Palmer, Nathan, White, Matthew N., Kazil, +Jacqueline, Low, David C, & Kaufman, Alexander. (2017, October 3). +_econ-ark/HARK_ **BibText** @@ -164,77 +193,173 @@ If using Econ-ARK in your work or research please [cite our Digital Object Ident } ``` -For more on acknowledging Econ-ARK [visit our website](https://econ-ark.org/acknowledging). +For more on acknowledging Econ-ARK +[visit our website](https://econ-ark.org/acknowledging). ## Support -Looking for help? Please open a [GitHub issue](https://github.com/econ-ark/HARK/issues/new) or reach out to us through the gitter [community](https://gitter.im/econ-ark/community). +Looking for help? Please open a +[GitHub issue](https://github.com/econ-ark/HARK/issues/new) or reach out to us +through the gitter [community](https://gitter.im/econ-ark/community). ## Release Types -- **Current**: Under active development. Code for the Current release is in the branch for its major version number (for example, v0.10.x). -- **Development**: Under active development. Code for the Current release is in the development. +- **Current**: Under active development. Code for the Current release is in the + branch for its major version number (for example, v0.10.x). +- **Development**: Under active development. Code for the Current release is in + the development. -Current releases follow [Semantic Versioning](https://semver.org/). For more information please see the [Release documentation](https://github.com/econ-ark/OverARK/wiki/Release-Management). +Current releases follow [Semantic Versioning](https://semver.org/). For more +information please see the +[Release documentation](https://github.com/econ-ark/OverARK/wiki/Release-Management). ## Documentation -Documentation for the latest release is at [docs.econ-ark.org](https://docs.econ-ark.org/). +Documentation for the latest release is at +[docs.econ-ark.org](https://docs.econ-ark.org/). ## Introduction ### For Students: A Gentle Introduction to HARK -Most of what economists have done so far with 'big data' has been like what Kepler did with astronomical data: Organizing the data, and finding patterns and regularities and interconnections. +Most of what economists have done so far with 'big data' has been like what +Kepler did with astronomical data: Organizing the data, and finding patterns and +regularities and interconnections. -An alternative approach called 'structural modeling' aims to do, for economic data, what Newton did for astronomical data: Provide a deep and rigorous mathematical (or computational) framework that distills the essence of the underlying behavior that produces the 'big data.' +An alternative approach called 'structural modeling' aims to do, for economic +data, what Newton did for astronomical data: Provide a deep and rigorous +mathematical (or computational) framework that distills the essence of the +underlying behavior that produces the 'big data.' -The notebook [_A Gentle Introduction to HARK_](https://mybinder.org/v2/gh/econ-ark/DemARK/master?filepath=notebooks/Gentle-Intro-To-HARK-PerfForesightCRRA.ipynb) details how you can easily utilize our toolkit for structural modeling. Starting with a simple [Perfect Foresight Model](https://en.wikipedia.org/wiki/Rational_expectations) we solve an agent problem, then experiment with adding [income shocks]() and changing constructed attributes. +The notebook +[_A Gentle Introduction to HARK_](https://mybinder.org/v2/gh/econ-ark/DemARK/master?filepath=notebooks/Gentle-Intro-To-HARK-PerfForesightCRRA.ipynb) +details how you can easily utilize our toolkit for structural modeling. Starting +with a simple +[Perfect Foresight Model](https://en.wikipedia.org/wiki/Rational_expectations) +we solve an agent problem, then experiment with adding +[income shocks]() and changing +constructed attributes. ### For Economists: Structural Modeling with HARK -Dissatisfaction with the ability of Representative Agent models to answer important questions raised by the Great Recession has led to a strong movement in the macroeconomics literature toward 'Heterogeneous Agent' models, in which microeconomic agents (consumers; firms) solve a structural problem calibrated to match microeconomic data; aggregate outcomes are derived by explicitly simulating the equilibrium behavior of populations solving such models. - -The same kinds of modeling techniques are also gaining popularity among microeconomists, in areas ranging from labor economics to industrial organization. In both macroeconomics and structural micro, the chief barrier to the wide adoption of these techniques has been that programming a structural model has, until now, required a great deal of specialized knowledge and custom software development. - -HARK provides a robust, well-designed, open-source toolkit for building such models much more efficiently than has been possible in the past. - -Our [_DCEGM Upper Envelope_](https://mybinder.org/v2/gh/econ-ark/DemARK/master?filepath=notebooks%2FDCEGM-Upper-Envelope.ipynb) notebook illustrates using HARK to replicate the [Iskhakov, Jørgensen, Rust, and Schjerning paper](https://onlinelibrary.wiley.com/doi/abs/10.3982/QE643) for solving the discrete-continuous retirement saving problem. - -The notebook [_Making Structural Estimates From Empirical Results_](https://mybinder.org/v2/gh/econ-ark/DemARK/master?filepath=notebooks%2FStructural-Estimates-From-Empirical-MPCs-Fagereng-et-al.ipynb) is another demonstration of using HARK to conduct a quick structural estimation based on Table 9 of [_MPC Heterogeneity and Household Balance Sheets_ by Fagereng, Holm, and Natvik](https://www.ssb.no/en/forskning/discussion-papers/_attachment/286054?_ts=158af859c98). +Dissatisfaction with the ability of Representative Agent models to answer +important questions raised by the Great Recession has led to a strong movement +in the macroeconomics literature toward 'Heterogeneous Agent' models, in which +microeconomic agents (consumers; firms) solve a structural problem calibrated to +match microeconomic data; aggregate outcomes are derived by explicitly +simulating the equilibrium behavior of populations solving such models. + +The same kinds of modeling techniques are also gaining popularity among +microeconomists, in areas ranging from labor economics to industrial +organization. In both macroeconomics and structural micro, the chief barrier to +the wide adoption of these techniques has been that programming a structural +model has, until now, required a great deal of specialized knowledge and custom +software development. + +HARK provides a robust, well-designed, open-source toolkit for building such +models much more efficiently than has been possible in the past. + +Our +[_DCEGM Upper Envelope_](https://mybinder.org/v2/gh/econ-ark/DemARK/master?filepath=notebooks%2FDCEGM-Upper-Envelope.ipynb) +notebook illustrates using HARK to replicate the +[Iskhakov, Jørgensen, Rust, and Schjerning paper](https://onlinelibrary.wiley.com/doi/abs/10.3982/QE643) +for solving the discrete-continuous retirement saving problem. + +The notebook +[_Making Structural Estimates From Empirical Results_](https://mybinder.org/v2/gh/econ-ark/DemARK/master?filepath=notebooks%2FStructural-Estimates-From-Empirical-MPCs-Fagereng-et-al.ipynb) +is another demonstration of using HARK to conduct a quick structural estimation +based on Table 9 of +[_MPC Heterogeneity and Household Balance Sheets_ by Fagereng, Holm, and Natvik](https://www.ssb.no/en/forskning/discussion-papers/_attachment/286054?_ts=158af859c98). ### For Computational Economics Developers -HARK provides a modular and extensible open-source toolkit for solving heterogeneous-agent partial-and general-equilibrium structural models. The code for such models has always been handcrafted, idiosyncratic, poorly documented, and sometimes not generously shared from leading researchers to outsiders. The result being that it can take years for a new researcher to become proficient. By building an integrated system from the bottom up using object-oriented programming techniques and other tools, we aim to provide a platform that will become a focal point for people using such models. - -HARK is written in Python, making significant use of libraries such as numpy and scipy which offer a wide array of mathematical and statistical functions and tools. Our modules are generally categorized into Tools (mathematical functions and techniques), Models (particular economic models and solvers) and Applications (use of tools to simulate an economic phenomenon). - -For more information on how you can create your own Models or use Tools and Model to create Applications please see the [documentation](https://docs.econ-ark.org/Documentation/guides/quick_start.html#for-other-developers-of-software-for-computational-economics) +HARK provides a modular and extensible open-source toolkit for solving +heterogeneous-agent partial-and general-equilibrium structural models. The code +for such models has always been handcrafted, idiosyncratic, poorly documented, +and sometimes not generously shared from leading researchers to outsiders. The +result being that it can take years for a new researcher to become proficient. +By building an integrated system from the bottom up using object-oriented +programming techniques and other tools, we aim to provide a platform that will +become a focal point for people using such models. + +HARK is written in Python, making significant use of libraries such as numpy and +scipy which offer a wide array of mathematical and statistical functions and +tools. Our modules are generally categorized into Tools (mathematical functions +and techniques), Models (particular economic models and solvers) and +Applications (use of tools to simulate an economic phenomenon). + +For more information on how you can create your own Models or use Tools and +Model to create Applications please see the +[documentation](https://docs.econ-ark.org/docs/guides/quick_start.html#for-other-developers-of-software-for-computational-economics) ### Contributing to HARK -**We want contributing to Econ-ARK to be fun, enjoyable, and educational for anyone, and everyone.** +**We want contributing to Econ-ARK to be fun, enjoyable, and educational for +anyone, and everyone.** -Contributions go far beyond pull requests and commits. Although we love giving you the opportunity to put your stamp on HARK, we are also thrilled to receive a variety of other contributions including: +Contributions go far beyond pull requests and commits. Although we love giving +you the opportunity to put your stamp on HARK, we are also thrilled to receive a +variety of other contributions including: - Documentation updates, enhancements, designs, or bugfixes - Spelling or grammar fixes - REAME.md corrections or redesigns - Adding unit, or functional tests -- [Triaging GitHub issues](https://github.com/econ-ark/HARK/issues?utf8=%E2%9C%93&q=label%3A%E2%80%9DTag%3A+Triage+Needed%E2%80%9D+) -- e.g. pointing out the relevant files, checking for reproducibility -- [Searching for #econ-ark on twitter](https://twitter.com/search?q=econ-ark) and helping someone else who needs help -- Answering questions from StackOverflow tagged with [econ-ark](https://stackoverflow.com/questions/tagged/econ-ark) +- [Triaging GitHub issues](https://github.com/econ-ark/HARK/issues?utf8=%E2%9C%93&q=label%3A%E2%80%9DTag%3A+Triage+Needed%E2%80%9D+) + -- e.g. pointing out the relevant files, checking for reproducibility +- [Searching for #econ-ark on twitter](https://twitter.com/search?q=econ-ark) + and helping someone else who needs help +- Answering questions from StackOverflow tagged with + [econ-ark](https://stackoverflow.com/questions/tagged/econ-ark) - Teaching others how to contribute to HARK - Blogging, speaking about, or creating tutorials about HARK - Helping others in our mailing list -If you are worried or don’t know how to start, you can always reach out to us through the gitter [community](https://gitter.im/econ-ark/community)(#tsc-technical-steering-committee) or simply submit [an issue](https://github.com/econ-ark/HARK/issues/new) and a member can help give you guidance! +If you are worried or don’t know how to start, you can always reach out to us +through the gitter +[community](https://gitter.im/econ-ark/community)(#tsc-technical-steering-committee) +or simply submit [an issue](https://github.com/econ-ark/HARK/issues/new) and a +member can help give you guidance! -To install for development see the [Quickstart Guide](https://docs.econ-ark.org/Documentation/guides/installation.html). +To install for development see the +[Quickstart Guide](https://docs.econ-ark.org/docs/guides/installation.html). -For more information on contributing to HARK please see [the contributing guide](https://docs.econ-ark.org/Documentation/guides/contributing.html). +For more information on contributing to HARK please see +[the contributing guide](https://docs.econ-ark.org/docs/guides/contributing.html). This is the guide that collaborators follow in maintaining the Econ-ARK project. ## Disclaimer -This is a beta version of HARK. The code has not been extensively tested as it should be. We hope it is useful, but there are absolutely no guarantees (expressed or implied) that it works or will do what you want. Use at your own risk. And please, let us know if you find bugs by posting an issue to [the GitHub page](https://github.com/econ-ark/HARK)! +This is a beta version of HARK. The code has not been extensively tested as it +should be. We hope it is useful, but there are absolutely no guarantees +(expressed or implied) that it works or will do what you want. Use at your own +risk. And please, let us know if you find bugs by posting an issue to +[the GitHub page](https://github.com/econ-ark/HARK)! + +# HARK + +[![Actions Status][actions-badge]][actions-link] +[![Documentation Status][rtd-badge]][rtd-link] + +[![PyPI version][pypi-version]][pypi-link] +[![Conda-Forge][conda-badge]][conda-link] +[![PyPI platforms][pypi-platforms]][pypi-link] + +[![GitHub Discussion][github-discussions-badge]][github-discussions-link] + + + + +[actions-badge]: https://github.com/econ-ark/HARK/workflows/CI/badge.svg +[actions-link]: https://github.com/econ-ark/HARK/actions +[conda-badge]: https://img.shields.io/conda/vn/conda-forge/HARK +[conda-link]: https://github.com/conda-forge/HARK-feedstock +[github-discussions-badge]: https://img.shields.io/static/v1?label=Discussions&message=Ask&color=blue&logo=github +[github-discussions-link]: https://github.com/econ-ark/HARK/discussions +[pypi-link]: https://pypi.org/project/HARK/ +[pypi-platforms]: https://img.shields.io/pypi/pyversions/HARK +[pypi-version]: https://img.shields.io/pypi/v/HARK +[rtd-badge]: https://readthedocs.org/projects/HARK/badge/?version=latest +[rtd-link]: https://HARK.readthedocs.io/en/latest/?badge=latest + + diff --git a/binder/requirements.txt b/binder/requirements.txt index ed0b97cfd..dbe2efb6d 100644 --- a/binder/requirements.txt +++ b/binder/requirements.txt @@ -1,2 +1,2 @@ -git+https://github.com/econ-ark/hark@master +git+https://github.com/econ-ark/HARK@master sequence_jacobian # required for KS-HARK-presentation example diff --git a/Documentation/CHANGELOG.md b/docs/CHANGELOG.md similarity index 100% rename from Documentation/CHANGELOG.md rename to docs/CHANGELOG.md diff --git a/Documentation/ConsumptionSavingModels.pdf b/docs/ConsumptionSavingModels.pdf similarity index 100% rename from Documentation/ConsumptionSavingModels.pdf rename to docs/ConsumptionSavingModels.pdf diff --git a/Documentation/Makefile b/docs/Makefile similarity index 99% rename from Documentation/Makefile rename to docs/Makefile index 8b3253ba8..27170c870 100644 --- a/Documentation/Makefile +++ b/docs/Makefile @@ -111,7 +111,7 @@ applehelp: @echo @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." @echo "N.B. You won't be able to view it unless you put it in" \ - "~/Library/Documentation/Help or install it in your application" \ + "~/Library/docs/Help or install it in your application" \ "bundle." .PHONY: devhelp diff --git a/docs/NARK.pdf b/docs/NARK.pdf new file mode 100644 index 000000000..2fd435568 Binary files /dev/null and b/docs/NARK.pdf differ diff --git a/docs/Style.tex.txt b/docs/Style.tex.txt new file mode 100644 index 000000000..f30161231 --- /dev/null +++ b/docs/Style.tex.txt @@ -0,0 +1 @@ +HARK/docs/NARK/@resources/texlive/texmf-local/tex/latex/tex4ht HARK/docs/NARK/@resources/texlive/texmf-local/tex/latex/econark-make4ht.sty HARK/docs/NARK/@resources/texlive/texmf-local/tex/latex/econark-multibib.sty HARK/docs/NARK/@resources/texlive/texmf-local/tex/latex/econark-onlyinsubfile.sty HARK/docs/NARK/@resources/texlive/texmf-local/tex/latex/econark-titlepage.sty HARK/docs/NARK/@resources/texlive/texmf-local/tex/latex/econark.cls HARK/docs/NARK/@resources/texlive/texmf-local/tex/latex/econark.sty HARK/docs/NARK/@resources/texlive/texmf-local/tex/latex/llorracc-handouts.sty HARK/docs/NARK/@resources/texlive/texmf-local/tex/latex/pdfsuppressruntime.sty HARK/docs/NARK/@resources/texlive/texmf-local/tex/latex/README.md diff --git a/Documentation/conf.py b/docs/conf.py similarity index 82% rename from Documentation/conf.py rename to docs/conf.py index 80da04210..73a122ad1 100644 --- a/Documentation/conf.py +++ b/docs/conf.py @@ -1,3 +1,6 @@ +from __future__ import annotations + +import importlib.metadata import warnings from datetime import date import os @@ -20,9 +23,9 @@ # Project information project = "HARK" -copyright = f"{date.today().year}, Econ-ARK team" -author = "Econ-ARK team" -version = release = "latest" +copyright = f"{date.today().year}, Econ-ARK Team" +author = "Econ-ARK Team" +version = release = importlib.metadata.version("econ-ark") # General configuration extensions = [ @@ -42,24 +45,20 @@ "myst_parser", "sphinx_copybutton", "sphinx_design", + "sphinx_autodoc_typehints", ] -include_patterns = [ - "Documentation**", - "index.rst", -] # Makes sure that only the file we want documented get documented -with open(os.path.join(dir, "example_notebooks", "Include_list.txt"), "r") as file: - include_patterns += file.readlines() -include_patterns = [ - i.replace("\n", "") for i in include_patterns -] # Adds example notebooks +source_suffix = [".rst", ".md"] +# Prevents sphinx from getting confused exclude_patterns = [ - "Documentation/_build", - "Documentation/Thumbs.db", - "Documentation/.DS_Store", - "Documentation/NARK", - "Documentation/index_core.rst", # Prevents sphinx from getting confused + "_build", + "**.ipynb_checkpoints", + "Thumbs.db", + ".DS_Store", + ".env", + ".venv", + "NARK", ] napoleon_custom_sections = [ @@ -79,11 +78,6 @@ pygments_style = "sphinx" -source_suffix = [ - ".rst", - ".md", -] - # HTML writer configuration html_theme = "pydata_sphinx_theme" html_static_path = [] @@ -137,16 +131,16 @@
Download notebook.
""" -myst_enable_extensions = [ - "colon_fence", -] + +myst_enable_extensions = ["colon_fence"] + # Point to Econ-ARK repo for edit buttons html_context = { "github_url": "https://github.com", "github_user": "econ-ark", - "github_repo": "hark", + "github_repo": "HARK", "github_version": "master", - "doc_path": "Documentation/", + "doc_path": "docs/", } # Use Econ-ARK URL to host the website @@ -159,9 +153,16 @@ # sphinx.ext.intersphinx configuration intersphinx_mapping = { - "python": ("https://docs.python.org/3/", None), + "python": ("https://docs.python.org/3", None), } +nitpick_ignore = [ + ("py:class", "_io.StringIO"), + ("py:class", "_io.BytesIO"), +] + +always_document_param_types = True + # sphinx.ext.autodoc configuration autodoc_default_flags = ["members"] # must add outside ']' bracket diff --git a/examples/Blocks/Model Setup Demo.ipynb b/docs/examples/Blocks/Model Setup Demo.ipynb similarity index 100% rename from examples/Blocks/Model Setup Demo.ipynb rename to docs/examples/Blocks/Model Setup Demo.ipynb diff --git a/examples/Calibration/Income_calibrations.ipynb b/docs/examples/Calibration/Income_calibrations.ipynb similarity index 100% rename from examples/Calibration/Income_calibrations.ipynb rename to docs/examples/Calibration/Income_calibrations.ipynb diff --git a/examples/Calibration/Life_Cycle_example.ipynb b/docs/examples/Calibration/Life_Cycle_example.ipynb similarity index 100% rename from examples/Calibration/Life_Cycle_example.ipynb rename to docs/examples/Calibration/Life_Cycle_example.ipynb diff --git a/examples/Calibration/SCF_distributions.ipynb b/docs/examples/Calibration/SCF_distributions.ipynb similarity index 100% rename from examples/Calibration/SCF_distributions.ipynb rename to docs/examples/Calibration/SCF_distributions.ipynb diff --git a/examples/Calibration/Sabelhaus_Song_var_profiles.ipynb b/docs/examples/Calibration/Sabelhaus_Song_var_profiles.ipynb similarity index 100% rename from examples/Calibration/Sabelhaus_Song_var_profiles.ipynb rename to docs/examples/Calibration/Sabelhaus_Song_var_profiles.ipynb diff --git a/examples/Calibration/US_SSA_life_tables.ipynb b/docs/examples/Calibration/US_SSA_life_tables.ipynb similarity index 100% rename from examples/Calibration/US_SSA_life_tables.ipynb rename to docs/examples/Calibration/US_SSA_life_tables.ipynb diff --git a/examples/ConsBequestModel/example_AccidentalBequestComp.ipynb b/docs/examples/ConsBequestModel/example_AccidentalBequestComp.ipynb similarity index 100% rename from examples/ConsBequestModel/example_AccidentalBequestComp.ipynb rename to docs/examples/ConsBequestModel/example_AccidentalBequestComp.ipynb diff --git a/examples/ConsBequestModel/example_AccidentalBequestPortComp.ipynb b/docs/examples/ConsBequestModel/example_AccidentalBequestPortComp.ipynb similarity index 100% rename from examples/ConsBequestModel/example_AccidentalBequestPortComp.ipynb rename to docs/examples/ConsBequestModel/example_AccidentalBequestPortComp.ipynb diff --git a/examples/ConsBequestModel/example_TerminalBequest.ipynb b/docs/examples/ConsBequestModel/example_TerminalBequest.ipynb similarity index 100% rename from examples/ConsBequestModel/example_TerminalBequest.ipynb rename to docs/examples/ConsBequestModel/example_TerminalBequest.ipynb diff --git a/examples/ConsBequestModel/example_TerminalBequestPort.ipynb b/docs/examples/ConsBequestModel/example_TerminalBequestPort.ipynb similarity index 100% rename from examples/ConsBequestModel/example_TerminalBequestPort.ipynb rename to docs/examples/ConsBequestModel/example_TerminalBequestPort.ipynb diff --git a/examples/ConsBequestModel/example_WarmGlowBequest.ipynb b/docs/examples/ConsBequestModel/example_WarmGlowBequest.ipynb similarity index 100% rename from examples/ConsBequestModel/example_WarmGlowBequest.ipynb rename to docs/examples/ConsBequestModel/example_WarmGlowBequest.ipynb diff --git a/examples/ConsBequestModel/example_WarmGlowBequestPort.ipynb b/docs/examples/ConsBequestModel/example_WarmGlowBequestPort.ipynb similarity index 100% rename from examples/ConsBequestModel/example_WarmGlowBequestPort.ipynb rename to docs/examples/ConsBequestModel/example_WarmGlowBequestPort.ipynb diff --git a/examples/ConsBequestModel/example_WealthPortfolio.ipynb b/docs/examples/ConsBequestModel/example_WealthPortfolio.ipynb similarity index 100% rename from examples/ConsBequestModel/example_WealthPortfolio.ipynb rename to docs/examples/ConsBequestModel/example_WealthPortfolio.ipynb diff --git a/examples/ConsIndShockModel/Finite Cyclical Test.ipynb b/docs/examples/ConsIndShockModel/Finite Cyclical Test.ipynb similarity index 100% rename from examples/ConsIndShockModel/Finite Cyclical Test.ipynb rename to docs/examples/ConsIndShockModel/Finite Cyclical Test.ipynb diff --git a/examples/ConsIndShockModel/IndShockConsumerType.ipynb b/docs/examples/ConsIndShockModel/IndShockConsumerType.ipynb similarity index 100% rename from examples/ConsIndShockModel/IndShockConsumerType.ipynb rename to docs/examples/ConsIndShockModel/IndShockConsumerType.ipynb diff --git a/examples/ConsIndShockModel/KinkedRconsumerType.ipynb b/docs/examples/ConsIndShockModel/KinkedRconsumerType.ipynb similarity index 100% rename from examples/ConsIndShockModel/KinkedRconsumerType.ipynb rename to docs/examples/ConsIndShockModel/KinkedRconsumerType.ipynb diff --git a/examples/ConsIndShockModel/PerfForesightConsumerType.ipynb b/docs/examples/ConsIndShockModel/PerfForesightConsumerType.ipynb similarity index 100% rename from examples/ConsIndShockModel/PerfForesightConsumerType.ipynb rename to docs/examples/ConsIndShockModel/PerfForesightConsumerType.ipynb diff --git a/examples/ConsIndShockModel/latexdefs.tex b/docs/examples/ConsIndShockModel/latexdefs.tex similarity index 100% rename from examples/ConsIndShockModel/latexdefs.tex rename to docs/examples/ConsIndShockModel/latexdefs.tex diff --git a/examples/ConsNewKeynesianModel/Jacobian_Example.ipynb b/docs/examples/ConsNewKeynesianModel/Jacobian_Example.ipynb similarity index 100% rename from examples/ConsNewKeynesianModel/Jacobian_Example.ipynb rename to docs/examples/ConsNewKeynesianModel/Jacobian_Example.ipynb diff --git a/examples/ConsNewKeynesianModel/KS-HARK-presentation.ipynb b/docs/examples/ConsNewKeynesianModel/KS-HARK-presentation.ipynb similarity index 100% rename from examples/ConsNewKeynesianModel/KS-HARK-presentation.ipynb rename to docs/examples/ConsNewKeynesianModel/KS-HARK-presentation.ipynb diff --git a/examples/ConsNewKeynesianModel/KS_DAG.jpeg b/docs/examples/ConsNewKeynesianModel/KS_DAG.jpeg similarity index 100% rename from examples/ConsNewKeynesianModel/KS_DAG.jpeg rename to docs/examples/ConsNewKeynesianModel/KS_DAG.jpeg diff --git a/examples/ConsNewKeynesianModel/SSJ_example.ipynb b/docs/examples/ConsNewKeynesianModel/SSJ_example.ipynb similarity index 100% rename from examples/ConsNewKeynesianModel/SSJ_example.ipynb rename to docs/examples/ConsNewKeynesianModel/SSJ_example.ipynb diff --git a/examples/ConsNewKeynesianModel/SSJ_explanation.ipynb b/docs/examples/ConsNewKeynesianModel/SSJ_explanation.ipynb similarity index 100% rename from examples/ConsNewKeynesianModel/SSJ_explanation.ipynb rename to docs/examples/ConsNewKeynesianModel/SSJ_explanation.ipynb diff --git a/examples/ConsNewKeynesianModel/Transition_Matrix_Example.ipynb b/docs/examples/ConsNewKeynesianModel/Transition_Matrix_Example.ipynb similarity index 100% rename from examples/ConsNewKeynesianModel/Transition_Matrix_Example.ipynb rename to docs/examples/ConsNewKeynesianModel/Transition_Matrix_Example.ipynb diff --git a/HARK/Calibration/Income/__init__.py b/docs/examples/ConsNewKeynesianModel/estimation/__init__.py similarity index 100% rename from HARK/Calibration/Income/__init__.py rename to docs/examples/ConsNewKeynesianModel/estimation/__init__.py diff --git a/examples/ConsNewKeynesianModel/estimation/create_data.py b/docs/examples/ConsNewKeynesianModel/estimation/create_data.py similarity index 100% rename from examples/ConsNewKeynesianModel/estimation/create_data.py rename to docs/examples/ConsNewKeynesianModel/estimation/create_data.py diff --git a/examples/ConsNewKeynesianModel/estimation/model.py b/docs/examples/ConsNewKeynesianModel/estimation/model.py similarity index 100% rename from examples/ConsNewKeynesianModel/estimation/model.py rename to docs/examples/ConsNewKeynesianModel/estimation/model.py diff --git a/examples/ConsNewKeynesianModel/estimation/plots.py b/docs/examples/ConsNewKeynesianModel/estimation/plots.py similarity index 100% rename from examples/ConsNewKeynesianModel/estimation/plots.py rename to docs/examples/ConsNewKeynesianModel/estimation/plots.py diff --git a/examples/ConsNewKeynesianModel/estimation/routines.py b/docs/examples/ConsNewKeynesianModel/estimation/routines.py similarity index 100% rename from examples/ConsNewKeynesianModel/estimation/routines.py rename to docs/examples/ConsNewKeynesianModel/estimation/routines.py diff --git a/examples/ConsNewKeynesianModel/estimation/us_data.csv b/docs/examples/ConsNewKeynesianModel/estimation/us_data.csv similarity index 100% rename from examples/ConsNewKeynesianModel/estimation/us_data.csv rename to docs/examples/ConsNewKeynesianModel/estimation/us_data.csv diff --git a/examples/ConsPortfolioModel/example_ConsPortfolioModel.ipynb b/docs/examples/ConsPortfolioModel/example_ConsPortfolioModel.ipynb similarity index 100% rename from examples/ConsPortfolioModel/example_ConsPortfolioModel.ipynb rename to docs/examples/ConsPortfolioModel/example_ConsPortfolioModel.ipynb diff --git a/examples/ConsPortfolioModel/example_ConsRiskyAssetModel.ipynb b/docs/examples/ConsPortfolioModel/example_ConsRiskyAssetModel.ipynb similarity index 100% rename from examples/ConsPortfolioModel/example_ConsRiskyAssetModel.ipynb rename to docs/examples/ConsPortfolioModel/example_ConsRiskyAssetModel.ipynb diff --git a/examples/ConsPortfolioModel/example_ConsSequentialPortfolioModel.ipynb b/docs/examples/ConsPortfolioModel/example_ConsSequentialPortfolioModel.ipynb similarity index 100% rename from examples/ConsPortfolioModel/example_ConsSequentialPortfolioModel.ipynb rename to docs/examples/ConsPortfolioModel/example_ConsSequentialPortfolioModel.ipynb diff --git a/examples/ConsumptionSaving/example_ConsAggShockModel.ipynb b/docs/examples/ConsumptionSaving/example_ConsAggShockModel.ipynb similarity index 100% rename from examples/ConsumptionSaving/example_ConsAggShockModel.ipynb rename to docs/examples/ConsumptionSaving/example_ConsAggShockModel.ipynb diff --git a/examples/ConsumptionSaving/example_ConsGenIncProcessModel.ipynb b/docs/examples/ConsumptionSaving/example_ConsGenIncProcessModel.ipynb similarity index 100% rename from examples/ConsumptionSaving/example_ConsGenIncProcessModel.ipynb rename to docs/examples/ConsumptionSaving/example_ConsGenIncProcessModel.ipynb diff --git a/examples/ConsumptionSaving/example_ConsIndShock.ipynb b/docs/examples/ConsumptionSaving/example_ConsIndShock.ipynb similarity index 100% rename from examples/ConsumptionSaving/example_ConsIndShock.ipynb rename to docs/examples/ConsumptionSaving/example_ConsIndShock.ipynb diff --git a/examples/ConsumptionSaving/example_ConsLaborModel.ipynb b/docs/examples/ConsumptionSaving/example_ConsLaborModel.ipynb similarity index 100% rename from examples/ConsumptionSaving/example_ConsLaborModel.ipynb rename to docs/examples/ConsumptionSaving/example_ConsLaborModel.ipynb diff --git a/examples/ConsumptionSaving/example_ConsMarkovModel.ipynb b/docs/examples/ConsumptionSaving/example_ConsMarkovModel.ipynb similarity index 100% rename from examples/ConsumptionSaving/example_ConsMarkovModel.ipynb rename to docs/examples/ConsumptionSaving/example_ConsMarkovModel.ipynb diff --git a/examples/ConsumptionSaving/example_ConsMedModel.ipynb b/docs/examples/ConsumptionSaving/example_ConsMedModel.ipynb similarity index 100% rename from examples/ConsumptionSaving/example_ConsMedModel.ipynb rename to docs/examples/ConsumptionSaving/example_ConsMedModel.ipynb diff --git a/examples/ConsumptionSaving/example_ConsPrefShockModel.ipynb b/docs/examples/ConsumptionSaving/example_ConsPrefShockModel.ipynb similarity index 100% rename from examples/ConsumptionSaving/example_ConsPrefShockModel.ipynb rename to docs/examples/ConsumptionSaving/example_ConsPrefShockModel.ipynb diff --git a/examples/ConsumptionSaving/example_ConsRepAgentModel.ipynb b/docs/examples/ConsumptionSaving/example_ConsRepAgentModel.ipynb similarity index 100% rename from examples/ConsumptionSaving/example_ConsRepAgentModel.ipynb rename to docs/examples/ConsumptionSaving/example_ConsRepAgentModel.ipynb diff --git a/examples/ConsumptionSaving/example_ConsRiskyContribModel.ipynb b/docs/examples/ConsumptionSaving/example_ConsRiskyContribModel.ipynb similarity index 100% rename from examples/ConsumptionSaving/example_ConsRiskyContribModel.ipynb rename to docs/examples/ConsumptionSaving/example_ConsRiskyContribModel.ipynb diff --git a/examples/ConsumptionSaving/example_TractableBufferStockModel.ipynb b/docs/examples/ConsumptionSaving/example_TractableBufferStockModel.ipynb similarity index 100% rename from examples/ConsumptionSaving/example_TractableBufferStockModel.ipynb rename to docs/examples/ConsumptionSaving/example_TractableBufferStockModel.ipynb diff --git a/examples/Distributions/DiscreteDistributionLabeled.ipynb b/docs/examples/Distributions/DiscreteDistributionLabeled.ipynb similarity index 100% rename from examples/Distributions/DiscreteDistributionLabeled.ipynb rename to docs/examples/Distributions/DiscreteDistributionLabeled.ipynb diff --git a/examples/Distributions/EquiprobableLognormal.ipynb b/docs/examples/Distributions/EquiprobableLognormal.ipynb similarity index 100% rename from examples/Distributions/EquiprobableLognormal.ipynb rename to docs/examples/Distributions/EquiprobableLognormal.ipynb diff --git a/examples/Distributions/ExpectedValue.ipynb b/docs/examples/Distributions/ExpectedValue.ipynb similarity index 100% rename from examples/Distributions/ExpectedValue.ipynb rename to docs/examples/Distributions/ExpectedValue.ipynb diff --git a/examples/Estimation/Method of Simulated Moments.ipynb b/docs/examples/Estimation/Method of Simulated Moments.ipynb similarity index 100% rename from examples/Estimation/Method of Simulated Moments.ipynb rename to docs/examples/Estimation/Method of Simulated Moments.ipynb diff --git a/examples/GenIncProcessModel/GenIncProcessModel.ipynb b/docs/examples/GenIncProcessModel/GenIncProcessModel.ipynb similarity index 100% rename from examples/GenIncProcessModel/GenIncProcessModel.ipynb rename to docs/examples/GenIncProcessModel/GenIncProcessModel.ipynb diff --git a/examples/Gentle-Intro/Gentle-Intro-To-HARK.ipynb b/docs/examples/Gentle-Intro/Gentle-Intro-To-HARK.ipynb similarity index 100% rename from examples/Gentle-Intro/Gentle-Intro-To-HARK.ipynb rename to docs/examples/Gentle-Intro/Gentle-Intro-To-HARK.ipynb diff --git a/examples/HowWeSolveIndShockConsumerType/HowWeSolveIndShockConsumerType.ipynb b/docs/examples/HowWeSolveIndShockConsumerType/HowWeSolveIndShockConsumerType.ipynb similarity index 100% rename from examples/HowWeSolveIndShockConsumerType/HowWeSolveIndShockConsumerType.ipynb rename to docs/examples/HowWeSolveIndShockConsumerType/HowWeSolveIndShockConsumerType.ipynb diff --git a/examples/Interpolation/CubicInterp.ipynb b/docs/examples/Interpolation/CubicInterp.ipynb similarity index 100% rename from examples/Interpolation/CubicInterp.ipynb rename to docs/examples/Interpolation/CubicInterp.ipynb diff --git a/examples/Interpolation/DecayInterp.ipynb b/docs/examples/Interpolation/DecayInterp.ipynb similarity index 100% rename from examples/Interpolation/DecayInterp.ipynb rename to docs/examples/Interpolation/DecayInterp.ipynb diff --git a/examples/Journeys/AzureMachineLearning.ipynb b/docs/examples/Journeys/AzureMachineLearning.ipynb similarity index 100% rename from examples/Journeys/AzureMachineLearning.ipynb rename to docs/examples/Journeys/AzureMachineLearning.ipynb diff --git a/examples/Journeys/HAFiscalFig1.png b/docs/examples/Journeys/HAFiscalFig1.png similarity index 100% rename from examples/Journeys/HAFiscalFig1.png rename to docs/examples/Journeys/HAFiscalFig1.png diff --git a/examples/Journeys/HARK-ind-sh.png b/docs/examples/Journeys/HARK-ind-sh.png similarity index 100% rename from examples/Journeys/HARK-ind-sh.png rename to docs/examples/Journeys/HARK-ind-sh.png diff --git a/examples/Journeys/HARK-struct-2.png b/docs/examples/Journeys/HARK-struct-2.png similarity index 100% rename from examples/Journeys/HARK-struct-2.png rename to docs/examples/Journeys/HARK-struct-2.png diff --git a/examples/Journeys/HARK-struct-3.png b/docs/examples/Journeys/HARK-struct-3.png similarity index 100% rename from examples/Journeys/HARK-struct-3.png rename to docs/examples/Journeys/HARK-struct-3.png diff --git a/examples/Journeys/HARK-struct-4.png b/docs/examples/Journeys/HARK-struct-4.png similarity index 100% rename from examples/Journeys/HARK-struct-4.png rename to docs/examples/Journeys/HARK-struct-4.png diff --git a/examples/Journeys/Journey-Engineering-Background.ipynb b/docs/examples/Journeys/Journey-Engineering-Background.ipynb similarity index 100% rename from examples/Journeys/Journey-Engineering-Background.ipynb rename to docs/examples/Journeys/Journey-Engineering-Background.ipynb diff --git a/docs/examples/Journeys/Journey-PhD.ipynb b/docs/examples/Journeys/Journey-PhD.ipynb new file mode 100644 index 000000000..9dacc7b52 --- /dev/null +++ b/docs/examples/Journeys/Journey-PhD.ipynb @@ -0,0 +1,541 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Journey: Economics PhD Student\n", + "====\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 1 Introduction\n", + "\n", + "This notebook is designed as an introduction to someone with the training of a 1st year Economics student, but perhaps without much background in computer programming or scientific computation. As it is a \"journey,\" it is not one big tutorial, but a set of links to notebooks and other resources which will help you understand the different HARK objects and functionalities.\n", + "\n", + "This journey does not require any special skill in programming. However, we recommend you take a few introductory tutorials in Python and object-oriented programming (OOP) to make you familiar with the basic concepts. Moreover, we assume some knowledge in economic theory.\n", + "\n", + "As you have found this journey, you probably have a concept of what a heterogeneous agent model is, but here is a short recap. Think about a basic, infinitely lived consumer problem as you know from first-year graduate courses (letting alone the companies and general equilibrium for now). Using the Bellman equation, we can write it as:\n", + "\n", + "\\begin{eqnarray*}\n", + "V(M_t) &=& \\max_{C_t} U(C_t) + \\beta V(M_{t+1}), \\\\\n", + "& s.t. & \\\\\n", + "A_t &=& M_t - C_t, \\\\\n", + "M_{t+1} &=& R (M_{t}-C_{t}) + Y_t, \\\\\n", + "\\end{eqnarray*}\n", + "\n", + "\n", + "Where $\\beta <1$ is a discount factor, $C_t$ is consumption, $A_t$ - assets, $Y_t$ - income and $U(C)$ is a standard CRRA utility function:\n", + "\n", + "$$\n", + "U(C)=\\frac{C^{1-\\rho}}{1-\\rho}.\n", + "$$\n", + "\n", + "Now assume that every consumer faces some uncertainty on her income which is subject to idiosyncratic shocks - the realizations of each shock is (potentially) different for each agent. In this setting, it follows an AR (1) process, so that the current value of $Y$ is a state variable that predicts future values of $Y$.\n", + "\n", + "Then, the Bellman equation looks like:\n", + "\n", + "\\begin{eqnarray*}\n", + "V(M_t, Y_t) &=& \\max_{C_t} U(C_t) + E[\\beta V(M_{t+1}, Y_{t+1})], \\\\\n", + "& s.t. & \\\\\n", + "A_t &=& M_t - C_t, \\\\\n", + "M_{t+1} &=& R (M_{t}-C_{t}) + Y_t, \\\\\n", + "\\end{eqnarray*}\n", + "\n", + "Finding a distribution of agent assets (consumption, savings) must involve much more advanced numerical tools than in the representative agent setting. This is more demanding task to accomplish and master. Moreover, the knowledge about involved numerical methods is less systematic, and often hard to find. To quote the HARK [Documentation](https://docs.econ-ark.org/docs/overview/introduction.html):\n", + "\n", + "*\"After months of effort, you may have had the character-improving experience of\n", + "proudly explaining to your adviser that not only had you grafted two ideas\n", + "together, you also found a trick that speeded the solution by an order of\n", + "magnitude, only to be told that your breathtaking insight had been understood\n", + "for many years, as reflected in an appendix to a 2008 paper; or, worse, your\n", + "discovery was something that “everybody knows” but did not exist at all in\n", + "published form!\"*\n", + "\n", + "HARK was designed to help you avoid similar experiences. We see two main uses of this package and its tools:\n", + "\n", + "- To simulate the standard heterogeneous agent models without learning all the numerical methods\n", + "- To solve your own models building-on the already implemented algorithms\n", + "\n", + "This journey will help you mostly with using HARK in the first way. We do not elaborate here the numerical methods; however, in the last sections you can find some guidance on which methods were used and how the source code is structured.\n", + "\n", + "Although using the prepared package is easier than writing your own solution (what you will need to do sooner or later if you create an original heterogeneous agent model), there is much effort in comprehending the main classes and functionalities of HARK. We hope that this journey will make it easier! We believe that it also will be your first step into the world of the heterogeneous agents modeling.\n", + "\n", + "---\n", + "NOTE\n", + "***\n", + "We will be very happy to see your feedback. If you have any questions regarding this tutorial or HARK as a whole please see our [Github page](https://github.com/econ-ark/HARK).\n", + "\n", + "---" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 2 Before you start\n", + "\n", + "As we have mentioned before, this journey does not require any special skill in programming. However, some knowledge about Python and object-oriented programing (OOP) is needed. We propose two possible ways to gather the basic concepts; however, plenty of others resources are available:\n", + "\n", + "- Quick introduction to Python and OOP: chapters five to seven from [Quantecon](https://python-programming.quantecon.org/intro.html) should familiarize you with everything what you need for the first tutorials.\n", + "- A little longer introduction (if you want to learn something about used numerical methods):\n", + " - Start with the basic Python [tutorial](https://docs.python.org/3/tutorial)\n", + " - Get some knowledge about [Numpy](https://numpy.org/doc/stable/user/quickstart.html)\n", + "- You can also learn Python by learning Machine learning, as there are many tutorials constructed in that way (one example is [scikit-learn tutorials](https://scikit-learn.org/stable/tutorial/index.html))." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 3 Few words about HARK structure\n", + "\n", + "HARK was written using OOP (we hope that you skimmed the tutorials and have some understanding of this). This means that different parts of the model, like different types of consumers, firms, and general equilibrium conditions (if you have these components in the model), are implemented as different *objects*. Such structure enables you to build your own models with different consumer-type distributions / company structure (if you want some). Importantly, learning the package with such structure implies learning the different types of objects (classes).\n", + "\n", + "In HARK there are two main classes: `AgentType` (think consumers, microeconomic models) and `Market` (think general equilibrium, macroeconomic models). As AgentType objects are the attributes of the Market, we first present this type (additionally, if you are interested only in microeconomic research, you may not want to study the Market class).\n", + "\n", + "In practice, it will take more than two classes to accommodate the variety of models constructed using the toolkit. Thus, each class will have subclasses and those their own subclasses. In general, a more sophisticated class will be defined as a subclass. This journey will reflect this structure, first by presenting the most primitive models, and then the more fancy ones.\n", + "\n", + "---\n", + "NOTE\n", + "***\n", + "In OOP, objects are organized in **classes** (the general structure of the objects) and more specific **subclasses**. The subclass inherits the methods and attributes from the its parent class. Thus, everything which you can do with the object from a general class can be done with the object from its subclass. In case of the economic models, the basic one are always the parent classes of the more sophisticated ones.\n", + "\n", + "---\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 4 Agent-type class\n", + "Agent-type class enables you to build microeconomic models (such as the one presented in the introduction). It is also the essential part of the macroeconomic model in HARK. So remember: *to use HARK, you always need to use agent-type classes!*\n", + "\n", + "### 4.1 Introductory example\n", + "As an example, let's solve the stochastic model from the introduction. Assume the income process of the agent $i$ in the period t, $Y_{i,t}$, is given by:\n", + "\n", + "\\begin{eqnarray*}\n", + "Y_{i,t} &=& \\varepsilon_t(\\theta_{i,t} p_{i,t}) \\\\\n", + "p_{i,t+1} &=& p_{i,t}\\psi_{i,t+1}\\\\\n", + "\\psi_{i,t} & \\sim & N(1,\\sigma_{\\varrho})\\\\\n", + "\\theta_{i,t} & \\sim & N(1,\\sigma_{\\theta})\\\\\n", + "\\end{eqnarray*}\n", + "\n", + "To get a universal solution of this problem, we need to find a policy function (in this case consumption function). This can be done easily using the HARK `solve` function.\n", + "\n", + "Before doing this, we need to declare our model (we assume standard parametrization: R= 1.03, $\\rho = 2$, $\\beta = 0.96$, $P(\\varepsilon=0)= 0.005$, $P(\\varepsilon=1)= 0.995$, $\\sigma_{\\psi}= \\sigma_{\\theta}=0.1)$:\n", + "\n", + "[comment]: <> (Is this the correct description of the income process? The confusion comes from not knowing the names of a few parameters \"epsilon\", \"P v.s. p\"? Does this match the income process defined in the cstw paper?)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "execution": { + "iopub.execute_input": "2024-07-11T15:32:51.730143Z", + "iopub.status.busy": "2024-07-11T15:32:51.729888Z", + "iopub.status.idle": "2024-07-11T15:32:52.476452Z", + "shell.execute_reply": "2024-07-11T15:32:52.475866Z" + } + }, + "outputs": [], + "source": [ + "import os\n", + "import sys # set path of the notebook\n", + "\n", + "sys.path.insert(0, os.path.abspath(\"../../.\"))\n", + "# we previously defined the paramters to not bother you about it now\n", + "import JourneyPhDparam as Params # imported paramters\n", + "\n", + "from HARK.ConsumptionSaving.ConsIndShockModel import * # import the module for the idiosyncratic shocks\n", + "from HARK.utilities import plot_funcs # useful function\n", + "\n", + "Example = IndShockConsumerType()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Next we can solve the model and plot the consumption function:" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "execution": { + "iopub.execute_input": "2024-07-11T15:32:52.478475Z", + "iopub.status.busy": "2024-07-11T15:32:52.478187Z", + "iopub.status.idle": "2024-07-11T15:32:52.773208Z", + "shell.execute_reply": "2024-07-11T15:32:52.772677Z" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Consumption function\n" + ] + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAi4AAAGdCAYAAAA1/PiZAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8fJSN1AAAACXBIWXMAAA9hAAAPYQGoP6dpAAA+00lEQVR4nO3deXwU9f3H8ffmDiEJBEhCIIFwhEAOVBQE6p1yyhnPn209Wm0V64GVQwVEoAG02tZaPFpRaz05FQUEBFRAbswBBALhJgkEks1Brt35/RFJRW7YzexuXs/HI48Hu/vdmc/km515M7v7GYthGIYAAADcgJfZBQAAAFwoggsAAHAbBBcAAOA2CC4AAMBtEFwAAIDbILgAAAC3QXABAABug+ACAADcho/ZBfyc3W7XoUOHFBwcLIvFYnY5AADgAhiGoZKSEkVFRcnLy3nnRVwuuBw6dEjR0dFmlwEAAC7B/v371bp1a6ct3+WCS3BwsKTaDQ8JCTG5GgAAcCGsVquio6PrjuPO4nLB5eTbQyEhIQQXAADcjLM/5sGHcwEAgNsguAAAALdBcAEAAG6D4AIAANwGwQUAALgNggsAAHAbBBcAAOA2CC4AAMBtEFwAAIDbILgAAAC3QXABAABug+ACAADcBsEFAABcts37jtXLelzu6tAAAMB9lFbW6MVF2/XOym31sj6CCwAAuCQrsgv07NxMHSw6IcOon3XyVhEAALgox8uqNPLjLbpv5nodLDqh6LBAvfWbq+tl3ZxxAQAAF8QwDH2eflgTP8tSYVmVvCzS/b1j9VSfONVUlNdLDQQXAABwXoeLT+i5uZlatr1AkhQX0VjTUpN1ZUxTSZK1on7qILgAAICzstsNfbBun6Yu3K7Syhr5elv06E0d9fCN7eXnU/+fOCG4AACAM9p9pFRj5mRoXW7tV52vjGmiaanJiosINq0mggsAADhFjc2ut77N1StLd6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REREcrLyzvjc/Ly8i5qvKuz2+164okn1Lt3byUmJp51XKdOnfT2229r/vz5ev/992W329WrVy8dOHCgHqu9PD169NA777yjRYsWacaMGcrNzdV1112nkpKSM473tLk+ad68eSoqKtJ999131jGeMN8/d3LeLmZOL2Uf4eoqKio0evRo3X333ee84N7Fvl5cUb9+/fTee+9p2bJlmjZtmlauXKn+/fvLZrOdcbwnzve7776r4ODg875l4k7zfabjVl5envz8/E4L4+c7np8cc6HPOROXuzq0pxsxYoQyMzPP+15mz5491bNnz7rbvXr1UufOnfXGG29o0qRJzi7TIfr371/37+TkZPXo0UNt2rTRJ598ckH/G/EU//73v9W/f39FRUWddYwnzDdOV11drTvuuEOGYWjGjBnnHOsJr5e77rqr7t9JSUlKTk5W+/bttWLFCt1yyy0mVlZ/3n77bd1zzz3n/XC9O833hR636ku9nnFp3ry5vL29T/vUcX5+viIjI8/4nMjIyIsa78oeffRRLViwQMuXL1fr1q0v6rm+vr668sorlZOT46TqnK9JkyaKi4s76zZ40lyftHfvXi1dulS/+93vLup5njDfJ+ftYub0UvYRrupkaNm7d6+WLFlyzrMtZ3K+14s7aNeunZo3b37WbfCk+Zakb7/9VtnZ2Rf9epdcd77PdtyKjIxUVVWVioqKThl/vuP5yTEX+pwzqdfg4ufnp27dumnZsmV199ntdi1btuyU/23+VM+ePU8ZL0lLliw563hXZBiGHn30Uc2dO1dff/21YmNjL3oZNptNGRkZatmypRMqrB+lpaXatWvXWbfBE+b652bOnKnw8HANHDjwop7nCfMdGxuryMjIU+bUarVq7dq1Z53TS9lHuKKToWXnzp1aunSpmjVrdtHLON/rxR0cOHBAhYWFZ90GT5nvk/7973+rW7du6tq160U/19Xm+3zHrW7dusnX1/eUucvOzta+ffvOOneXsk84W3H16qOPPjL8/f2Nd955x9i6davx0EMPGU2aNDHy8vIMwzCMX//618aYMWPqxq9atcrw8fExXnrpJWPbtm3GhAkTDF9fXyMjI6O+S79kDz/8sBEaGmqsWLHCOHz4cN1PeXl53Zifb/fEiRONxYsXG7t27TI2btxo3HXXXUZAQICRlZVlxiZckqeeespYsWKFkZuba6xatcpISUkxmjdvbhQUFBiG4Zlz/VM2m82IiYkxRo8efdpjnjLfJSUlxubNm43NmzcbkoyXX37Z2Lx5c923Z6ZOnWo0adLEmD9/vpGenm4MGTLEiI2NNU6cOFG3jJtvvtl49dVX626fbx/hCs613VVVVcbgwYON1q1bG1u2bDnlNV9ZWVm3jJ9v9/leL67gXNtdUlJi/OlPfzLWrFlj5ObmGkuXLjWuuuoqo2PHjkZFRUXdMjxtvk8qLi42GjVqZMyYMeOMy3C3+b6Q49Yf/vAHIyYmxvj666+NDRs2GD179jR69ux5ynI6depkzJkzp+72hewTzqfeg4thGMarr75qxMTEGH5+fkb37t2N77//vu6xG264wbj33ntPGf/JJ58YcXFxhp+fn5GQkGB88cUX9Vzx5ZF0xp+ZM2fWjfn5dj/xxBN1v6OIiAhjwIABxqZNm+q/+Mtw5513Gi1btjT8/PyMVq1aGXfeeaeRk5NT97gnzvVPLV682JBkZGdnn/aYp8z38uXLz/i3fXLb7Ha7MW7cOCMiIsLw9/c3brnlltN+H23atDEmTJhwyn3n2ke4gnNtd25u7llf88uXL69bxs+3+3yvF1dwru0uLy83+vTpY7Ro0cLw9fU12rRpYzz44IOnBRBPm++T3njjDSMwMNAoKio64zLcbb4v5Lh14sQJ45FHHjGaNm1qNGrUyBg2bJhx+PDh05bz0+dcyD7hfCw/LhgAAMDlca0iAADgNgguAADAbRBcAACA2yC4AAAAt0FwAQAAboPgAgAA3AbBBQAAuA2CCwAAcBsEFwAA4DYILgAAwG0QXAAAgNsguAAAALfx/+A9v74SDt/+AAAAAElFTkSuQmCC", + "text/plain": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "Example.solve()\n", + "min_v = Example.solution[\n", + " 0\n", + "].mNrmMin # minimal value for which the consumption function is defined\n", + "max_v = 20\n", + "print(\"Consumption function\")\n", + "plot_funcs([Example.solution[0].cFunc], min_v, max_v)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### 4.2 The Agent-Type structure\n", + "To understand the microeconomic models in HARK, you need to have some concept of the Agent-type class structure. As it was mentioned, in HARK more advanced models are subclasses of the more primitive ones. The following diagram illustrates this structure: the deterministic class `PerfForesightConsumerType` is the parent for the class of the consumers with idiosyncratic income shocks `IndShockConsumerType`. Subsequently, there is a class defined with both idiosyncratic and aggregate income shocks `𝙼𝚊𝚛𝚔𝚘𝚟ConsumerType`.\n", + "\n", + "![HARK structure](HARK-struct-2.png)\n", + "\n", + "However, it doesn't end there! There are subclasses of the `AggShockConsumerType` which are designed to be integrated with macroeconomic models (we will discuss them in the section devoted to the Market class), as well as there are many other subclasses (which we will mention in the supplementary section)." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### 4.3 Main tutorials\n", + "\n", + "To reflect the agent-type structure, we propose you start with the Quickstart notebook (it is devoted to the deterministic case). Then proceed to the idiosyncratic consumers and then to consumers with aggregate and idiosyncratic shocks. The exact order of the suggested tutorials is given in the table.\n", + "\n", + "\n", + "|Number | Tutorial | Description|\n", + "| :---- | :---- | :---- |\n", + "|1 |[Quickstart](https://github.com/econ-ark/HARK/blob/master/examples/Journeys/Quickstart_tutorial/Quick_start_with_solution.ipynb) |This tutorial familiarize you with the basic HARK objects and functionalities.
You will learn how to create, solve, plot and simulate the deterministic
microeconomic models ($\\texttt{PerfForesightConsumerType}$ class).|\n", + "|2 |[Idiosyncratic consumers](https://github.com/econ-ark/HARK/blob/master/examples/ConsIndShockModel/IndShockConsumerType.ipynb) |In this tutorial you will learn how to deal
with the microeconomic models with agents with idiosyncratic shocks:
individual productivity shocks ($\\texttt{IndShockConsumerType}$ class). It builds on the Quickstart. |\n", + "|3|[Nondurables during great recession](https://github.com/econ-ark/DemARK/blob/master/notebooks/Nondurables-During-Great-Recession.ipynb)| Use you knowledge about HARK to conduct a few economic experiments!
You will examine the effects of the uncertinity increase on the heterogenous
agents with idiosyncratic income risk.|\n", + "|4|[Chinese-Growth](https://github.com/econ-ark/DemARK/blob/master/notebooks/Chinese-Growth.ipynb)|Learn how to dealt with models with idiosyncratic
and aggregate risk ($\\texttt{𝙼𝚊𝚛𝚔𝚘𝚟ConsumerType}$ class).
Next build advanced simulation with many agent types.|\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### 4.4 Supplementary tutorials\n", + "\n", + "The aforementioned four tutorials are the most essential ones. However, in HARK there are a few other classes with a similar structure as three basic ones (with some minor differences). Here is a list of the notebooks which familiarize you with them (if you so wish, as it is not required to understand the next topics).\n", + "\n", + "|Number | Tutorial | Description|\n", + "| :---- | :---- | :---- |\n", + "|1* |[Kinked consumer](https://github.com/econ-ark/HARK/blob/master/examples/ConsIndShockModel/KinkedRconsumerType.ipynb) | $\\texttt{KinkedRconsumerType}$ is a subclass of $\\texttt{IndShockConsumerType}$.
In enables to set different borrowing and lending interest rate. |\n", + "|2* |[Buffer-stock consumer](https://github.com/econ-ark/DemARK/blob/master/notebooks/Gentle-Intro-To-HARK-Buffer-Stock-Model.ipynb) | In the Buffer Stock model, the unemployment state (zero income stat) is irreversible.
This framework is implemented by $\\texttt{TractableConsumerType}$ class.
For the analytical properties of buffer stock model check this [lecture notes](https://www.econ2.jhu.edu/people/ccarroll/public/LectureNotes/Consumption/TractableBufferStock/).|\n", + "|3*|[Generalized income process](https://github.com/econ-ark/HARK/blob/master/examples/GenIncProcessModel/GenIncProcessModel.ipynb)| In $\\texttt{IndShockConsumerType}$ class, the idiosyncratic income shocks
were assumed to be or purely permanent or purely transitory. In the similar class
$\\texttt{PersistentShockConsumerType}$ the income shocks follows AR(1) process with parameter <1,
thus there are not full permanent nor transitory
(it was called generalized income process).|\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 5 Market class\n", + "\n", + "In macroeconomic models, the consumers are only one possible type of agent. In such models, the economy contains also firms and a government (or other types of agents). In HARK, several standard macro models were implemented using the **Market** class and its subclasses.\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### 5.1 Introductory example\n", + "\n", + "Let's extend our model from the previous section. Assume the perfect competition and Cobb-Douglas production function:\n", + "\n", + "\\begin{eqnarray*}\n", + "y_t = k_t^{\\alpha} n_t^{1-\\alpha}\n", + "\\end{eqnarray*}\n", + "Thus, the producers' problem is:\n", + "\\begin{eqnarray*}\n", + "\\max_{k_t, n_t} &\\: k_t^{\\alpha} n_t^{1-\\alpha} - (R_t +\\delta)k_t-w_t n_t\n", + "\\end{eqnarray*}\n", + "\n", + "Where $k_t$ is capital, $n_t$ is labour, $\\delta$ is a depreciation rate.\n", + "\n", + "In this case, consumers' incomes are determined by the wage:\n", + "\n", + "[comment]: <> (Should there be an equation here? Or is this information apparent from the bellman equation?)\n", + "\n", + "\\begin{eqnarray*}\n", + "V(M_{i,t}, Y_{i,t}) &=& \\max_{C_{i,t}, M_{i,t+1}} U(C_{i,t}) + E[\\beta V(M_{i,t+1}, Y_{i,t+1})], \\\\\n", + "& s.t. & \\\\\n", + "A_{i,t} &=& M_{i,t} - C_{i,t}, \\\\\n", + "M_{i,t+1} &=& R_{t+1} (M_{i,t}-C_{i,t}) + w_{t+1} Y_{i,t+1}, \\\\\n", + "\\end{eqnarray*}\n", + "\n", + "Additionally, assume that the distribution of the consumers over capital is given by the measure $\\Gamma_t$. To close the economy, there are the market clearing conditions:\n", + "\\begin{eqnarray*}\n", + "n_t &= \\int Y{_i,t} d \\Gamma_t \\\\\n", + "k_{t+1} &= \\int A_{i,t}^i d \\Gamma_t \\\\\n", + "k_{t+1}+ \\int C_{i,t} d\\Gamma_t &= y_t+(1-\\delta)k_t\n", + "\\end{eqnarray*}\n", + "\n", + "In HARK, you can solve this basic case by using the `CobbDouglasEconomy` class. However, to add the consumers to the economy you need the `AggShockConsumerType` class, which is a subclass of `IndShockConsumerType` Let's declare the economy (assuming depreciation rate $\\delta = 0.025$):\n" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "execution": { + "iopub.execute_input": "2024-07-11T15:32:52.775020Z", + "iopub.status.busy": "2024-07-11T15:32:52.774672Z", + "iopub.status.idle": "2024-07-11T15:32:52.789835Z", + "shell.execute_reply": "2024-07-11T15:32:52.789349Z" + } + }, + "outputs": [], + "source": [ + "from HARK.ConsumptionSaving.ConsAggShockModel import * # module with the economy classes\n", + "\n", + "AggShockExample = AggShockConsumerType(\n", + " **Params.init_agg_shocks,\n", + ") # declare the consumer, using the previously prepared parameters\n", + "\n", + "# Make a Cobb-Douglas economy for the agents\n", + "EconomyExample = CobbDouglasEconomy(\n", + " agents=[AggShockExample],\n", + " **Params.init_cobb_douglas,\n", + ")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Now, you can solve the economy and plot the aggregate savings function:" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "execution": { + "iopub.execute_input": "2024-07-11T15:32:52.791510Z", + "iopub.status.busy": "2024-07-11T15:32:52.791254Z", + "iopub.status.idle": "2024-07-11T15:32:52.858212Z", + "shell.execute_reply": "2024-07-11T15:32:52.857695Z" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "capital-level steady state: 13.943289665216982\n" + ] + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAh8AAAGdCAYAAACyzRGfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8fJSN1AAAACXBIWXMAAA9hAAAPYQGoP6dpAAA8kklEQVR4nO3dfXBUBZ7v/3enk3QS8zRJCCEkEJ4jIWn8scLIDKwMiBFvfiLBOIy7P3EtqdkFa+VBU8IAAyoIGnXnyu5YVi3s1lV2w3NlcPBOHCDOBaGGlTyZQBKCIYYQQ0yaPNBJus/vD3e4oqAEkj7dnc+rqqvo06e7Px4O3R+/ffq0xTAMAxEREREPCTA7gIiIiAwuKh8iIiLiUSofIiIi4lEq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qa8ePHU11dbXYUv5SQkADwnW8EXLp06dpt0v9Gjx5NXFyc9uvbsGzZMn73u99x+PBhkpKSri1PSEigu7ub1tbW69bXvtx3N9vGNzJt2jQAv92XVT4Gqfb2dmpqahg2bJjZUfzSqFGjSEhI4KOPPrq2zOFwcOLECe677z4Tk/m3+vp6Ll++rP26DwzDYNmyZezbt48//vGPjBo16rrbp0yZQlBQ0HX78pkzZ6irq9O+fIt+aBvfyOnTpwH8dl/Wxy6DxKpVq8jKymLkyJE0NDSwfv16rFYrixYtMjuaz2pvb7/u/0pqa2s5ffo0MTExjBgxgueee46XX36ZcePGMWrUKNauXUtiYiLz5883L7SP+b5tHBMTw4YNG8jOziYhIYGamhpeeOEFxo4dy4MPPmhiat+ydOlS3n//fQ4cOEBERMS14ziioqIIDQ0lKiqKp59+mhUrVhATE0NkZCTPPvss9913Hz/+8Y9NTu8bfmgb19TU8P777zNv3jxiY2MpKSlh+fLlzJw5k4yMDJPTDxCzv24jnvH4448bw4YNM4KDg43hw4cbjz/+uFFdXW12LJ92+PBhA/jO5cknnzQM4+uv265du9YYOnSoYbPZjNmzZxtnzpwxN7SP+b5t3NnZacydO9cYMmSIERQUZIwcOdJ45plnjMbGRrNj+5QbbV/A2L59+7V1urq6jH/4h38wfvSjHxlhYWHGo48+aly8eNG80D7mh7ZxXV2dMXPmTCMmJsaw2WzG2LFjjeeff95oa2szN/gAshiGYXiy7IiIiMjgpmM+RERExKNUPkRERMSjVD5ERETEo1Q+RERExKNUPkRERMSjVD5ERETEo1Q+RERExKNUPkRERMSjVD5ERETEo1Q+RERExKNUPkRERMSjVD5ERETEo/5/qMbq7feoYc4AAAAASUVORK5CYII=", + "text/plain": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "EconomyExample.make_AggShkHist() # Simulate a history of aggregate shocks\n", + "\n", + "# Have the consumers inherit relevant objects from the economy\n", + "AggShockExample.get_economy_data(EconomyExample)\n", + "\n", + "AggShockExample.solve() # solve the model\n", + "\n", + "print(\n", + " \"capital-level steady state: \",\n", + " EconomyExample.kSS,\n", + ") # print the capital-level steady stae\n", + "\n", + "plot_funcs(\n", + " AggShockExample.AFunc,\n", + " 0.1,\n", + " 2 * EconomyExample.kSS,\n", + ") # plot the aggregate savings function" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### 5.2 Market class structure\n", + "\n", + "As in the case of the agent-type, the more complicated macroeconomic models are the subclasses of more primitive ones. The subclasses of Market include `CobbDouglasEconomy` and `SmallOpenEconomy`. The main difference between them is that for `CobbDouglasEconomy`, the capital and labour prices are endogenous, while in the (small) open economy class both are set exogenously.\n", + "\n", + "Nevertheless, both basic classes enable the aggregate fluctuation in the economy, that is:\n", + "\n", + "\\begin{eqnarray*}\n", + "Y_{i,t} &=& \\varepsilon_t(\\epsilon_{i,t}p_{i,t}\\Theta_t P_t )\\\\\n", + "P_{t+1} &=& P_{t}\\Psi_{t+1}\\\\\n", + "\\Psi_{t} &\\sim & {N}(1,\\sigma_{\\Psi})\\\\\n", + "\\Theta_t &\\sim &{N}(1,\\sigma_{\\Theta})\\\\\n", + "\\end{eqnarray*}\n", + "\n", + "The consumers, which are attributes of such market classes, need to include the aggregate fluctuations of the whole economy in their optimization problem. This is the reason why the `AggShockConsumerType` class (and their subclasses) must be used to construct the macro-model.\n", + "\n", + "The subclass of `CobbDouglasEconomy` is `CobbDouglasMarkovEconomy`. In this setting, there exists an additional aggregate fluctuation in the economy (the distribution of which is given by the finite Markov matrix).\n", + "\n", + "\n", + "![HARK_struct_2](HARK-struct-4.png)\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### 5.3 Tutorial\n", + "\n", + "To learn the functionalities of the market-type classes in HARK we suggest studying the following notebook devoted to [Krussel-Smith economy](https://github.com/econ-ark/REMARK/blob/master/REMARKs/KrusellSmith.md). In this notebook, the classical [Krussell-Smith model](https://www.journals.uchicago.edu/doi/abs/10.1086/250034?journalCode=jpe) is implemented (with some extensions) using the `CobbDouglasMarkovEconomy` class.\n", + "\n", + "Before that, you may want to check the main function from [ConsAggShockModel module](https://github.com/econ-ark/HARK/blob/master/examples/ConsumptionSaving/example_ConsAggShockModel.ipynb) or its [source code](https://github.com/econ-ark/HARK/blob/master//HARK/ConsumptionSaving/ConsAggShockModel.py) to see the basic steps to create the market type objects.\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### 5.3.1 If you want to learn (a little) how the Market class works\n", + "\n", + "The Market class was designed to be a general framework for many different macro models. It involves a procedure of aggregating the agents' choices: eg. aggregating consumption and savings (`reap_vars` in the code) and then transforming the aggregated variables (`mill_rule` in the code).\n", + "\n", + "If you would like to get better knowledge about this structure, first take a look at the [Hark documentation](https://docs.econ-ark.org/docs/overview/ARKitecture.html). Next, to understand how the HARK Market class works in less standard setting, look at the [Fashion victim model](https://github.com/econ-ark/DemARK/blob/99948acb7b59cc9a6fb7de758972266fa4b03a06/notebooks/Fashion-Victim-Model.ipynb).\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 6 If you need to study a source code\n", + "\n", + "In the previous sections we saw an example of how to solve different models using HARK. However, we know that you may also need to work with the source code for a few reasons (e.g. to learn used numerical methods, write your own code).\n", + "\n", + "Working directly with code (even if well-written) is a much more complicated tasks than just working with finished functions, and no tutorial will let you go through this painlessly. However, we hope that this partelaborating on the HARK structure and numerical methods will help you with this task.\n", + "\n", + "### 6.1 A few more words on HARK structure\n", + "\n", + "When you look at the [HARK](https://github.com/econ-ark/HARK) sources, you will find the subdirectory called HARK. Next there is a script called \"core. py\". Surprisingly, you will not find this code in many of the subclasses which you learned during this journey!\n", + "\n", + "The reason for this is that HARK.core.py is a core of the package: a framework for all models which can be coded in HARK. It contains the general framework of the agent-type classes (AgentType class) and for the market. The exact structure of modules in the HARK core you can find in the [Hark documentation](https://docs.econ-ark.org/docs/overview/ARKitecture.html#general-purpose-tools). Here, you can also find the general structure of the [AgentType](https://docs.econ-ark.org/docs/overview/ARKitecture.html#agenttype-class) and [Market classes](https://docs.econ-ark.org/docs/overview/ARKitecture.html#market-class).\n", + "\n", + "Where are the subclasses which you'v learned during the journey? In HARK, the subclasses are located in the separate directories. For the AgentType subclasses, you need to look at HARK.ConsumptionSaving directory. For example, `PerfForesightConsumerType` and `IndShockConsumerType` can be found in ConsIndShockModel.py. Nevertheless, if you want to understand any of the HARK modules, you must first understand `HARK.core`.\n", + "\n", + "\n", + "### 6.2 HARK solution\n", + "\n", + "For the consumer problems, solutions of the one-period consumer's problem are found using the attribute function `solve_one_period`. The inputs passed to this function also include data from the subsequent periods. Before solve_one_period is called, the function pre_solve() is applied, which prepare the solution (eg. transmit the solution of the sub-sequent period as an input).\n", + "\n", + "The structure of the functions which are used as solve_one_period reflects the agent-type class structures. Thus, when you will study the source code, you will first read the solve classes.\n", + "\n", + "![Hark_struct3](HARK-struct-3.png)\n", + "\n", + "\n", + "#### 6.2.1 Solution method for agent problem\n", + "However, knowing the structure of the code may not be very beneficial if you do not know the solution method! While for the perfect foresight consumer has an analytic solution, the policy functions for the stochastic consumer (thus with the idiosyncratic or the aggregate shocks) are solved by the **endogenous grid method**.\n", + "\n", + "The method of endogenous gridpoints is now widely used in macroeconomic simulations. There are a few resources to learn it; here, we suggest Professor Carroll's [lecture notes](https://www.econ2.jhu.edu/people/ccarroll/SolvingMicroDSOPs/). If you prefer a very quick version, we suggest appendix to the Kruger and Kindermann [paper](https://www.nber.org/papers/w20601.pdf) (they develop a slightly bigger model with a different notation, but the idea is the same).\n", + "\n", + "#### 6.2.2 Finding general equilibrium\n", + "In general, the rational expectations general equilibrium is found by updating the agents' expectations and the aggregate choices up to the point at which the actual aggregated variables (like interest rate or capital) are equal to the expected ones. However, one may need to refer to the papers cited in the notebooks to understand the exact methods used.\n", + "\n", + "\n", + "### 6.3 How to study HARK codes\n", + "\n", + "We hope that this section gave you some idea how the HARK library works. However, HARK contains much more than is discussed here. Here is some more guidance on how to continue your journey:\n", + "\n", + "- Before you start make sure that you understand the endogenous grid method, as well as the general framework structure for AgentType and Market from [HARK documentation](https://docs.econ-ark.org/docs/overview/ARKitecture.html#agenttype-class).\n", + "- When working through HARK.core, make sure that you see the connection between the structure in the documentation and the code (check autodoc from the [HARK documentation](https://docs.econ-ark.org/docs/reference/tools/core.html) webpage).\n", + "- Proceed to the ConsumptionSaving/ConsIndShockModel.py and compare the tutorials with the source code.\n", + "- Proceed to the ConsumptionSaving/ConsAggShockModel.py and compare the tutorial on the Market class with the source code, check [autodoc](https://docs.econ-ark.org/docs/reference/ConsumptionSaving/ConsAggShockModel.html).\n", + "\n", + "So in general, when you want to learn any of the modules in the HARK toolkit, first check autodoc from the [HARK documentation](https://docs.econ-ark.org/docs/reference/index.html) webpage.\n" + ] + } + ], + "metadata": { + "jupytext": { + "cell_metadata_filter": "ExecuteTime,collapsed,-autoscroll", + "formats": "ipynb,py:percent", + "notebook_metadata_filter": "all,-widgets,-varInspector" + }, + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.9" + }, + "latex_envs": { + "LaTeX_envs_menu_present": true, + "autoclose": false, + "autocomplete": true, + "bibliofile": "biblio.bib", + "cite_by": "apalike", + "current_citInitial": 1, + "eqLabelWithNumbers": true, + "eqNumInitial": 1, + "hotkeys": { + "equation": "Ctrl-E", + "itemize": "Ctrl-I" + }, + "labels_anchors": false, + "latex_user_defs": false, + "report_style_numbering": false, + "user_envs_cfg": false + }, + "toc": { + "base_numbering": 1, + "nav_menu": {}, + "number_sections": true, + "sideBar": true, + "skip_h1_title": false, + "title_cell": "Table of Contents", + "title_sidebar": "Contents", + "toc_cell": false, + "toc_position": {}, + "toc_section_display": true, + "toc_window_display": false + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/examples/Journeys/Journey-Policymaker.ipynb b/docs/examples/Journeys/Journey-Policymaker.ipynb similarity index 100% rename from examples/Journeys/Journey-Policymaker.ipynb rename to docs/examples/Journeys/Journey-Policymaker.ipynb diff --git a/examples/Journeys/JourneyPhDparam.py b/docs/examples/Journeys/JourneyPhDparam.py similarity index 100% rename from examples/Journeys/JourneyPhDparam.py rename to docs/examples/Journeys/JourneyPhDparam.py diff --git a/examples/Journeys/Journeys-into-HARK.ipynb b/docs/examples/Journeys/Journeys-into-HARK.ipynb similarity index 100% rename from examples/Journeys/Journeys-into-HARK.ipynb rename to docs/examples/Journeys/Journeys-into-HARK.ipynb diff --git a/examples/Journeys/LorenzcurveDiscRate.png b/docs/examples/Journeys/LorenzcurveDiscRate.png similarity index 100% rename from examples/Journeys/LorenzcurveDiscRate.png rename to docs/examples/Journeys/LorenzcurveDiscRate.png diff --git a/examples/Journeys/Quickstart_tutorial/HARK_diagram.png b/docs/examples/Journeys/Quickstart_tutorial/HARK_diagram.png similarity index 100% rename from examples/Journeys/Quickstart_tutorial/HARK_diagram.png rename to docs/examples/Journeys/Quickstart_tutorial/HARK_diagram.png diff --git a/examples/Journeys/Quickstart_tutorial/Quick_start_with_solution.ipynb b/docs/examples/Journeys/Quickstart_tutorial/Quick_start_with_solution.ipynb similarity index 100% rename from examples/Journeys/Quickstart_tutorial/Quick_start_with_solution.ipynb rename to docs/examples/Journeys/Quickstart_tutorial/Quick_start_with_solution.ipynb diff --git a/examples/Journeys/Quickstart_tutorial/README.md b/docs/examples/Journeys/Quickstart_tutorial/README.md similarity index 100% rename from examples/Journeys/Quickstart_tutorial/README.md rename to docs/examples/Journeys/Quickstart_tutorial/README.md diff --git a/examples/Journeys/Quickstart_tutorial/life_table.csv b/docs/examples/Journeys/Quickstart_tutorial/life_table.csv similarity index 100% rename from examples/Journeys/Quickstart_tutorial/life_table.csv rename to docs/examples/Journeys/Quickstart_tutorial/life_table.csv diff --git a/examples/Journeys/Quickstart_tutorial/productivity_profile.csv b/docs/examples/Journeys/Quickstart_tutorial/productivity_profile.csv similarity index 100% rename from examples/Journeys/Quickstart_tutorial/productivity_profile.csv rename to docs/examples/Journeys/Quickstart_tutorial/productivity_profile.csv diff --git a/examples/LabeledModels/LabeledModels.ipynb b/docs/examples/LabeledModels/LabeledModels.ipynb similarity index 100% rename from examples/LabeledModels/LabeledModels.ipynb rename to docs/examples/LabeledModels/LabeledModels.ipynb diff --git a/examples/LifecycleModel/Cycles_tutorial.ipynb b/docs/examples/LifecycleModel/Cycles_tutorial.ipynb similarity index 100% rename from examples/LifecycleModel/Cycles_tutorial.ipynb rename to docs/examples/LifecycleModel/Cycles_tutorial.ipynb diff --git a/examples/LifecycleModel/EstimationParameters.py b/docs/examples/LifecycleModel/EstimationParameters.py similarity index 100% rename from examples/LifecycleModel/EstimationParameters.py rename to docs/examples/LifecycleModel/EstimationParameters.py diff --git a/examples/LifecycleModel/LifecycleModel.ipynb b/docs/examples/LifecycleModel/LifecycleModel.ipynb similarity index 100% rename from examples/LifecycleModel/LifecycleModel.ipynb rename to docs/examples/LifecycleModel/LifecycleModel.ipynb diff --git a/examples/MonteCarlo/Generic Monte Carlo Perfect Foresight.ipynb b/docs/examples/MonteCarlo/Generic Monte Carlo Perfect Foresight.ipynb similarity index 100% rename from examples/MonteCarlo/Generic Monte Carlo Perfect Foresight.ipynb rename to docs/examples/MonteCarlo/Generic Monte Carlo Perfect Foresight.ipynb diff --git a/Documentation/guides/contributing.md b/docs/guides/contributing.md similarity index 97% rename from Documentation/guides/contributing.md rename to docs/guides/contributing.md index 3535e1ee3..69ca9f390 100644 --- a/Documentation/guides/contributing.md +++ b/docs/guides/contributing.md @@ -258,7 +258,7 @@ 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), +In [NARK](https://github.com/econ-ark/HARK/blob/master/docs/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. @@ -351,7 +351,7 @@ the HARK team asks that you also provide a short mathematical writeup of the mod 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. +See [ConsumptionSavingModels.pdf](https://github.com/econ-ark/HARK/blob/master/docs/ConsumptionSavingModels.pdf) for an example of this. #### Contributing to documentation @@ -376,7 +376,7 @@ To test your changes to the documentation locally, you can render as follows: 2. Run `sphinx-build`: ```bash - sphinx-build -M html . HARK-docs -T -c Documentation -W + sphinx-build -M html . HARK-docs -T -c docs ``` 3. View the rendered HTML by opening the @@ -389,9 +389,9 @@ Every pull request to HARK automatically reruns every example notebook to keep them up to date. To add a notebook from the examples folder to the documentation, add a link -to the notebook to the `Documentation/overview/index.rst` file. It should +to the notebook to the `docs/overview/index.rst` file. It should the format `../../examples/AAA/BBB.ipynb`. Then add a link to the notebook -in the `Documentation/example_notebooks/Include_list.txt` file. It should have +in the `docs/example_notebooks/Include_list.txt` file. It should have the format `examples/AAA/BBB.ipynb`. Sphinx requires it's example notebooks to have a title, and headings in order of @@ -405,7 +405,7 @@ is made. Including the HARK-docs folder may create unexpected conflicts. If you would like to build the documentation without warnings being treated as errors use the command: ```bash - sphinx-build -M html . HARK-docs -T -c Documentation + sphinx-build -M html . HARK-docs -T -c docs ``` This lets you see every warning without sphinx quitting after the first issue it finds. If you're doing this, make sure to delete the HARK-docs folder before running it again. diff --git a/Documentation/guides/index.rst b/docs/guides/index.rst similarity index 100% rename from Documentation/guides/index.rst rename to docs/guides/index.rst diff --git a/Documentation/guides/installation.md b/docs/guides/installation.md similarity index 100% rename from Documentation/guides/installation.md rename to docs/guides/installation.md diff --git a/Documentation/guides/quick_start.md b/docs/guides/quick_start.md similarity index 94% rename from Documentation/guides/quick_start.md rename to docs/guides/quick_start.md index 82ac21d7d..370e3b5e8 100644 --- a/Documentation/guides/quick_start.md +++ b/docs/guides/quick_start.md @@ -20,7 +20,7 @@ pip install econ-ark We've prepared a set of 30-second Elevator Spiels describing the project, tailored to people with several different kinds of background. -To start learning HARK we recommend working through the [Overview and Examples](https://docs.econ-ark.org/Documentation/overview/index.html) section starting with [A Gentle Introduction to HARK](https://docs.econ-ark.org/examples/Gentle-Intro/Gentle-Intro-To-HARK.html). +To start learning HARK we recommend working through the [Overview and Examples](https://docs.econ-ark.org/docs/overview/index.html) section starting with [A Gentle Introduction to HARK](https://docs.econ-ark.org/examples/Gentle-Intro/Gentle-Intro-To-HARK.html). :::{dropdown} For people without a technical/scientific/computing background :color: secondary @@ -43,7 +43,7 @@ Most of what economists have done so far with 'big data' has been like what Kepl The Econ-ARK project is motivated by a sense that quantitative structural modeling of economic agents' behavior (consumers; firms), at present, is roughly like econometric modeling in the 1960s: Lots of theoretical results are available and a great deal can be done in principle, but actually using such tools for any specific research question requires an enormous investment of a scholar's time and attention to learn techniques that are fundamentally not related to economics but instead are algorithmic/computational (in the 1960s, e.g., inverting matrices; now, e.g., solving dynamic stochastic optimization problems). The toolkit is built using the suite of open source, transparent tools for collaborative software development that have become ubiquitous in other fields in the last few years: Github, object-oriented coding, and methods that make it much easier to produce plug-and-play software modules that can be (relatively) easily combined, enhanced and adapted to address new problems. -After working through the [Overview and Examples](https://docs.econ-ark.org/Documentation/overview/index.html) section: +After working through the [Overview and Examples](https://docs.econ-ark.org/docs/overview/index.html) section: - 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) @@ -57,7 +57,7 @@ After working through the [Overview and Examples](https://docs.econ-ark.org/Docu Dissatisfaction with the ability of Representative Agent models to answer important questions raised by the Great Recession has led to a strong movement in the macroeconomics literature toward 'Heterogeneous Agent' models, in which microeconomic agents (consumers; firms) solve a structural problem calibrated to match microeconomic data; aggregate outcomes are derived by explicitly simulating the equilibrium behavior of populations solving such models. The same kinds of modeling techniques are also gaining popularity among microeconomists, in areas ranging from labor economics to industrial organization. In both macroeconomics and structural micro, the chief barrier to the wide adoption of these techniques has been that programming a structural model has, until now, required a great deal of specialized knowledge and custom software development. The aim of the Econ-ARK project is to provide a robust, well-designed, open-source infrastructure for building such models much more efficiently than has been possible in the past. -After working through the [Overview and Examples](https://docs.econ-ark.org/Documentation/overview/index.html) section: +After working through the [Overview and Examples](https://docs.econ-ark.org/docs/overview/index.html) section: - 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/SolvingMicroDSOPs/) [REMARK](https://github.com/econ-ark/REMARK); this code implements the solution methods described in the corresponding section of [these lecture notes](https://llorracc.github.io/SolvingMicroDSOPs/). ::: @@ -70,7 +70,7 @@ The Econ-ARK project's aim is to create a modular and extensible open-source too ### Demonstrations on using HARK -Most of the modules in HARK are just collections of tools. There are a few demonstrations/applications that use the tools that you automatically get when you install HARK -- they are available in [Overview & Examples](https://docs.econ-ark.org/Documentation/overview/index.html). A much larger set of uses of HARK can be found at two repositories: +Most of the modules in HARK are just collections of tools. There are a few demonstrations/applications that use the tools that you automatically get when you install HARK -- they are available in [Overview & Examples](https://docs.econ-ark.org/docs/overview/index.html). 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 @@ -91,4 +91,4 @@ jupyter notebook ## Next steps -To learn more about how to use HARK, check the next sections in this documentation, in particular the example notebooks. For instructions on making changes to HARK, refer to our [contributing guide](https://docs.econ-ark.org/Documentation/guides/contributing.html). +To learn more about how to use HARK, check the next sections in this documentation, in particular the example notebooks. For instructions on making changes to HARK, refer to our [contributing guide](https://docs.econ-ark.org/docs/guides/contributing.html). diff --git a/Documentation/images/econ-ark-logo.png b/docs/images/econ-ark-logo.png similarity index 100% rename from Documentation/images/econ-ark-logo.png rename to docs/images/econ-ark-logo.png diff --git a/Documentation/images/numfocus-logo.png b/docs/images/numfocus-logo.png similarity index 100% rename from Documentation/images/numfocus-logo.png rename to docs/images/numfocus-logo.png diff --git a/Documentation/images/usage-agent-problem-bellman-form.png b/docs/images/usage-agent-problem-bellman-form.png similarity index 100% rename from Documentation/images/usage-agent-problem-bellman-form.png rename to docs/images/usage-agent-problem-bellman-form.png diff --git a/Documentation/images/usage-crra-utility-function.png b/docs/images/usage-crra-utility-function.png similarity index 100% rename from Documentation/images/usage-crra-utility-function.png rename to docs/images/usage-crra-utility-function.png diff --git a/Documentation/index_core.rst b/docs/index.rst similarity index 85% rename from Documentation/index_core.rst rename to docs/index.rst index 8b0f7b9f2..9a495ab5b 100644 --- a/Documentation/index_core.rst +++ b/docs/index.rst @@ -5,13 +5,13 @@ Econ-ARK documentation -- HARK :maxdepth: 1 :hidden: - Guides - Overview & Examples - Reference + Guides + Overview & Examples + Reference **Useful links**: -:doc:`Install HARK ` | +:doc:`Install HARK ` | `Source Repository `__ | `Issues & Ideas `__ @@ -44,7 +44,7 @@ you might want to look at the `DemARK +++ - .. button-ref:: Documentation/guides/quick_start + .. button-ref:: guides/quick_start :ref-type: doc :color: info :click-parent: @@ -63,7 +63,7 @@ you might want to look at the `DemARK +++ - .. button-ref:: Documentation/overview/index + .. button-ref:: overview/index :ref-type: doc :color: info :click-parent: @@ -83,7 +83,7 @@ you might want to look at the `DemARK +++ - .. button-ref:: Documentation/reference/index + .. button-ref:: reference/index :ref-type: doc :color: info :click-parent: @@ -105,7 +105,7 @@ you might want to look at the `DemARK +++ - .. button-ref:: Documentation/guides/contributing + .. button-ref:: guides/contributing :ref-type: doc :color: info :click-parent: diff --git a/Documentation/license.md b/docs/license.md similarity index 100% rename from Documentation/license.md rename to docs/license.md diff --git a/Documentation/make.bat b/docs/make.bat similarity index 100% rename from Documentation/make.bat rename to docs/make.bat diff --git a/Documentation/overview/ARKitecture.md b/docs/overview/ARKitecture.md similarity index 96% rename from Documentation/overview/ARKitecture.md rename to docs/overview/ARKitecture.md index 4401496cf..127095458 100644 --- a/Documentation/overview/ARKitecture.md +++ b/docs/overview/ARKitecture.md @@ -36,7 +36,7 @@ Python modules in HARK can generally be categorized into two types: tools and mo ## HARK -After you [installed](https://docs.econ-ark.org/Documentation/guides/installation.html) or [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 subclasses](#agenttype-class) and [Market subclasses](#market-class). +After you [installed](https://docs.econ-ark.org/docs/guides/installation.html) or [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 subclasses](#agenttype-class) and [Market subclasses](#market-class). ### General Purpose Tools @@ -53,15 +53,15 @@ Macroeconomic models in HARK use the **_Market_** class to represent a market (o #### HARK.metric **_HARK.metric_** defines a superclass called **_MetricObject_** that is used throughout HARK's tools and models. 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 unitless) distance between the object in question and the input to the method. As a convenient default, **_MetricObject_** provides a ''universal distance metric'' that should be useful in many contexts. (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. -) When defining a new subclass of **_MetricObject_**, 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://docs.econ-ark.org/Documentation/reference/tools/metric.html) for further documentation. +) When defining a new subclass of **_MetricObject_**, 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://docs.econ-ark.org/docs/reference/tools/metric.html) for further documentation. #### HARK.utilities -The **_HARK.utilities_** module contains a variety of general purpose tools, including some data manipulation tools (e.g. for calculating an average of data conditional on being within a percentile range of different data), basic kernel regression tools, convenience functions for retrieving information about functions, and basic plotting tools using **_matplotlib.pyplot_**. See [here](https://docs.econ-ark.org/Documentation/reference/tools/utilities.html) for further documentation. +The **_HARK.utilities_** module contains a variety of general purpose tools, including some data manipulation tools (e.g. for calculating an average of data conditional on being within a percentile range of different data), basic kernel regression tools, convenience functions for retrieving information about functions, and basic plotting tools using **_matplotlib.pyplot_**. See [here](https://docs.econ-ark.org/docs/reference/tools/utilities.html) for further documentation. #### HARK.distributions -The **_HARK.distributions_** module includes classes for representing continuous distributions in a relatively consistent framework. Critically for numeric purposes, it also has methods and functions for constructing discrete approximations to those distributions (e.g. **_approx\_lognormal()_** 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. 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://docs.econ-ark.org/Documentation/reference/tools/distribution.html) for further documentation. +The **_HARK.distributions_** module includes classes for representing continuous distributions in a relatively consistent framework. Critically for numeric purposes, it also has methods and functions for constructing discrete approximations to those distributions (e.g. **_approx\_lognormal()_** 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. 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://docs.econ-ark.org/docs/reference/tools/distribution.html) for further documentation. #### HARK.interpolation @@ -69,15 +69,15 @@ The **_HARK.interpolation_** module defines classes for representing interpolate 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 **_MetricObject_**, 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, interpolors for representing functions whose domain lower bound in one dimension depends on the other domain values, and 1D lower/upper envelope interpolators. See [here](https://docs.econ-ark.org/Documentation/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, interpolors for representing functions whose domain lower bound in one dimension depends on the other domain values, and 1D lower/upper envelope interpolators. See [here](https://docs.econ-ark.org/docs/reference/tools/interpolation.html) for further documentation. #### HARK.estimation -Functions 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_**. The module also has functions for a parallel implementation of the Nelder-Mead simplex algorithm, as described in Wiswall and Lee (2011). Future functionality will include more robust global search methods, including genetic algorithms, simulated annealing, and differential evolution. See [here](https://docs.econ-ark.org/Documentation/reference/tools/estimation.html) for full documentation. +Functions 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_**. The module also has functions for a parallel implementation of the Nelder-Mead simplex algorithm, as described in Wiswall and Lee (2011). Future functionality will include more robust global search methods, including genetic algorithms, simulated annealing, and differential evolution. See [here](https://docs.econ-ark.org/docs/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. In particular, it provides the function **_multi\_thread\_commands_**, 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 **_multi\_thread\_commands\_fake_** that does just that, with identical syntax to **_multi\_thread_\commands_**. Multithreading in HARK can thus be easily turned on and off. See [here](https://docs.econ-ark.org/Documentation/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. In particular, it provides the function **_multi\_thread\_commands_**, 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 **_multi\_thread\_commands\_fake_** that does just that, with identical syntax to **_multi\_thread_\commands_**. Multithreading in HARK can thus be easily turned on and off. See [here](https://docs.econ-ark.org/docs/reference/tools/parallel.html) for full documentation. #### HARK.rewards diff --git a/docs/overview/index.rst b/docs/overview/index.rst new file mode 100644 index 000000000..9a8bf8f00 --- /dev/null +++ b/docs/overview/index.rst @@ -0,0 +1,27 @@ +Overview +======== + +.. toctree:: + :caption: Introduction to HARK + :maxdepth: 1 + + introduction + ARKitecture + +.. nbgallery is a wrapper around the toctree directive, see + https://nbsphinx.readthedocs.io/en/latest/a-normal-rst-file.html#thumbnail-galleries + +.. nbgallery:: + :caption: Examples + :glob: + :maxdepth: 1 + + ../examples/*/* + ../examples/*/*/* + +.. toctree:: + :hidden: + :caption: Extras + + ../CHANGELOG + ../license diff --git a/Documentation/overview/introduction.md b/docs/overview/introduction.md similarity index 100% rename from Documentation/overview/introduction.md rename to docs/overview/introduction.md diff --git a/Documentation/reference/ConsumptionSaving/ConsAggShockModel.rst b/docs/reference/ConsumptionSaving/ConsAggShockModel.rst similarity index 100% rename from Documentation/reference/ConsumptionSaving/ConsAggShockModel.rst rename to docs/reference/ConsumptionSaving/ConsAggShockModel.rst diff --git a/Documentation/reference/ConsumptionSaving/ConsBequestModel.rst b/docs/reference/ConsumptionSaving/ConsBequestModel.rst similarity index 100% rename from Documentation/reference/ConsumptionSaving/ConsBequestModel.rst rename to docs/reference/ConsumptionSaving/ConsBequestModel.rst diff --git a/Documentation/reference/ConsumptionSaving/ConsGenIncProcessModel.rst b/docs/reference/ConsumptionSaving/ConsGenIncProcessModel.rst similarity index 100% rename from Documentation/reference/ConsumptionSaving/ConsGenIncProcessModel.rst rename to docs/reference/ConsumptionSaving/ConsGenIncProcessModel.rst diff --git a/Documentation/reference/ConsumptionSaving/ConsIndShockModel.rst b/docs/reference/ConsumptionSaving/ConsIndShockModel.rst similarity index 100% rename from Documentation/reference/ConsumptionSaving/ConsIndShockModel.rst rename to docs/reference/ConsumptionSaving/ConsIndShockModel.rst diff --git a/Documentation/reference/ConsumptionSaving/ConsIndShockModelFast.rst b/docs/reference/ConsumptionSaving/ConsIndShockModelFast.rst similarity index 100% rename from Documentation/reference/ConsumptionSaving/ConsIndShockModelFast.rst rename to docs/reference/ConsumptionSaving/ConsIndShockModelFast.rst diff --git a/Documentation/reference/ConsumptionSaving/ConsLaborModel.rst b/docs/reference/ConsumptionSaving/ConsLaborModel.rst similarity index 100% rename from Documentation/reference/ConsumptionSaving/ConsLaborModel.rst rename to docs/reference/ConsumptionSaving/ConsLaborModel.rst diff --git a/Documentation/reference/ConsumptionSaving/ConsMarkovModel.rst b/docs/reference/ConsumptionSaving/ConsMarkovModel.rst similarity index 100% rename from Documentation/reference/ConsumptionSaving/ConsMarkovModel.rst rename to docs/reference/ConsumptionSaving/ConsMarkovModel.rst diff --git a/Documentation/reference/ConsumptionSaving/ConsMedModel.rst b/docs/reference/ConsumptionSaving/ConsMedModel.rst similarity index 100% rename from Documentation/reference/ConsumptionSaving/ConsMedModel.rst rename to docs/reference/ConsumptionSaving/ConsMedModel.rst diff --git a/Documentation/reference/ConsumptionSaving/ConsPortfolioModel.rst b/docs/reference/ConsumptionSaving/ConsPortfolioModel.rst similarity index 100% rename from Documentation/reference/ConsumptionSaving/ConsPortfolioModel.rst rename to docs/reference/ConsumptionSaving/ConsPortfolioModel.rst diff --git a/Documentation/reference/ConsumptionSaving/ConsPrefShochModel.rst b/docs/reference/ConsumptionSaving/ConsPrefShochModel.rst similarity index 100% rename from Documentation/reference/ConsumptionSaving/ConsPrefShochModel.rst rename to docs/reference/ConsumptionSaving/ConsPrefShochModel.rst diff --git a/Documentation/reference/ConsumptionSaving/ConsRepAgentModel.rst b/docs/reference/ConsumptionSaving/ConsRepAgentModel.rst similarity index 100% rename from Documentation/reference/ConsumptionSaving/ConsRepAgentModel.rst rename to docs/reference/ConsumptionSaving/ConsRepAgentModel.rst diff --git a/Documentation/reference/ConsumptionSaving/ConsRiskyAssetModel.rst b/docs/reference/ConsumptionSaving/ConsRiskyAssetModel.rst similarity index 100% rename from Documentation/reference/ConsumptionSaving/ConsRiskyAssetModel.rst rename to docs/reference/ConsumptionSaving/ConsRiskyAssetModel.rst diff --git a/Documentation/reference/ConsumptionSaving/ConsRiskyContribModel.rst b/docs/reference/ConsumptionSaving/ConsRiskyContribModel.rst similarity index 100% rename from Documentation/reference/ConsumptionSaving/ConsRiskyContribModel.rst rename to docs/reference/ConsumptionSaving/ConsRiskyContribModel.rst diff --git a/Documentation/reference/ConsumptionSaving/TractableBufferStockModel.rst b/docs/reference/ConsumptionSaving/TractableBufferStockModel.rst similarity index 100% rename from Documentation/reference/ConsumptionSaving/TractableBufferStockModel.rst rename to docs/reference/ConsumptionSaving/TractableBufferStockModel.rst diff --git a/Documentation/reference/ConsumptionSaving/index.rst b/docs/reference/ConsumptionSaving/index.rst similarity index 100% rename from Documentation/reference/ConsumptionSaving/index.rst rename to docs/reference/ConsumptionSaving/index.rst diff --git a/Documentation/reference/index.rst b/docs/reference/index.rst similarity index 100% rename from Documentation/reference/index.rst rename to docs/reference/index.rst diff --git a/Documentation/reference/tools/core.rst b/docs/reference/tools/core.rst similarity index 100% rename from Documentation/reference/tools/core.rst rename to docs/reference/tools/core.rst diff --git a/Documentation/reference/tools/dcegm.rst b/docs/reference/tools/dcegm.rst similarity index 100% rename from Documentation/reference/tools/dcegm.rst rename to docs/reference/tools/dcegm.rst diff --git a/Documentation/reference/tools/distribution.rst b/docs/reference/tools/distribution.rst similarity index 100% rename from Documentation/reference/tools/distribution.rst rename to docs/reference/tools/distribution.rst diff --git a/Documentation/reference/tools/econforgeinterp.rst b/docs/reference/tools/econforgeinterp.rst similarity index 100% rename from Documentation/reference/tools/econforgeinterp.rst rename to docs/reference/tools/econforgeinterp.rst diff --git a/Documentation/reference/tools/estimation.rst b/docs/reference/tools/estimation.rst similarity index 100% rename from Documentation/reference/tools/estimation.rst rename to docs/reference/tools/estimation.rst diff --git a/Documentation/reference/tools/helpers.rst b/docs/reference/tools/helpers.rst similarity index 100% rename from Documentation/reference/tools/helpers.rst rename to docs/reference/tools/helpers.rst diff --git a/Documentation/reference/tools/incomeprocess.rst b/docs/reference/tools/incomeprocess.rst similarity index 100% rename from Documentation/reference/tools/incomeprocess.rst rename to docs/reference/tools/incomeprocess.rst diff --git a/Documentation/reference/tools/index.rst b/docs/reference/tools/index.rst similarity index 100% rename from Documentation/reference/tools/index.rst rename to docs/reference/tools/index.rst diff --git a/Documentation/reference/tools/interpolation.rst b/docs/reference/tools/interpolation.rst similarity index 100% rename from Documentation/reference/tools/interpolation.rst rename to docs/reference/tools/interpolation.rst diff --git a/Documentation/reference/tools/model.rst b/docs/reference/tools/model.rst similarity index 100% rename from Documentation/reference/tools/model.rst rename to docs/reference/tools/model.rst diff --git a/Documentation/reference/tools/numba_tools.rst b/docs/reference/tools/numba_tools.rst similarity index 100% rename from Documentation/reference/tools/numba_tools.rst rename to docs/reference/tools/numba_tools.rst diff --git a/Documentation/reference/tools/parallel.rst b/docs/reference/tools/parallel.rst similarity index 100% rename from Documentation/reference/tools/parallel.rst rename to docs/reference/tools/parallel.rst diff --git a/Documentation/reference/tools/rewards.rst b/docs/reference/tools/rewards.rst similarity index 100% rename from Documentation/reference/tools/rewards.rst rename to docs/reference/tools/rewards.rst diff --git a/Documentation/reference/tools/simulation.rst b/docs/reference/tools/simulation.rst similarity index 100% rename from Documentation/reference/tools/simulation.rst rename to docs/reference/tools/simulation.rst diff --git a/Documentation/reference/tools/utilities.rst b/docs/reference/tools/utilities.rst similarity index 100% rename from Documentation/reference/tools/utilities.rst rename to docs/reference/tools/utilities.rst diff --git a/Documentation/reference/tools/validators.rst b/docs/reference/tools/validators.rst similarity index 100% rename from Documentation/reference/tools/validators.rst rename to docs/reference/tools/validators.rst diff --git a/examples/Journeys/Journey-PhD.ipynb b/examples/Journeys/Journey-PhD.ipynb deleted file mode 100644 index 8c2f25f94..000000000 --- a/examples/Journeys/Journey-PhD.ipynb +++ /dev/null @@ -1,541 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Journey: Economics PhD Student\n", - "====\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## 1 Introduction\n", - "\n", - "This notebook is designed as an introduction to someone with the training of a 1st year Economics student, but perhaps without much background in computer programming or scientific computation. As it is a \"journey,\" it is not one big tutorial, but a set of links to notebooks and other resources which will help you understand the different HARK objects and functionalities.\n", - "\n", - "This journey does not require any special skill in programming. However, we recommend you take a few introductory tutorials in Python and object-oriented programming (OOP) to make you familiar with the basic concepts. Moreover, we assume some knowledge in economic theory.\n", - "\n", - "As you have found this journey, you probably have a concept of what a heterogeneous agent model is, but here is a short recap. Think about a basic, infinitely lived consumer problem as you know from first-year graduate courses (letting alone the companies and general equilibrium for now). Using the Bellman equation, we can write it as:\n", - "\n", - "\\begin{eqnarray*}\n", - "V(M_t) &=& \\max_{C_t} U(C_t) + \\beta V(M_{t+1}), \\\\\n", - "& s.t. & \\\\\n", - "A_t &=& M_t - C_t, \\\\\n", - "M_{t+1} &=& R (M_{t}-C_{t}) + Y_t, \\\\\n", - "\\end{eqnarray*}\n", - "\n", - "\n", - "Where $\\beta <1$ is a discount factor, $C_t$ is consumption, $A_t$ - assets, $Y_t$ - income and $U(C)$ is a standard CRRA utility function:\n", - "\n", - "$$\n", - "U(C)=\\frac{C^{1-\\rho}}{1-\\rho}.\n", - "$$\n", - "\n", - "Now assume that every consumer faces some uncertainty on her income which is subject to idiosyncratic shocks - the realizations of each shock is (potentially) different for each agent. In this setting, it follows an AR (1) process, so that the current value of $Y$ is a state variable that predicts future values of $Y$.\n", - "\n", - "Then, the Bellman equation looks like:\n", - "\n", - "\\begin{eqnarray*}\n", - "V(M_t, Y_t) &=& \\max_{C_t} U(C_t) + E[\\beta V(M_{t+1}, Y_{t+1})], \\\\\n", - "& s.t. & \\\\\n", - "A_t &=& M_t - C_t, \\\\\n", - "M_{t+1} &=& R (M_{t}-C_{t}) + Y_t, \\\\\n", - "\\end{eqnarray*}\n", - "\n", - "Finding a distribution of agent assets (consumption, savings) must involve much more advanced numerical tools than in the representative agent setting. This is more demanding task to accomplish and master. Moreover, the knowledge about involved numerical methods is less systematic, and often hard to find. To quote the HARK [Documentation](https://docs.econ-ark.org/Documentation/overview/introduction.html):\n", - "\n", - "*\"After months of effort, you may have had the character-improving experience of\n", - "proudly explaining to your adviser that not only had you grafted two ideas\n", - "together, you also found a trick that speeded the solution by an order of\n", - "magnitude, only to be told that your breathtaking insight had been understood\n", - "for many years, as reflected in an appendix to a 2008 paper; or, worse, your\n", - "discovery was something that “everybody knows” but did not exist at all in\n", - "published form!\"*\n", - "\n", - "HARK was designed to help you avoid similar experiences. We see two main uses of this package and its tools:\n", - "\n", - "- To simulate the standard heterogeneous agent models without learning all the numerical methods\n", - "- To solve your own models building-on the already implemented algorithms\n", - "\n", - "This journey will help you mostly with using HARK in the first way. We do not elaborate here the numerical methods; however, in the last sections you can find some guidance on which methods were used and how the source code is structured.\n", - "\n", - "Although using the prepared package is easier than writing your own solution (what you will need to do sooner or later if you create an original heterogeneous agent model), there is much effort in comprehending the main classes and functionalities of HARK. We hope that this journey will make it easier! We believe that it also will be your first step into the world of the heterogeneous agents modeling.\n", - "\n", - "---\n", - "NOTE\n", - "***\n", - "We will be very happy to see your feedback. If you have any questions regarding this tutorial or HARK as a whole please see our [Github page](https://github.com/econ-ark/HARK).\n", - "\n", - "---" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## 2 Before you start\n", - "\n", - "As we have mentioned before, this journey does not require any special skill in programming. However, some knowledge about Python and object-oriented programing (OOP) is needed. We propose two possible ways to gather the basic concepts; however, plenty of others resources are available:\n", - "\n", - "- Quick introduction to Python and OOP: chapters five to seven from [Quantecon](https://python-programming.quantecon.org/intro.html) should familiarize you with everything what you need for the first tutorials.\n", - "- A little longer introduction (if you want to learn something about used numerical methods):\n", - " - Start with the basic Python [tutorial](https://docs.python.org/3/tutorial)\n", - " - Get some knowledge about [Numpy](https://numpy.org/doc/stable/user/quickstart.html)\n", - "- You can also learn Python by learning Machine learning, as there are many tutorials constructed in that way (one example is [scikit-learn tutorials](https://scikit-learn.org/stable/tutorial/index.html))." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## 3 Few words about HARK structure\n", - "\n", - "HARK was written using OOP (we hope that you skimmed the tutorials and have some understanding of this). This means that different parts of the model, like different types of consumers, firms, and general equilibrium conditions (if you have these components in the model), are implemented as different *objects*. Such structure enables you to build your own models with different consumer-type distributions / company structure (if you want some). Importantly, learning the package with such structure implies learning the different types of objects (classes).\n", - "\n", - "In HARK there are two main classes: `AgentType` (think consumers, microeconomic models) and `Market` (think general equilibrium, macroeconomic models). As AgentType objects are the attributes of the Market, we first present this type (additionally, if you are interested only in microeconomic research, you may not want to study the Market class).\n", - "\n", - "In practice, it will take more than two classes to accommodate the variety of models constructed using the toolkit. Thus, each class will have subclasses and those their own subclasses. In general, a more sophisticated class will be defined as a subclass. This journey will reflect this structure, first by presenting the most primitive models, and then the more fancy ones.\n", - "\n", - "---\n", - "NOTE\n", - "***\n", - "In OOP, objects are organized in **classes** (the general structure of the objects) and more specific **subclasses**. The subclass inherits the methods and attributes from the its parent class. Thus, everything which you can do with the object from a general class can be done with the object from its subclass. In case of the economic models, the basic one are always the parent classes of the more sophisticated ones.\n", - "\n", - "---\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## 4 Agent-type class\n", - "Agent-type class enables you to build microeconomic models (such as the one presented in the introduction). It is also the essential part of the macroeconomic model in HARK. So remember: *to use HARK, you always need to use agent-type classes!*\n", - "\n", - "### 4.1 Introductory example\n", - "As an example, let's solve the stochastic model from the introduction. Assume the income process of the agent $i$ in the period t, $Y_{i,t}$, is given by:\n", - "\n", - "\\begin{eqnarray*}\n", - "Y_{i,t} &=& \\varepsilon_t(\\theta_{i,t} p_{i,t}) \\\\\n", - "p_{i,t+1} &=& p_{i,t}\\psi_{i,t+1}\\\\\n", - "\\psi_{i,t} & \\sim & N(1,\\sigma_{\\varrho})\\\\\n", - "\\theta_{i,t} & \\sim & N(1,\\sigma_{\\theta})\\\\\n", - "\\end{eqnarray*}\n", - "\n", - "To get a universal solution of this problem, we need to find a policy function (in this case consumption function). This can be done easily using the HARK `solve` function.\n", - "\n", - "Before doing this, we need to declare our model (we assume standard parametrization: R= 1.03, $\\rho = 2$, $\\beta = 0.96$, $P(\\varepsilon=0)= 0.005$, $P(\\varepsilon=1)= 0.995$, $\\sigma_{\\psi}= \\sigma_{\\theta}=0.1)$:\n", - "\n", - "[comment]: <> (Is this the correct description of the income process? The confusion comes from not knowing the names of a few parameters \"epsilon\", \"P v.s. p\"? Does this match the income process defined in the cstw paper?)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "execution": { - "iopub.execute_input": "2024-07-11T15:32:51.730143Z", - "iopub.status.busy": "2024-07-11T15:32:51.729888Z", - "iopub.status.idle": "2024-07-11T15:32:52.476452Z", - "shell.execute_reply": "2024-07-11T15:32:52.475866Z" - } - }, - "outputs": [], - "source": [ - "import os\n", - "import sys # set path of the notebook\n", - "\n", - "sys.path.insert(0, os.path.abspath(\"../../.\"))\n", - "# we previously defined the paramters to not bother you about it now\n", - "import JourneyPhDparam as Params # imported paramters\n", - "\n", - "from HARK.ConsumptionSaving.ConsIndShockModel import * # import the module for the idiosyncratic shocks\n", - "from HARK.utilities import plot_funcs # useful function\n", - "\n", - "Example = IndShockConsumerType()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Next we can solve the model and plot the consumption function:" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": { - "execution": { - "iopub.execute_input": "2024-07-11T15:32:52.478475Z", - "iopub.status.busy": "2024-07-11T15:32:52.478187Z", - "iopub.status.idle": "2024-07-11T15:32:52.773208Z", - "shell.execute_reply": "2024-07-11T15:32:52.772677Z" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Consumption function\n" - ] - }, - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAi4AAAGdCAYAAAA1/PiZAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8fJSN1AAAACXBIWXMAAA9hAAAPYQGoP6dpAAA+00lEQVR4nO3deXwU9f3H8ffmDiEJBEhCIIFwhEAOVBQE6p1yyhnPn209Wm0V64GVQwVEoAG02tZaPFpRaz05FQUEBFRAbswBBALhJgkEks1Brt35/RFJRW7YzexuXs/HI48Hu/vdmc/km515M7v7GYthGIYAAADcgJfZBQAAAFwoggsAAHAbBBcAAOA2CC4AAMBtEFwAAIDbILgAAAC3QXABAABug+ACAADcho/ZBfyc3W7XoUOHFBwcLIvFYnY5AADgAhiGoZKSEkVFRcnLy3nnRVwuuBw6dEjR0dFmlwEAAC7B/v371bp1a6ct3+WCS3BwsKTaDQ8JCTG5GgAAcCGsVquio6PrjuPO4nLB5eTbQyEhIQQXAADcjLM/5sGHcwEAgNsguAAAALdBcAEAAG6D4AIAANwGwQUAALgNggsAAHAbBBcAAOA2CC4AAMBtEFwAAIDbILgAAAC3QXABAABug+ACAADcBsEFAABcts37jtXLelzu6tAAAMB9lFbW6MVF2/XOym31sj6CCwAAuCQrsgv07NxMHSw6IcOon3XyVhEAALgox8uqNPLjLbpv5nodLDqh6LBAvfWbq+tl3ZxxAQAAF8QwDH2eflgTP8tSYVmVvCzS/b1j9VSfONVUlNdLDQQXAABwXoeLT+i5uZlatr1AkhQX0VjTUpN1ZUxTSZK1on7qILgAAICzstsNfbBun6Yu3K7Syhr5elv06E0d9fCN7eXnU/+fOCG4AACAM9p9pFRj5mRoXW7tV52vjGmiaanJiosINq0mggsAADhFjc2ut77N1StLd6iqx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3Ut/PN93333XfaNvTr1++8y3Xn+ZZ0xte6xWLRiy++eNZluvp8X8hxq6KiQiNGjFCzZs3UuHFjpaamKj8//5zLvdR9wk/Ve3D5+OOPNXLkSE2YMEGbNm1S165d1bdvXxUUFJxx/OrVq3X33Xfrt7/9rTZv3qyhQ4dq6NChyszMrOfKL93KlSs1YsQIff/991qyZImqq6vVp08flZWVnfN5ISEhOnz4cN3P3r1766lix0lISDhlG7777ruzjvWEuT5p/fr1p2z3kiVLJEm33377WZ/jjvNdVlamrl276rXXXjvj49OnT9ff//53vf7661q7dq2CgoLUt29fVVRUnHWZF7uPMMO5tru8vFybNm3SuHHjtGnTJs2ZM0fZ2dkaPHjweZd7Ma8XM5xvviWpX79+p2zDhx9+eM5luvt8Szplew8fPqy3335bFotFqamp51yuK8/3hRy3nnzySX3++ef69NNPtXLlSh06dEjDhw8/53IvZZ9wGqOede/e3RgxYkTdbZvNZkRFRRlpaWlnHH/HHXcYAwcOPOW+Hj16GL///e+dWqczFRQUGJKMlStXnnXMzJkzjdDQ0PorygkmTJhgdO3a9YLHe+Jcn/T4448b7du3N+x2+xkf94T5lmTMnTu37rbdbjciIyONF198se6+oqIiw9/f3/jwww/PupyL3UeY7efbfSbr1q0zJBl79+4965iLfb2Y7Uzbfe+99xpDhgy5qOV44nwPGTLEuPnmm885xt3m++fHraKiIsPX19f49NNP68Zs27bNkGSsWbPmjMu41H3Cz9XrGZeqqipt3LhRKSkpdfd5eXkpJSVFa9asOeNz1qxZc8p4Serbt+9Zx7uD4uJiSTrvhahKS0vVpk0bRUdHa8iQIcrKyqqP8hxq586dioqKUrt27XTPPfdo3759Zx3riXMt1f7dv//++3rggQdksVjOOs4T5vuncnNzlZeXd8qchoaGqkePHmed00vZR7iD4uJiWSwWNWnS5JzjLub14qpWrFih8PBwderUSQ8//LAKCwvPOtYT5zs/P19ffPGFfvvb3553rDvN98+PWxs3blR1dfUpcxcfH6+YmJizzt2l7BPOpF6Dy9GjR2Wz2RQREXHK/REREcrLyzvjc/Ly8i5qvKuz2+164okn1Lt3byUmJp51XKdOnfT2229r/vz5ev/992W329WrVy8dOHCgHqu9PD169NA777yjRYsWacaMGcrNzdV1112nkpKSM473tLk+ad68eSoqKtJ999131jGeMN8/d3LeLmZOL2Uf4eoqKio0evRo3X333ee84N7Fvl5cUb9+/fTee+9p2bJlmjZtmlauXKn+/fvLZrOdcbwnzve7776r4ODg875l4k7zfabjVl5envz8/E4L4+c7np8cc6HPOROXuzq0pxsxYoQyMzPP+15mz5491bNnz7rbvXr1UufOnfXGG29o0qRJzi7TIfr371/37+TkZPXo0UNt2rTRJ598ckH/G/EU//73v9W/f39FRUWddYwnzDdOV11drTvuuEOGYWjGjBnnHOsJr5e77rqr7t9JSUlKTk5W+/bttWLFCt1yyy0mVlZ/3n77bd1zzz3n/XC9O833hR636ku9nnFp3ry5vL29T/vUcX5+viIjI8/4nMjIyIsa78oeffRRLViwQMuXL1fr1q0v6rm+vr668sorlZOT46TqnK9JkyaKi4s76zZ40lyftHfvXi1dulS/+93vLup5njDfJ+ftYub0UvYRrupkaNm7d6+WLFlyzrMtZ3K+14s7aNeunZo3b37WbfCk+Zakb7/9VtnZ2Rf9epdcd77PdtyKjIxUVVWVioqKThl/vuP5yTEX+pwzqdfg4ufnp27dumnZsmV199ntdi1btuyU/23+VM+ePU8ZL0lLliw563hXZBiGHn30Uc2dO1dff/21YmNjL3oZNptNGRkZatmypRMqrB+lpaXatWvXWbfBE+b652bOnKnw8HANHDjwop7nCfMdGxuryMjIU+bUarVq7dq1Z53TS9lHuKKToWXnzp1aunSpmjVrdtHLON/rxR0cOHBAhYWFZ90GT5nvk/7973+rW7du6tq160U/19Xm+3zHrW7dusnX1/eUucvOzta+ffvOOneXsk84W3H16qOPPjL8/f2Nd955x9i6davx0EMPGU2aNDHy8vIMwzCMX//618aYMWPqxq9atcrw8fExXnrpJWPbtm3GhAkTDF9fXyMjI6O+S79kDz/8sBEaGmqsWLHCOHz4cN1PeXl53Zifb/fEiRONxYsXG7t27TI2btxo3HXXXUZAQICRlZVlxiZckqeeespYsWKFkZuba6xatcpISUkxmjdvbhQUFBiG4Zlz/VM2m82IiYkxRo8efdpjnjLfJSUlxubNm43NmzcbkoyXX37Z2Lx5c923Z6ZOnWo0adLEmD9/vpGenm4MGTLEiI2NNU6cOFG3jJtvvtl49dVX626fbx/hCs613VVVVcbgwYON1q1bG1u2bDnlNV9ZWVm3jJ9v9/leL67gXNtdUlJi/OlPfzLWrFlj5ObmGkuXLjWuuuoqo2PHjkZFRUXdMjxtvk8qLi42GjVqZMyYMeOMy3C3+b6Q49Yf/vAHIyYmxvj666+NDRs2GD179jR69ux5ynI6depkzJkzp+72hewTzqfeg4thGMarr75qxMTEGH5+fkb37t2N77//vu6xG264wbj33ntPGf/JJ58YcXFxhp+fn5GQkGB88cUX9Vzx5ZF0xp+ZM2fWjfn5dj/xxBN1v6OIiAhjwIABxqZNm+q/+Mtw5513Gi1btjT8/PyMVq1aGXfeeaeRk5NT97gnzvVPLV682JBkZGdnn/aYp8z38uXLz/i3fXLb7Ha7MW7cOCMiIsLw9/c3brnlltN+H23atDEmTJhwyn3n2ke4gnNtd25u7llf88uXL69bxs+3+3yvF1dwru0uLy83+vTpY7Ro0cLw9fU12rRpYzz44IOnBRBPm++T3njjDSMwMNAoKio64zLcbb4v5Lh14sQJ45FHHjGaNm1qNGrUyBg2bJhx+PDh05bz0+dcyD7hfCw/LhgAAMDlca0iAADgNgguAADAbRBcAACA2yC4AAAAt0FwAQAAboPgAgAA3AbBBQAAuA2CCwAAcBsEFwAA4DYILgAAwG0QXAAAgNsguAAAALfx/+A9v74SDt/+AAAAAElFTkSuQmCC", - "text/plain": [ - "
" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "Example.solve()\n", - "min_v = Example.solution[\n", - " 0\n", - "].mNrmMin # minimal value for which the consumption function is defined\n", - "max_v = 20\n", - "print(\"Consumption function\")\n", - "plot_funcs([Example.solution[0].cFunc], min_v, max_v)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### 4.2 The Agent-Type structure\n", - "To understand the microeconomic models in HARK, you need to have some concept of the Agent-type class structure. As it was mentioned, in HARK more advanced models are subclasses of the more primitive ones. The following diagram illustrates this structure: the deterministic class `PerfForesightConsumerType` is the parent for the class of the consumers with idiosyncratic income shocks `IndShockConsumerType`. Subsequently, there is a class defined with both idiosyncratic and aggregate income shocks `𝙼𝚊𝚛𝚔𝚘𝚟ConsumerType`.\n", - "\n", - "![HARK structure](HARK-struct-2.png)\n", - "\n", - "However, it doesn't end there! There are subclasses of the `AggShockConsumerType` which are designed to be integrated with macroeconomic models (we will discuss them in the section devoted to the Market class), as well as there are many other subclasses (which we will mention in the supplementary section)." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### 4.3 Main tutorials\n", - "\n", - "To reflect the agent-type structure, we propose you start with the Quickstart notebook (it is devoted to the deterministic case). Then proceed to the idiosyncratic consumers and then to consumers with aggregate and idiosyncratic shocks. The exact order of the suggested tutorials is given in the table.\n", - "\n", - "\n", - "|Number | Tutorial | Description|\n", - "| :---- | :---- | :---- |\n", - "|1 |[Quickstart](https://github.com/econ-ark/HARK/blob/master/examples/Journeys/Quickstart_tutorial/Quick_start_with_solution.ipynb) |This tutorial familiarize you with the basic HARK objects and functionalities.
You will learn how to create, solve, plot and simulate the deterministic
microeconomic models ($\\texttt{PerfForesightConsumerType}$ class).|\n", - "|2 |[Idiosyncratic consumers](https://github.com/econ-ark/HARK/blob/master/examples/ConsIndShockModel/IndShockConsumerType.ipynb) |In this tutorial you will learn how to deal
with the microeconomic models with agents with idiosyncratic shocks:
individual productivity shocks ($\\texttt{IndShockConsumerType}$ class). It builds on the Quickstart. |\n", - "|3|[Nondurables during great recession](https://github.com/econ-ark/DemARK/blob/master/notebooks/Nondurables-During-Great-Recession.ipynb)| Use you knowledge about HARK to conduct a few economic experiments!
You will examine the effects of the uncertinity increase on the heterogenous
agents with idiosyncratic income risk.|\n", - "|4|[Chinese-Growth](https://github.com/econ-ark/DemARK/blob/master/notebooks/Chinese-Growth.ipynb)|Learn how to dealt with models with idiosyncratic
and aggregate risk ($\\texttt{𝙼𝚊𝚛𝚔𝚘𝚟ConsumerType}$ class).
Next build advanced simulation with many agent types.|\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### 4.4 Supplementary tutorials\n", - "\n", - "The aforementioned four tutorials are the most essential ones. However, in HARK there are a few other classes with a similar structure as three basic ones (with some minor differences). Here is a list of the notebooks which familiarize you with them (if you so wish, as it is not required to understand the next topics).\n", - "\n", - "|Number | Tutorial | Description|\n", - "| :---- | :---- | :---- |\n", - "|1* |[Kinked consumer](https://github.com/econ-ark/HARK/blob/master/examples/ConsIndShockModel/KinkedRconsumerType.ipynb) | $\\texttt{KinkedRconsumerType}$ is a subclass of $\\texttt{IndShockConsumerType}$.
In enables to set different borrowing and lending interest rate. |\n", - "|2* |[Buffer-stock consumer](https://github.com/econ-ark/DemARK/blob/master/notebooks/Gentle-Intro-To-HARK-Buffer-Stock-Model.ipynb) | In the Buffer Stock model, the unemployment state (zero income stat) is irreversible.
This framework is implemented by $\\texttt{TractableConsumerType}$ class.
For the analytical properties of buffer stock model check this [lecture notes](https://www.econ2.jhu.edu/people/ccarroll/public/LectureNotes/Consumption/TractableBufferStock/).|\n", - "|3*|[Generalized income process](https://github.com/econ-ark/HARK/blob/master/examples/GenIncProcessModel/GenIncProcessModel.ipynb)| In $\\texttt{IndShockConsumerType}$ class, the idiosyncratic income shocks
were assumed to be or purely permanent or purely transitory. In the similar class
$\\texttt{PersistentShockConsumerType}$ the income shocks follows AR(1) process with parameter <1,
thus there are not full permanent nor transitory
(it was called generalized income process).|\n", - "\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## 5 Market class\n", - "\n", - "In macroeconomic models, the consumers are only one possible type of agent. In such models, the economy contains also firms and a government (or other types of agents). In HARK, several standard macro models were implemented using the **Market** class and its subclasses.\n", - "\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### 5.1 Introductory example\n", - "\n", - "Let's extend our model from the previous section. Assume the perfect competition and Cobb-Douglas production function:\n", - "\n", - "\\begin{eqnarray*}\n", - "y_t = k_t^{\\alpha} n_t^{1-\\alpha}\n", - "\\end{eqnarray*}\n", - "Thus, the producers' problem is:\n", - "\\begin{eqnarray*}\n", - "\\max_{k_t, n_t} &\\: k_t^{\\alpha} n_t^{1-\\alpha} - (R_t +\\delta)k_t-w_t n_t\n", - "\\end{eqnarray*}\n", - "\n", - "Where $k_t$ is capital, $n_t$ is labour, $\\delta$ is a depreciation rate.\n", - "\n", - "In this case, consumers' incomes are determined by the wage:\n", - "\n", - "[comment]: <> (Should there be an equation here? Or is this information apparent from the bellman equation?)\n", - "\n", - "\\begin{eqnarray*}\n", - "V(M_{i,t}, Y_{i,t}) &=& \\max_{C_{i,t}, M_{i,t+1}} U(C_{i,t}) + E[\\beta V(M_{i,t+1}, Y_{i,t+1})], \\\\\n", - "& s.t. & \\\\\n", - "A_{i,t} &=& M_{i,t} - C_{i,t}, \\\\\n", - "M_{i,t+1} &=& R_{t+1} (M_{i,t}-C_{i,t}) + w_{t+1} Y_{i,t+1}, \\\\\n", - "\\end{eqnarray*}\n", - "\n", - "Additionally, assume that the distribution of the consumers over capital is given by the measure $\\Gamma_t$. To close the economy, there are the market clearing conditions:\n", - "\\begin{eqnarray*}\n", - "n_t &= \\int Y{_i,t} d \\Gamma_t \\\\\n", - "k_{t+1} &= \\int A_{i,t}^i d \\Gamma_t \\\\\n", - "k_{t+1}+ \\int C_{i,t} d\\Gamma_t &= y_t+(1-\\delta)k_t\n", - "\\end{eqnarray*}\n", - "\n", - "In HARK, you can solve this basic case by using the `CobbDouglasEconomy` class. However, to add the consumers to the economy you need the `AggShockConsumerType` class, which is a subclass of `IndShockConsumerType` Let's declare the economy (assuming depreciation rate $\\delta = 0.025$):\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": { - "execution": { - "iopub.execute_input": "2024-07-11T15:32:52.775020Z", - "iopub.status.busy": "2024-07-11T15:32:52.774672Z", - "iopub.status.idle": "2024-07-11T15:32:52.789835Z", - "shell.execute_reply": "2024-07-11T15:32:52.789349Z" - } - }, - "outputs": [], - "source": [ - "from HARK.ConsumptionSaving.ConsAggShockModel import * # module with the economy classes\n", - "\n", - "AggShockExample = AggShockConsumerType(\n", - " **Params.init_agg_shocks,\n", - ") # declare the consumer, using the previously prepared parameters\n", - "\n", - "# Make a Cobb-Douglas economy for the agents\n", - "EconomyExample = CobbDouglasEconomy(\n", - " agents=[AggShockExample],\n", - " **Params.init_cobb_douglas,\n", - ")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Now, you can solve the economy and plot the aggregate savings function:" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": { - "execution": { - "iopub.execute_input": "2024-07-11T15:32:52.791510Z", - "iopub.status.busy": "2024-07-11T15:32:52.791254Z", - "iopub.status.idle": "2024-07-11T15:32:52.858212Z", - "shell.execute_reply": "2024-07-11T15:32:52.857695Z" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "capital-level steady state: 13.943289665216982\n" - ] - }, - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAh8AAAGdCAYAAACyzRGfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8fJSN1AAAACXBIWXMAAA9hAAAPYQGoP6dpAAA8kklEQVR4nO3dfXBUBZ7v/3enk3QS8zRJCCEkEJ4jIWn8scLIDKwMiBFvfiLBOIy7P3EtqdkFa+VBU8IAAyoIGnXnyu5YVi3s1lV2w3NlcPBOHCDOBaGGlTyZQBKCIYYQQ0yaPNBJus/vD3e4oqAEkj7dnc+rqqvo06e7Px4O3R+/ffq0xTAMAxEREREPCTA7gIiIiAwuKh8iIiLiUSofIiIi4lEqHyI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ePHU11dbXYUv5SQkADwnW8EXLp06dpt0v9Gjx5NXFyc9uvbsGzZMn73u99x+PBhkpKSri1PSEigu7ub1tbW69bXvtx3N9vGNzJt2jQAv92XVT4Gqfb2dmpqahg2bJjZUfzSqFGjSEhI4KOPPrq2zOFwcOLECe677z4Tk/m3+vp6Ll++rP26DwzDYNmyZezbt48//vGPjBo16rrbp0yZQlBQ0HX78pkzZ6irq9O+fIt+aBvfyOnTpwH8dl/Wxy6DxKpVq8jKymLkyJE0NDSwfv16rFYrixYtMjuaz2pvb7/u/0pqa2s5ffo0MTExjBgxgueee46XX36ZcePGMWrUKNauXUtiYiLz5883L7SP+b5tHBMTw4YNG8jOziYhIYGamhpeeOEFxo4dy4MPPmhiat+ydOlS3n//fQ4cOEBERMS14ziioqIIDQ0lKiqKp59+mhUrVhATE0NkZCTPPvss9913Hz/+8Y9NTu8bfmgb19TU8P777zNv3jxiY2MpKSlh+fLlzJw5k4yMDJPTDxCzv24jnvH4448bw4YNM4KDg43hw4cbjz/+uFFdXW12LJ92+PBhA/jO5cknnzQM4+uv265du9YYOnSoYbPZjNmzZxtnzpwxN7SP+b5t3NnZacydO9cYMmSIERQUZIwcOdJ45plnjMbGRrNj+5QbbV/A2L59+7V1urq6jH/4h38wfvSjHxlhYWHGo48+aly8eNG80D7mh7ZxXV2dMXPmTCMmJsaw2WzG2LFjjeeff95oa2szN/gAshiGYXiy7IiIiMjgpmM+RERExKNUPkRERMSjVD5ERETEo1Q+RERExKNUPkRERMSjVD5ERETEo1Q+RERExKNUPkRERMSjVD5ERETEo1Q+RERExKNUPkRERMSjVD5ERETEo/5/qMbq7feoYc4AAAAASUVORK5CYII=", - "text/plain": [ - "
" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "EconomyExample.make_AggShkHist() # Simulate a history of aggregate shocks\n", - "\n", - "# Have the consumers inherit relevant objects from the economy\n", - "AggShockExample.get_economy_data(EconomyExample)\n", - "\n", - "AggShockExample.solve() # solve the model\n", - "\n", - "print(\n", - " \"capital-level steady state: \",\n", - " EconomyExample.kSS,\n", - ") # print the capital-level steady stae\n", - "\n", - "plot_funcs(\n", - " AggShockExample.AFunc,\n", - " 0.1,\n", - " 2 * EconomyExample.kSS,\n", - ") # plot the aggregate savings function" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### 5.2 Market class structure\n", - "\n", - "As in the case of the agent-type, the more complicated macroeconomic models are the subclasses of more primitive ones. The subclasses of Market include `CobbDouglasEconomy` and `SmallOpenEconomy`. The main difference between them is that for `CobbDouglasEconomy`, the capital and labour prices are endogenous, while in the (small) open economy class both are set exogenously.\n", - "\n", - "Nevertheless, both basic classes enable the aggregate fluctuation in the economy, that is:\n", - "\n", - "\\begin{eqnarray*}\n", - "Y_{i,t} &=& \\varepsilon_t(\\epsilon_{i,t}p_{i,t}\\Theta_t P_t )\\\\\n", - "P_{t+1} &=& P_{t}\\Psi_{t+1}\\\\\n", - "\\Psi_{t} &\\sim & {N}(1,\\sigma_{\\Psi})\\\\\n", - "\\Theta_t &\\sim &{N}(1,\\sigma_{\\Theta})\\\\\n", - "\\end{eqnarray*}\n", - "\n", - "The consumers, which are attributes of such market classes, need to include the aggregate fluctuations of the whole economy in their optimization problem. This is the reason why the `AggShockConsumerType` class (and their subclasses) must be used to construct the macro-model.\n", - "\n", - "The subclass of `CobbDouglasEconomy` is `CobbDouglasMarkovEconomy`. In this setting, there exists an additional aggregate fluctuation in the economy (the distribution of which is given by the finite Markov matrix).\n", - "\n", - "\n", - "![HARK_struct_2](HARK-struct-4.png)\n", - "\n", - "\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### 5.3 Tutorial\n", - "\n", - "To learn the functionalities of the market-type classes in HARK we suggest studying the following notebook devoted to [Krussel-Smith economy](https://github.com/econ-ark/REMARK/blob/master/REMARKs/KrusellSmith.md). In this notebook, the classical [Krussell-Smith model](https://www.journals.uchicago.edu/doi/abs/10.1086/250034?journalCode=jpe) is implemented (with some extensions) using the `CobbDouglasMarkovEconomy` class.\n", - "\n", - "Before that, you may want to check the main function from [ConsAggShockModel module](https://github.com/econ-ark/HARK/blob/master/examples/ConsumptionSaving/example_ConsAggShockModel.ipynb) or its [source code](https://github.com/econ-ark/HARK/blob/master//HARK/ConsumptionSaving/ConsAggShockModel.py) to see the basic steps to create the market type objects.\n", - "\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### 5.3.1 If you want to learn (a little) how the Market class works\n", - "\n", - "The Market class was designed to be a general framework for many different macro models. It involves a procedure of aggregating the agents' choices: eg. aggregating consumption and savings (`reap_vars` in the code) and then transforming the aggregated variables (`mill_rule` in the code).\n", - "\n", - "If you would like to get better knowledge about this structure, first take a look at the [Hark documentation](https://docs.econ-ark.org/Documentation/overview/ARKitecture.html). Next, to understand how the HARK Market class works in less standard setting, look at the [Fashion victim model](https://github.com/econ-ark/DemARK/blob/99948acb7b59cc9a6fb7de758972266fa4b03a06/notebooks/Fashion-Victim-Model.ipynb).\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## 6 If you need to study a source code\n", - "\n", - "In the previous sections we saw an example of how to solve different models using HARK. However, we know that you may also need to work with the source code for a few reasons (e.g. to learn used numerical methods, write your own code).\n", - "\n", - "Working directly with code (even if well-written) is a much more complicated tasks than just working with finished functions, and no tutorial will let you go through this painlessly. However, we hope that this partelaborating on the HARK structure and numerical methods will help you with this task.\n", - "\n", - "### 6.1 A few more words on HARK structure\n", - "\n", - "When you look at the [HARK](https://github.com/econ-ark/HARK) sources, you will find the subdirectory called HARK. Next there is a script called \"core. py\". Surprisingly, you will not find this code in many of the subclasses which you learned during this journey!\n", - "\n", - "The reason for this is that HARK.core.py is a core of the package: a framework for all models which can be coded in HARK. It contains the general framework of the agent-type classes (AgentType class) and for the market. The exact structure of modules in the HARK core you can find in the [Hark documentation](https://docs.econ-ark.org/Documentation/overview/ARKitecture.html#general-purpose-tools). Here, you can also find the general structure of the [AgentType](https://docs.econ-ark.org/Documentation/overview/ARKitecture.html#agenttype-class) and [Market classes](https://docs.econ-ark.org/Documentation/overview/ARKitecture.html#market-class).\n", - "\n", - "Where are the subclasses which you'v learned during the journey? In HARK, the subclasses are located in the separate directories. For the AgentType subclasses, you need to look at HARK.ConsumptionSaving directory. For example, `PerfForesightConsumerType` and `IndShockConsumerType` can be found in ConsIndShockModel.py. Nevertheless, if you want to understand any of the HARK modules, you must first understand `HARK.core`.\n", - "\n", - "\n", - "### 6.2 HARK solution\n", - "\n", - "For the consumer problems, solutions of the one-period consumer's problem are found using the attribute function `solve_one_period`. The inputs passed to this function also include data from the subsequent periods. Before solve_one_period is called, the function pre_solve() is applied, which prepare the solution (eg. transmit the solution of the sub-sequent period as an input).\n", - "\n", - "The structure of the functions which are used as solve_one_period reflects the agent-type class structures. Thus, when you will study the source code, you will first read the solve classes.\n", - "\n", - "![Hark_struct3](HARK-struct-3.png)\n", - "\n", - "\n", - "#### 6.2.1 Solution method for agent problem\n", - "However, knowing the structure of the code may not be very beneficial if you do not know the solution method! While for the perfect foresight consumer has an analytic solution, the policy functions for the stochastic consumer (thus with the idiosyncratic or the aggregate shocks) are solved by the **endogenous grid method**.\n", - "\n", - "The method of endogenous gridpoints is now widely used in macroeconomic simulations. There are a few resources to learn it; here, we suggest Professor Carroll's [lecture notes](https://www.econ2.jhu.edu/people/ccarroll/SolvingMicroDSOPs/). If you prefer a very quick version, we suggest appendix to the Kruger and Kindermann [paper](https://www.nber.org/papers/w20601.pdf) (they develop a slightly bigger model with a different notation, but the idea is the same).\n", - "\n", - "#### 6.2.2 Finding general equilibrium\n", - "In general, the rational expectations general equilibrium is found by updating the agents' expectations and the aggregate choices up to the point at which the actual aggregated variables (like interest rate or capital) are equal to the expected ones. However, one may need to refer to the papers cited in the notebooks to understand the exact methods used.\n", - "\n", - "\n", - "### 6.3 How to study HARK codes\n", - "\n", - "We hope that this section gave you some idea how the HARK library works. However, HARK contains much more than is discussed here. Here is some more guidance on how to continue your journey:\n", - "\n", - "- Before you start make sure that you understand the endogenous grid method, as well as the general framework structure for AgentType and Market from [HARK documentation](https://docs.econ-ark.org/Documentation/overview/ARKitecture.html#agenttype-class).\n", - "- When working through HARK.core, make sure that you see the connection between the structure in the documentation and the code (check autodoc from the [HARK documentation](https://docs.econ-ark.org/Documentation/reference/tools/core.html) webpage).\n", - "- Proceed to the ConsumptionSaving/ConsIndShockModel.py and compare the tutorials with the source code.\n", - "- Proceed to the ConsumptionSaving/ConsAggShockModel.py and compare the tutorial on the Market class with the source code, check [autodoc](https://docs.econ-ark.org/Documentation/reference/ConsumptionSaving/ConsAggShockModel.html).\n", - "\n", - "So in general, when you want to learn any of the modules in the HARK toolkit, first check autodoc from the [HARK documentation](https://docs.econ-ark.org/Documentation/reference/index.html) webpage.\n" - ] - } - ], - "metadata": { - "jupytext": { - "cell_metadata_filter": "ExecuteTime,collapsed,-autoscroll", - "formats": "ipynb,py:percent", - "notebook_metadata_filter": "all,-widgets,-varInspector" - }, - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - }, - "latex_envs": { - "LaTeX_envs_menu_present": true, - "autoclose": false, - "autocomplete": true, - "bibliofile": "biblio.bib", - "cite_by": "apalike", - "current_citInitial": 1, - "eqLabelWithNumbers": true, - "eqNumInitial": 1, - "hotkeys": { - "equation": "Ctrl-E", - "itemize": "Ctrl-I" - }, - "labels_anchors": false, - "latex_user_defs": false, - "report_style_numbering": false, - "user_envs_cfg": false - }, - "toc": { - "base_numbering": 1, - "nav_menu": {}, - "number_sections": true, - "sideBar": true, - "skip_h1_title": false, - "title_cell": "Table of Contents", - "title_sidebar": "Contents", - "toc_cell": false, - "toc_position": {}, - "toc_section_display": true, - "toc_window_display": false - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/index.rst b/index.rst deleted file mode 100644 index fa6d7e22d..000000000 --- a/index.rst +++ /dev/null @@ -1 +0,0 @@ -.. include:: Documentation/index_core.rst diff --git a/noxfile.py b/noxfile.py new file mode 100644 index 000000000..f49bc7fc5 --- /dev/null +++ b/noxfile.py @@ -0,0 +1,107 @@ +from __future__ import annotations + +import argparse +import shutil +from pathlib import Path + +import nox + +DIR = Path(__file__).parent.resolve() + +nox.needs_version = ">=2024.3.2" +nox.options.sessions = ["lint", "pylint", "tests"] +nox.options.default_venv_backend = "uv|virtualenv" + + +@nox.session +def lint(session: nox.Session) -> None: + """ + Run the linter. + """ + session.install("pre-commit") + session.run( + "pre-commit", "run", "--all-files", "--show-diff-on-failure", *session.posargs + ) + + +@nox.session +def pylint(session: nox.Session) -> None: + """ + Run PyLint. + """ + # This needs to be installed into the package environment, and is slower + # than a pre-commit check + session.install(".", "pylint>=3.2") + session.run("pylint", "HARK", *session.posargs) + + +@nox.session +def tests(session: nox.Session) -> None: + """ + Run the unit and regular tests. + """ + session.install(".[test]") + session.run("pytest", *session.posargs) + + +@nox.session(reuse_venv=True) +def docs(session: nox.Session) -> None: + """ + Build the docs. Pass --non-interactive to avoid serving. First positional argument is the target directory. + """ + + parser = argparse.ArgumentParser() + parser.add_argument( + "-b", dest="builder", default="html", help="Build target (default: html)" + ) + parser.add_argument("output", nargs="?", help="Output directory") + args, posargs = parser.parse_known_args(session.posargs) + serve = args.builder == "html" and session.interactive + + session.install("-e.[docs]", "sphinx-autobuild") + + shared_args = ( + "-n", # nitpicky mode + "-T", # full tracebacks + f"-b={args.builder}", + "docs", + args.output or f"docs/_build/{args.builder}", + *posargs, + ) + + if serve: + session.run("sphinx-autobuild", "--open-browser", *shared_args) + else: + session.run("sphinx-build", "--keep-going", *shared_args) + + +@nox.session +def build_api_docs(session: nox.Session) -> None: + """ + Build (regenerate) API docs. + """ + + session.install("sphinx") + session.run( + "sphinx-apidoc", + "-o", + "docs/api/", + "--module-first", + "--no-toc", + "--force", + "src/HARK", + ) + + +@nox.session +def build(session: nox.Session) -> None: + """ + Build an SDist and wheel. + """ + + build_path = DIR.joinpath("build") + if build_path.exists(): + shutil.rmtree(build_path) + + session.install("build") + session.run("python", "-m", "build") diff --git a/pyproject.toml b/pyproject.toml index 12ef76127..06b699c61 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,61 +1,141 @@ [build-system] -requires = ["setuptools>=61.2", "setuptools_scm[toml]>=6.2"] -build-backend = "setuptools.build_meta" +requires = ["hatchling", "hatch-vcs", "hatch-requirements-txt"] +build-backend = "hatchling.build" [project] name = "econ-ark" -version = "0.15.1" -authors = [{name = "Econ-ARK team", email = "econ-ark@jhuecon.org"}] +authors = [{ name = "Econ-ARK Team", email = "econ-ark@jhuecon.org" }] +description = "Heterogeneous Agents Resources and toolKit" +keywords = ["economics", "modelling", "modeling", "heterogeneity"] +readme = "README.md" +license.file = "LICENSE" +requires-python = ">=3.10" classifiers = [ "Development Status :: 3 - Alpha", "Environment :: Console", - "Intended Audience :: Developers", "Intended Audience :: Financial and Insurance Industry", "Intended Audience :: Science/Research", - "Topic :: Scientific/Engineering", - "Topic :: Scientific/Engineering :: Mathematics", - "Topic :: Other/Nonlisted Topic", + "Intended Audience :: Developers", + "License :: OSI Approved", + "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", - "License :: OSI Approved :: Apache Software License", - "License :: OSI Approved", + "Programming Language :: Python", "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Topic :: Scientific/Engineering", + "Topic :: Scientific/Engineering :: Mathematics", + "Topic :: Other/Nonlisted Topic", + "Typing :: Typed", ] -description = "Heterogenous Agents Resources & toolKit" -keywords = ["economics", "modelling", "modeling", "heterogeneity"] -requires-python = ">=3.10" -dynamic = ["dependencies", "optional-dependencies"] - - -[tool.setuptools.dynamic.dependencies] -file = "requirements/base.txt" - -[tool.setuptools.dynamic.optional-dependencies] -dev.file = "requirements/dev.txt" -doc.file = "requirements/doc.txt" +dynamic = ["version", "dependencies", "optional-dependencies"] [project.urls] Homepage = "https://github.com/econ-ark/HARK" -"Bug Reports" = "https://github.com/econ-ark/HARK/issues" Documentation = "https://econ-ark.github.io/HARK" +"Bug Tracker" = "https://github.com/econ-ark/HARK/issues" +Discussions = "https://github.com/econ-ark/HARK/discussions" +Changelog = "https://github.com/econ-ark/HARK/releases" + +[tool.hatch] +version.source = "vcs" +build.hooks.vcs.version-file = "src/HARK/_version.py" +build.targets.wheel.packages = ["src/HARK"] + +[tool.hatch.metadata.hooks.requirements_txt] +files = ["requirements/base.txt"] + +[tool.hatch.metadata.hooks.requirements_txt.optional-dependencies] +docs = ["requirements/docs.txt"] +test = ["requirements/dev.txt"] +dev = ["requirements/dev.txt"] + +[tool.hatch.envs.default] +features = ["test"] +scripts.test = "pytest {args}" -[project.license] -file = "LICENSE" +[tool.pytest.ini_options] +minversion = "6.0" +addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"] +xfail_strict = true +# filterwarnings = ["error"] +log_cli_level = "INFO" +testpaths = ["tests"] -[project.readme] -file = "README.md" -content-type = "text/markdown" +[tool.coverage] +run.source = ["HARK"] +report.exclude_also = ['\.\.\.', 'if typing.TYPE_CHECKING:'] -[tool.setuptools.packages.find] -# All the following settings are optional: -exclude = ["binder", "Documentation", "examples"] -namespaces = false +[tool.mypy] +files = ["src", "tests"] +python_version = "3.10" +warn_unused_configs = true +strict = true +enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"] +warn_unreachable = true +disallow_untyped_defs = false +disallow_incomplete_defs = false -[tool.setuptools.package-data] -"*" = ["*.csv", "*.txt"] +[[tool.mypy.overrides]] +module = "HARK.*" +disallow_untyped_defs = true +disallow_incomplete_defs = true -[tool.distutils.bdist_wheel] -universal = 1 +[tool.ruff] + +[tool.ruff.lint] +extend-select = [ + "B", # flake8-bugbear + "I", # isort + "ARG", # flake8-unused-arguments + "C4", # flake8-comprehensions + "EM", # flake8-errmsg + "ICN", # flake8-import-conventions + "G", # flake8-logging-format + "PGH", # pygrep-hooks + "PIE", # flake8-pie + "PL", # pylint + "PT", # flake8-pytest-style + "PTH", # flake8-use-pathlib + "RET", # flake8-return + "RUF", # Ruff-specific + "SIM", # flake8-simplify + "T20", # flake8-print + "UP", # pyupgrade + "YTT", # flake8-2020 + "EXE", # flake8-executable + "NPY", # NumPy specific rules + "PD", # pandas-vet +] +ignore = [ + "PLR09", # Too many <...> + "PLR2004", # Magic value used in comparison + "ISC001", # Conflicts with formatter +] +isort.required-imports = ["from __future__ import annotations"] +# Uncomment if using a _compat.typing backport +# typing-modules = ["HARK._compat.typing"] + +[tool.ruff.lint.per-file-ignores] +"tests/**" = ["T20"] +"noxfile.py" = ["T20"] + +[tool.pylint] +py-version = "3.10" +ignore-paths = [".*/_version.py"] +reports.output-format = "colorized" +similarities.ignore-imports = "yes" +# Set fail-under to 0 to prevent failing +fail-under = 0 +messages_control.disable = [ + "design", + "fixme", + "line-too-long", + "missing-module-docstring", + "missing-function-docstring", + "wrong-import-position", + "invalid-name", +] diff --git a/requirements/dev.txt b/requirements/dev.txt index d7cdb4694..fc8866a85 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,5 +1,6 @@ nbval pre-commit pytest +pytest-cov pytest-xdist ruff diff --git a/requirements/doc.txt b/requirements/docs.txt similarity index 87% rename from requirements/doc.txt rename to requirements/docs.txt index a2717f479..1b0a47700 100644 --- a/requirements/doc.txt +++ b/requirements/docs.txt @@ -9,3 +9,4 @@ pydata-sphinx-theme sphinx>=6.1 sphinx-copybutton sphinx-design +sphinx_autodoc_typehints diff --git a/HARK/Calibration/Assets/AssetProcesses.py b/src/HARK/Calibration/Assets/AssetProcesses.py similarity index 100% rename from HARK/Calibration/Assets/AssetProcesses.py rename to src/HARK/Calibration/Assets/AssetProcesses.py diff --git a/HARK/Calibration/Income/IncomeProcesses.py b/src/HARK/Calibration/Income/IncomeProcesses.py similarity index 100% rename from HARK/Calibration/Income/IncomeProcesses.py rename to src/HARK/Calibration/Income/IncomeProcesses.py diff --git a/HARK/Calibration/Income/IncomeTools.py b/src/HARK/Calibration/Income/IncomeTools.py similarity index 100% rename from HARK/Calibration/Income/IncomeTools.py rename to src/HARK/Calibration/Income/IncomeTools.py diff --git a/HARK/Calibration/Income/README.md b/src/HARK/Calibration/Income/README.md similarity index 100% rename from HARK/Calibration/Income/README.md rename to src/HARK/Calibration/Income/README.md diff --git a/HARK/Calibration/Income/tests/__init__.py b/src/HARK/Calibration/Income/__init__.py similarity index 100% rename from HARK/Calibration/Income/tests/__init__.py rename to src/HARK/Calibration/Income/__init__.py diff --git a/HARK/Calibration/SCF/WealthIncomeDist/README.md b/src/HARK/Calibration/SCF/WealthIncomeDist/README.md similarity index 100% rename from HARK/Calibration/SCF/WealthIncomeDist/README.md rename to src/HARK/Calibration/SCF/WealthIncomeDist/README.md diff --git a/HARK/Calibration/SCF/WealthIncomeDist/SCFDistTools.py b/src/HARK/Calibration/SCF/WealthIncomeDist/SCFDistTools.py similarity index 100% rename from HARK/Calibration/SCF/WealthIncomeDist/SCFDistTools.py rename to src/HARK/Calibration/SCF/WealthIncomeDist/SCFDistTools.py diff --git a/HARK/Calibration/SCF/WealthIncomeDist/WealthIncomeStats.csv b/src/HARK/Calibration/SCF/WealthIncomeDist/WealthIncomeStats.csv similarity index 100% rename from HARK/Calibration/SCF/WealthIncomeDist/WealthIncomeStats.csv rename to src/HARK/Calibration/SCF/WealthIncomeDist/WealthIncomeStats.csv diff --git a/HARK/Calibration/SCF/WealthIncomeDist/__init__.py b/src/HARK/Calibration/SCF/WealthIncomeDist/__init__.py similarity index 100% rename from HARK/Calibration/SCF/WealthIncomeDist/__init__.py rename to src/HARK/Calibration/SCF/WealthIncomeDist/__init__.py diff --git a/HARK/Calibration/SCF/__init__.py b/src/HARK/Calibration/SCF/__init__.py similarity index 100% rename from HARK/Calibration/SCF/__init__.py rename to src/HARK/Calibration/SCF/__init__.py diff --git a/HARK/Calibration/__init__.py b/src/HARK/Calibration/__init__.py similarity index 100% rename from HARK/Calibration/__init__.py rename to src/HARK/Calibration/__init__.py diff --git a/HARK/Calibration/cpi/__init__.py b/src/HARK/Calibration/cpi/__init__.py similarity index 100% rename from HARK/Calibration/cpi/__init__.py rename to src/HARK/Calibration/cpi/__init__.py diff --git a/HARK/Calibration/cpi/us/CPITools.py b/src/HARK/Calibration/cpi/us/CPITools.py similarity index 100% rename from HARK/Calibration/cpi/us/CPITools.py rename to src/HARK/Calibration/cpi/us/CPITools.py diff --git a/HARK/Calibration/cpi/us/README.md b/src/HARK/Calibration/cpi/us/README.md similarity index 100% rename from HARK/Calibration/cpi/us/README.md rename to src/HARK/Calibration/cpi/us/README.md diff --git a/HARK/Calibration/cpi/us/__init__.py b/src/HARK/Calibration/cpi/us/__init__.py similarity index 100% rename from HARK/Calibration/cpi/us/__init__.py rename to src/HARK/Calibration/cpi/us/__init__.py diff --git a/HARK/Calibration/cpi/us/r-cpi-u-rs-allitems.csv b/src/HARK/Calibration/cpi/us/r-cpi-u-rs-allitems.csv similarity index 100% rename from HARK/Calibration/cpi/us/r-cpi-u-rs-allitems.csv rename to src/HARK/Calibration/cpi/us/r-cpi-u-rs-allitems.csv diff --git a/HARK/Calibration/data/EducMortAdj.txt b/src/HARK/Calibration/data/EducMortAdj.txt similarity index 100% rename from HARK/Calibration/data/EducMortAdj.txt rename to src/HARK/Calibration/data/EducMortAdj.txt diff --git a/HARK/Calibration/data/SCFwealthDataReduced.txt b/src/HARK/Calibration/data/SCFwealthDataReduced.txt similarity index 100% rename from HARK/Calibration/data/SCFwealthDataReduced.txt rename to src/HARK/Calibration/data/SCFwealthDataReduced.txt diff --git a/HARK/Calibration/data/USactuarial.txt b/src/HARK/Calibration/data/USactuarial.txt similarity index 100% rename from HARK/Calibration/data/USactuarial.txt rename to src/HARK/Calibration/data/USactuarial.txt diff --git a/HARK/Calibration/life_tables/__init__.py b/src/HARK/Calibration/life_tables/__init__.py similarity index 100% rename from HARK/Calibration/life_tables/__init__.py rename to src/HARK/Calibration/life_tables/__init__.py diff --git a/HARK/Calibration/life_tables/us_ssa/PerLifeTables_F_Alt2_TR2020.csv b/src/HARK/Calibration/life_tables/us_ssa/PerLifeTables_F_Alt2_TR2020.csv similarity index 100% rename from HARK/Calibration/life_tables/us_ssa/PerLifeTables_F_Alt2_TR2020.csv rename to src/HARK/Calibration/life_tables/us_ssa/PerLifeTables_F_Alt2_TR2020.csv diff --git a/HARK/Calibration/life_tables/us_ssa/PerLifeTables_F_Hist_TR2020.csv b/src/HARK/Calibration/life_tables/us_ssa/PerLifeTables_F_Hist_TR2020.csv similarity index 100% rename from HARK/Calibration/life_tables/us_ssa/PerLifeTables_F_Hist_TR2020.csv rename to src/HARK/Calibration/life_tables/us_ssa/PerLifeTables_F_Hist_TR2020.csv diff --git a/HARK/Calibration/life_tables/us_ssa/PerLifeTables_M_Alt2_TR2020.csv b/src/HARK/Calibration/life_tables/us_ssa/PerLifeTables_M_Alt2_TR2020.csv similarity index 100% rename from HARK/Calibration/life_tables/us_ssa/PerLifeTables_M_Alt2_TR2020.csv rename to src/HARK/Calibration/life_tables/us_ssa/PerLifeTables_M_Alt2_TR2020.csv diff --git a/HARK/Calibration/life_tables/us_ssa/PerLifeTables_M_Hist_TR2020.csv b/src/HARK/Calibration/life_tables/us_ssa/PerLifeTables_M_Hist_TR2020.csv similarity index 100% rename from HARK/Calibration/life_tables/us_ssa/PerLifeTables_M_Hist_TR2020.csv rename to src/HARK/Calibration/life_tables/us_ssa/PerLifeTables_M_Hist_TR2020.csv diff --git a/HARK/Calibration/life_tables/us_ssa/README.md b/src/HARK/Calibration/life_tables/us_ssa/README.md similarity index 100% rename from HARK/Calibration/life_tables/us_ssa/README.md rename to src/HARK/Calibration/life_tables/us_ssa/README.md diff --git a/HARK/Calibration/life_tables/us_ssa/SSATools.py b/src/HARK/Calibration/life_tables/us_ssa/SSATools.py similarity index 100% rename from HARK/Calibration/life_tables/us_ssa/SSATools.py rename to src/HARK/Calibration/life_tables/us_ssa/SSATools.py diff --git a/HARK/Calibration/life_tables/us_ssa/__init__.py b/src/HARK/Calibration/life_tables/us_ssa/__init__.py similarity index 100% rename from HARK/Calibration/life_tables/us_ssa/__init__.py rename to src/HARK/Calibration/life_tables/us_ssa/__init__.py diff --git a/HARK/Calibration/load_data.py b/src/HARK/Calibration/load_data.py similarity index 100% rename from HARK/Calibration/load_data.py rename to src/HARK/Calibration/load_data.py diff --git a/HARK/ConsumptionSaving/ConsAggShockModel.py b/src/HARK/ConsumptionSaving/ConsAggShockModel.py similarity index 100% rename from HARK/ConsumptionSaving/ConsAggShockModel.py rename to src/HARK/ConsumptionSaving/ConsAggShockModel.py diff --git a/HARK/ConsumptionSaving/ConsBequestModel.py b/src/HARK/ConsumptionSaving/ConsBequestModel.py similarity index 100% rename from HARK/ConsumptionSaving/ConsBequestModel.py rename to src/HARK/ConsumptionSaving/ConsBequestModel.py diff --git a/HARK/ConsumptionSaving/ConsGenIncProcessModel.py b/src/HARK/ConsumptionSaving/ConsGenIncProcessModel.py similarity index 100% rename from HARK/ConsumptionSaving/ConsGenIncProcessModel.py rename to src/HARK/ConsumptionSaving/ConsGenIncProcessModel.py diff --git a/HARK/ConsumptionSaving/ConsIndShockModel.py b/src/HARK/ConsumptionSaving/ConsIndShockModel.py similarity index 99% rename from HARK/ConsumptionSaving/ConsIndShockModel.py rename to src/HARK/ConsumptionSaving/ConsIndShockModel.py index e5aa6a893..5562072d9 100644 --- a/HARK/ConsumptionSaving/ConsIndShockModel.py +++ b/src/HARK/ConsumptionSaving/ConsIndShockModel.py @@ -9,7 +9,7 @@ 3) The model described in (2), with an interest rate for debt that differs from the interest rate for savings. -See NARK https://github.com/econ-ark/HARK/blob/master/Documentation/NARK/NARK.pdf for information on variable naming conventions. +See NARK https://github.com/econ-ark/HARK/blob/master/docs/NARK/NARK.pdf for information on variable naming conventions. See HARK documentation for mathematical descriptions of the models being solved. """ diff --git a/HARK/ConsumptionSaving/ConsIndShockModelFast.py b/src/HARK/ConsumptionSaving/ConsIndShockModelFast.py similarity index 99% rename from HARK/ConsumptionSaving/ConsIndShockModelFast.py rename to src/HARK/ConsumptionSaving/ConsIndShockModelFast.py index 7acecd15d..6dad74cb9 100644 --- a/HARK/ConsumptionSaving/ConsIndShockModelFast.py +++ b/src/HARK/ConsumptionSaving/ConsIndShockModelFast.py @@ -9,7 +9,7 @@ 3) The model described in (2), with an interest rate for debt that differs from the interest rate for savings. #todo -See NARK https://github.com/econ-ark/HARK/blob/master/Documentation/NARK/NARK.pdf for information on variable naming conventions. +See NARK https://github.com/econ-ark/HARK/blob/master/docs/NARK/NARK.pdf for information on variable naming conventions. See HARK documentation for mathematical descriptions of the models being solved. """ diff --git a/HARK/ConsumptionSaving/ConsLabeledModel.py b/src/HARK/ConsumptionSaving/ConsLabeledModel.py similarity index 100% rename from HARK/ConsumptionSaving/ConsLabeledModel.py rename to src/HARK/ConsumptionSaving/ConsLabeledModel.py diff --git a/HARK/ConsumptionSaving/ConsLaborModel.py b/src/HARK/ConsumptionSaving/ConsLaborModel.py similarity index 100% rename from HARK/ConsumptionSaving/ConsLaborModel.py rename to src/HARK/ConsumptionSaving/ConsLaborModel.py diff --git a/HARK/ConsumptionSaving/ConsMarkovModel.py b/src/HARK/ConsumptionSaving/ConsMarkovModel.py similarity index 100% rename from HARK/ConsumptionSaving/ConsMarkovModel.py rename to src/HARK/ConsumptionSaving/ConsMarkovModel.py diff --git a/HARK/ConsumptionSaving/ConsMedModel.py b/src/HARK/ConsumptionSaving/ConsMedModel.py similarity index 100% rename from HARK/ConsumptionSaving/ConsMedModel.py rename to src/HARK/ConsumptionSaving/ConsMedModel.py diff --git a/HARK/ConsumptionSaving/ConsNewKeynesianModel.py b/src/HARK/ConsumptionSaving/ConsNewKeynesianModel.py similarity index 100% rename from HARK/ConsumptionSaving/ConsNewKeynesianModel.py rename to src/HARK/ConsumptionSaving/ConsNewKeynesianModel.py diff --git a/HARK/ConsumptionSaving/ConsPortfolioModel.py b/src/HARK/ConsumptionSaving/ConsPortfolioModel.py similarity index 100% rename from HARK/ConsumptionSaving/ConsPortfolioModel.py rename to src/HARK/ConsumptionSaving/ConsPortfolioModel.py diff --git a/HARK/ConsumptionSaving/ConsPrefShockModel.py b/src/HARK/ConsumptionSaving/ConsPrefShockModel.py similarity index 100% rename from HARK/ConsumptionSaving/ConsPrefShockModel.py rename to src/HARK/ConsumptionSaving/ConsPrefShockModel.py diff --git a/HARK/ConsumptionSaving/ConsRepAgentModel.py b/src/HARK/ConsumptionSaving/ConsRepAgentModel.py similarity index 100% rename from HARK/ConsumptionSaving/ConsRepAgentModel.py rename to src/HARK/ConsumptionSaving/ConsRepAgentModel.py diff --git a/HARK/ConsumptionSaving/ConsRiskyAssetModel.py b/src/HARK/ConsumptionSaving/ConsRiskyAssetModel.py similarity index 100% rename from HARK/ConsumptionSaving/ConsRiskyAssetModel.py rename to src/HARK/ConsumptionSaving/ConsRiskyAssetModel.py diff --git a/HARK/ConsumptionSaving/ConsRiskyContribModel.py b/src/HARK/ConsumptionSaving/ConsRiskyContribModel.py similarity index 100% rename from HARK/ConsumptionSaving/ConsRiskyContribModel.py rename to src/HARK/ConsumptionSaving/ConsRiskyContribModel.py diff --git a/HARK/ConsumptionSaving/ConsSequentialPortfolioModel.py b/src/HARK/ConsumptionSaving/ConsSequentialPortfolioModel.py similarity index 100% rename from HARK/ConsumptionSaving/ConsSequentialPortfolioModel.py rename to src/HARK/ConsumptionSaving/ConsSequentialPortfolioModel.py diff --git a/HARK/ConsumptionSaving/ConsWealthPortfolioModel.py b/src/HARK/ConsumptionSaving/ConsWealthPortfolioModel.py similarity index 100% rename from HARK/ConsumptionSaving/ConsWealthPortfolioModel.py rename to src/HARK/ConsumptionSaving/ConsWealthPortfolioModel.py diff --git a/HARK/ConsumptionSaving/LegacyOOsolvers.py b/src/HARK/ConsumptionSaving/LegacyOOsolvers.py similarity index 100% rename from HARK/ConsumptionSaving/LegacyOOsolvers.py rename to src/HARK/ConsumptionSaving/LegacyOOsolvers.py diff --git a/HARK/ConsumptionSaving/TractableBufferStockModel.py b/src/HARK/ConsumptionSaving/TractableBufferStockModel.py similarity index 100% rename from HARK/ConsumptionSaving/TractableBufferStockModel.py rename to src/HARK/ConsumptionSaving/TractableBufferStockModel.py diff --git a/HARK/ConsumptionSaving/__init__.py b/src/HARK/ConsumptionSaving/__init__.py similarity index 100% rename from HARK/ConsumptionSaving/__init__.py rename to src/HARK/ConsumptionSaving/__init__.py diff --git a/HARK/__init__.py b/src/HARK/__init__.py similarity index 75% rename from HARK/__init__.py rename to src/HARK/__init__.py index 4c2064e96..99d80df68 100644 --- a/HARK/__init__.py +++ b/src/HARK/__init__.py @@ -1,6 +1,17 @@ +""" +Copyright (c) 2024 Econ-ARK Team. All rights reserved. + +HARK: Heterogeneous Agents Resources and toolKit +""" + +from __future__ import annotations + +from ._version import version as __version__ + +__all__ = ["__version__"] + from .core import * -__version__ = "0.15.1" """ Logging tools for HARK. diff --git a/src/HARK/_version.pyi b/src/HARK/_version.pyi new file mode 100644 index 000000000..91744f983 --- /dev/null +++ b/src/HARK/_version.pyi @@ -0,0 +1,4 @@ +from __future__ import annotations + +version: str +version_tuple: tuple[int, int, int] | tuple[int, int, int, str, str] diff --git a/HARK/core.py b/src/HARK/core.py similarity index 100% rename from HARK/core.py rename to src/HARK/core.py diff --git a/HARK/dcegm.py b/src/HARK/dcegm.py similarity index 100% rename from HARK/dcegm.py rename to src/HARK/dcegm.py diff --git a/HARK/distributions/__init__.py b/src/HARK/distributions/__init__.py similarity index 100% rename from HARK/distributions/__init__.py rename to src/HARK/distributions/__init__.py diff --git a/HARK/distributions/base.py b/src/HARK/distributions/base.py similarity index 100% rename from HARK/distributions/base.py rename to src/HARK/distributions/base.py diff --git a/HARK/distributions/continuous.py b/src/HARK/distributions/continuous.py similarity index 100% rename from HARK/distributions/continuous.py rename to src/HARK/distributions/continuous.py diff --git a/HARK/distributions/discrete.py b/src/HARK/distributions/discrete.py similarity index 100% rename from HARK/distributions/discrete.py rename to src/HARK/distributions/discrete.py diff --git a/HARK/distributions/multivariate.py b/src/HARK/distributions/multivariate.py similarity index 100% rename from HARK/distributions/multivariate.py rename to src/HARK/distributions/multivariate.py diff --git a/HARK/distributions/utils.py b/src/HARK/distributions/utils.py similarity index 100% rename from HARK/distributions/utils.py rename to src/HARK/distributions/utils.py diff --git a/HARK/econforgeinterp.py b/src/HARK/econforgeinterp.py similarity index 100% rename from HARK/econforgeinterp.py rename to src/HARK/econforgeinterp.py diff --git a/HARK/estimation.py b/src/HARK/estimation.py similarity index 100% rename from HARK/estimation.py rename to src/HARK/estimation.py diff --git a/HARK/helpers.py b/src/HARK/helpers.py similarity index 100% rename from HARK/helpers.py rename to src/HARK/helpers.py diff --git a/HARK/interpolation.py b/src/HARK/interpolation.py similarity index 100% rename from HARK/interpolation.py rename to src/HARK/interpolation.py diff --git a/HARK/mat_methods.py b/src/HARK/mat_methods.py similarity index 100% rename from HARK/mat_methods.py rename to src/HARK/mat_methods.py diff --git a/HARK/metric.py b/src/HARK/metric.py similarity index 100% rename from HARK/metric.py rename to src/HARK/metric.py diff --git a/HARK/model.py b/src/HARK/model.py similarity index 100% rename from HARK/model.py rename to src/HARK/model.py diff --git a/HARK/ConsumptionSaving/tests/__init__.py b/src/HARK/models/__init__.py similarity index 100% rename from HARK/ConsumptionSaving/tests/__init__.py rename to src/HARK/models/__init__.py diff --git a/HARK/models/consumer.py b/src/HARK/models/consumer.py similarity index 100% rename from HARK/models/consumer.py rename to src/HARK/models/consumer.py diff --git a/src/HARK/models/consumer.yaml b/src/HARK/models/consumer.yaml new file mode 100644 index 000000000..ff675a22d --- /dev/null +++ b/src/HARK/models/consumer.yaml @@ -0,0 +1,43 @@ +# +# A YAML configuration file for the consumption portfolio problem blocks. +# + +calibration: + DiscFac: 0.96 + CRRA: 2.0 + R: 1.03 # can be overriden by portfolio dynamics + Rfree: 1.03 + EqP: 0.02 + LivPrb: 0.98 + PermGroFac: 1.01 + BoroCnstArt: None + TranShkStd: 0.1 + RiskyStd: 0.1 + +blocks: + - &cons_normalized + name: consumption normalized + shocks: + live: !Bernoulli + p: LivPrb + theta: !MeanOneLogNormal + sigma: TranShkStd + dynamics: + b: k * R / PermGroFac + m: b + theta + c: !Control + info: m + a: m - c + + reward: + u: c ** (1 - CRRA) / (1 - CRRA) + - &portfolio_choice + name: portfolio choice + shocks: + risky_return: !Lognormal + mean: Rfree + EqP + std: RiskyStd + dynamics: + stigma: !Control + info: a + R: Rfree + (risky_return - Rfree) * stigma diff --git a/HARK/models/fisher.py b/src/HARK/models/fisher.py similarity index 100% rename from HARK/models/fisher.py rename to src/HARK/models/fisher.py diff --git a/HARK/models/perfect_foresight.py b/src/HARK/models/perfect_foresight.py similarity index 100% rename from HARK/models/perfect_foresight.py rename to src/HARK/models/perfect_foresight.py diff --git a/HARK/models/perfect_foresight_normalized.py b/src/HARK/models/perfect_foresight_normalized.py similarity index 100% rename from HARK/models/perfect_foresight_normalized.py rename to src/HARK/models/perfect_foresight_normalized.py diff --git a/HARK/numba_tools.py b/src/HARK/numba_tools.py similarity index 100% rename from HARK/numba_tools.py rename to src/HARK/numba_tools.py diff --git a/HARK/parallel.py b/src/HARK/parallel.py similarity index 100% rename from HARK/parallel.py rename to src/HARK/parallel.py diff --git a/HARK/parser.py b/src/HARK/parser.py similarity index 100% rename from HARK/parser.py rename to src/HARK/parser.py diff --git a/HARK/models/__init__.py b/src/HARK/py.typed similarity index 100% rename from HARK/models/__init__.py rename to src/HARK/py.typed diff --git a/HARK/rewards.py b/src/HARK/rewards.py similarity index 100% rename from HARK/rewards.py rename to src/HARK/rewards.py diff --git a/HARK/simulation/__init__.py b/src/HARK/simulation/__init__.py similarity index 100% rename from HARK/simulation/__init__.py rename to src/HARK/simulation/__init__.py diff --git a/HARK/simulation/monte_carlo.py b/src/HARK/simulation/monte_carlo.py similarity index 100% rename from HARK/simulation/monte_carlo.py rename to src/HARK/simulation/monte_carlo.py diff --git a/HARK/utilities.py b/src/HARK/utilities.py similarity index 100% rename from HARK/utilities.py rename to src/HARK/utilities.py diff --git a/HARK/validators.py b/src/HARK/validators.py similarity index 100% rename from HARK/validators.py rename to src/HARK/validators.py diff --git a/examples/ConsNewKeynesianModel/estimation/__init__.py b/tests/ConsumptionSaving/__init__.py similarity index 100% rename from examples/ConsNewKeynesianModel/estimation/__init__.py rename to tests/ConsumptionSaving/__init__.py diff --git a/HARK/ConsumptionSaving/tests/test_ConsAggShockModel.py b/tests/ConsumptionSaving/test_ConsAggShockModel.py similarity index 99% rename from HARK/ConsumptionSaving/tests/test_ConsAggShockModel.py rename to tests/ConsumptionSaving/test_ConsAggShockModel.py index 8db13fc54..bb9a58a03 100644 --- a/HARK/ConsumptionSaving/tests/test_ConsAggShockModel.py +++ b/tests/ConsumptionSaving/test_ConsAggShockModel.py @@ -12,7 +12,7 @@ KrusellSmithType, ) from HARK.distributions import Uniform -from HARK.tests import HARK_PRECISION +from tests import HARK_PRECISION class testAggShockConsumerType(unittest.TestCase): diff --git a/HARK/ConsumptionSaving/tests/test_ConsBequestModel.py b/tests/ConsumptionSaving/test_ConsBequestModel.py similarity index 98% rename from HARK/ConsumptionSaving/tests/test_ConsBequestModel.py rename to tests/ConsumptionSaving/test_ConsBequestModel.py index 958dcc43f..992078a9f 100644 --- a/HARK/ConsumptionSaving/tests/test_ConsBequestModel.py +++ b/tests/ConsumptionSaving/test_ConsBequestModel.py @@ -1,5 +1,5 @@ import unittest -from HARK.tests import HARK_PRECISION +from tests import HARK_PRECISION from HARK.ConsumptionSaving.ConsBequestModel import ( BequestWarmGlowConsumerType, BequestWarmGlowPortfolioType, diff --git a/HARK/ConsumptionSaving/tests/test_ConsGenIncProcessModel.py b/tests/ConsumptionSaving/test_ConsGenIncProcessModel.py similarity index 99% rename from HARK/ConsumptionSaving/tests/test_ConsGenIncProcessModel.py rename to tests/ConsumptionSaving/test_ConsGenIncProcessModel.py index b740c1ff8..2e8b4e5b1 100644 --- a/HARK/ConsumptionSaving/tests/test_ConsGenIncProcessModel.py +++ b/tests/ConsumptionSaving/test_ConsGenIncProcessModel.py @@ -7,7 +7,7 @@ IndShockExplicitPermIncConsumerType, PersistentShockConsumerType, ) -from HARK.tests import HARK_PRECISION +from tests import HARK_PRECISION GenIncDictionary = { "CRRA": 2.0, # Coefficient of relative risk aversion diff --git a/HARK/ConsumptionSaving/tests/test_ConsLabeledModel.py b/tests/ConsumptionSaving/test_ConsLabeledModel.py similarity index 98% rename from HARK/ConsumptionSaving/tests/test_ConsLabeledModel.py rename to tests/ConsumptionSaving/test_ConsLabeledModel.py index 0ebafda37..2557b85a0 100644 --- a/HARK/ConsumptionSaving/tests/test_ConsLabeledModel.py +++ b/tests/ConsumptionSaving/test_ConsLabeledModel.py @@ -6,7 +6,7 @@ PerfForesightLabeledType, PortfolioLabeledType, ) -from HARK.tests import HARK_PRECISION +from tests import HARK_PRECISION class test_PerfForesightLabeledType(unittest.TestCase): diff --git a/HARK/ConsumptionSaving/tests/test_ConsLaborModel.py b/tests/ConsumptionSaving/test_ConsLaborModel.py similarity index 100% rename from HARK/ConsumptionSaving/tests/test_ConsLaborModel.py rename to tests/ConsumptionSaving/test_ConsLaborModel.py diff --git a/HARK/ConsumptionSaving/tests/test_ConsMarkovModel.py b/tests/ConsumptionSaving/test_ConsMarkovModel.py similarity index 100% rename from HARK/ConsumptionSaving/tests/test_ConsMarkovModel.py rename to tests/ConsumptionSaving/test_ConsMarkovModel.py diff --git a/HARK/ConsumptionSaving/tests/test_ConsMedModel.py b/tests/ConsumptionSaving/test_ConsMedModel.py similarity index 96% rename from HARK/ConsumptionSaving/tests/test_ConsMedModel.py rename to tests/ConsumptionSaving/test_ConsMedModel.py index 64311c847..2dfd7e805 100644 --- a/HARK/ConsumptionSaving/tests/test_ConsMedModel.py +++ b/tests/ConsumptionSaving/test_ConsMedModel.py @@ -1,5 +1,5 @@ import unittest -from HARK.tests import HARK_PRECISION +from tests import HARK_PRECISION from HARK.ConsumptionSaving.ConsMedModel import MedShockConsumerType diff --git a/HARK/ConsumptionSaving/tests/test_ConsNewKeynesianModel.py b/tests/ConsumptionSaving/test_ConsNewKeynesianModel.py similarity index 98% rename from HARK/ConsumptionSaving/tests/test_ConsNewKeynesianModel.py rename to tests/ConsumptionSaving/test_ConsNewKeynesianModel.py index c2b654882..531a196de 100644 --- a/HARK/ConsumptionSaving/tests/test_ConsNewKeynesianModel.py +++ b/tests/ConsumptionSaving/test_ConsNewKeynesianModel.py @@ -3,7 +3,7 @@ import numpy as np from HARK.ConsumptionSaving.ConsNewKeynesianModel import NewKeynesianConsumerType -from HARK.tests import HARK_PRECISION +from tests import HARK_PRECISION # %% Test Transition Matrix Methods diff --git a/HARK/ConsumptionSaving/tests/test_ConsPortfolioModel.py b/tests/ConsumptionSaving/test_ConsPortfolioModel.py similarity index 99% rename from HARK/ConsumptionSaving/tests/test_ConsPortfolioModel.py rename to tests/ConsumptionSaving/test_ConsPortfolioModel.py index 37de70f4f..8e60200b3 100644 --- a/HARK/ConsumptionSaving/tests/test_ConsPortfolioModel.py +++ b/tests/ConsumptionSaving/test_ConsPortfolioModel.py @@ -3,7 +3,7 @@ import numpy as np import HARK.ConsumptionSaving.ConsPortfolioModel as cpm -from HARK.tests import HARK_PRECISION +from tests import HARK_PRECISION class PortfolioConsumerTypeTestCase(unittest.TestCase): diff --git a/HARK/ConsumptionSaving/tests/test_ConsPrefShockModel.py b/tests/ConsumptionSaving/test_ConsPrefShockModel.py similarity index 98% rename from HARK/ConsumptionSaving/tests/test_ConsPrefShockModel.py rename to tests/ConsumptionSaving/test_ConsPrefShockModel.py index 045bfa7cf..56842980a 100644 --- a/HARK/ConsumptionSaving/tests/test_ConsPrefShockModel.py +++ b/tests/ConsumptionSaving/test_ConsPrefShockModel.py @@ -6,7 +6,7 @@ KinkyPrefConsumerType, PrefShockConsumerType, ) -from HARK.tests import HARK_PRECISION +from tests import HARK_PRECISION class testPrefShockConsumerType(unittest.TestCase): diff --git a/HARK/ConsumptionSaving/tests/test_ConsRepAgentModel.py b/tests/ConsumptionSaving/test_ConsRepAgentModel.py similarity index 97% rename from HARK/ConsumptionSaving/tests/test_ConsRepAgentModel.py rename to tests/ConsumptionSaving/test_ConsRepAgentModel.py index 53aa7883a..bf27dcd31 100644 --- a/HARK/ConsumptionSaving/tests/test_ConsRepAgentModel.py +++ b/tests/ConsumptionSaving/test_ConsRepAgentModel.py @@ -4,7 +4,7 @@ RepAgentConsumerType, RepAgentMarkovConsumerType, ) -from HARK.tests import HARK_PRECISION +from tests import HARK_PRECISION class testRepAgentConsumerType(unittest.TestCase): diff --git a/HARK/ConsumptionSaving/tests/test_ConsRiskyAssetModel.py b/tests/ConsumptionSaving/test_ConsRiskyAssetModel.py similarity index 96% rename from HARK/ConsumptionSaving/tests/test_ConsRiskyAssetModel.py rename to tests/ConsumptionSaving/test_ConsRiskyAssetModel.py index 036b00daf..998a3bd2c 100644 --- a/HARK/ConsumptionSaving/tests/test_ConsRiskyAssetModel.py +++ b/tests/ConsumptionSaving/test_ConsRiskyAssetModel.py @@ -1,5 +1,5 @@ import unittest -from HARK.tests import HARK_PRECISION +from tests import HARK_PRECISION from HARK.ConsumptionSaving.ConsRiskyAssetModel import IndShockRiskyAssetConsumerType diff --git a/HARK/ConsumptionSaving/tests/test_ConsRiskyContribModel.py b/tests/ConsumptionSaving/test_ConsRiskyContribModel.py similarity index 99% rename from HARK/ConsumptionSaving/tests/test_ConsRiskyContribModel.py rename to tests/ConsumptionSaving/test_ConsRiskyContribModel.py index 33a778232..8fca3dcb2 100644 --- a/HARK/ConsumptionSaving/tests/test_ConsRiskyContribModel.py +++ b/tests/ConsumptionSaving/test_ConsRiskyContribModel.py @@ -13,7 +13,7 @@ RiskyContribConsumerType, init_risky_contrib, ) -from HARK.tests import HARK_PRECISION +from tests import HARK_PRECISION class test_(unittest.TestCase): diff --git a/HARK/ConsumptionSaving/tests/test_IndShockConsumerType.py b/tests/ConsumptionSaving/test_IndShockConsumerType.py similarity index 99% rename from HARK/ConsumptionSaving/tests/test_IndShockConsumerType.py rename to tests/ConsumptionSaving/test_IndShockConsumerType.py index 7f8e0a421..4c0d91da1 100644 --- a/HARK/ConsumptionSaving/tests/test_IndShockConsumerType.py +++ b/tests/ConsumptionSaving/test_IndShockConsumerType.py @@ -8,7 +8,7 @@ init_idiosyncratic_shocks, init_lifecycle, ) -from HARK.tests import HARK_PRECISION +from tests import HARK_PRECISION class testIndShockConsumerType(unittest.TestCase): diff --git a/HARK/ConsumptionSaving/tests/test_IndShockConsumerTypeFast.py b/tests/ConsumptionSaving/test_IndShockConsumerTypeFast.py similarity index 98% rename from HARK/ConsumptionSaving/tests/test_IndShockConsumerTypeFast.py rename to tests/ConsumptionSaving/test_IndShockConsumerTypeFast.py index 130cf2177..6fdb55e79 100644 --- a/HARK/ConsumptionSaving/tests/test_IndShockConsumerTypeFast.py +++ b/tests/ConsumptionSaving/test_IndShockConsumerTypeFast.py @@ -8,12 +8,12 @@ init_lifecycle, ) from HARK.ConsumptionSaving.ConsIndShockModelFast import IndShockConsumerTypeFast -from HARK.ConsumptionSaving.tests.test_IndShockConsumerType import ( +from tests.ConsumptionSaving.test_IndShockConsumerType import ( CyclicalDict, IdiosyncDict, LifecycleDict, ) -from HARK.tests import HARK_PRECISION +from tests import HARK_PRECISION class testIndShockConsumerTypeFast(unittest.TestCase): diff --git a/HARK/ConsumptionSaving/tests/test_KinkedRconsumerType.py b/tests/ConsumptionSaving/test_KinkedRconsumerType.py similarity index 96% rename from HARK/ConsumptionSaving/tests/test_KinkedRconsumerType.py rename to tests/ConsumptionSaving/test_KinkedRconsumerType.py index bde126727..44ada9511 100644 --- a/HARK/ConsumptionSaving/tests/test_KinkedRconsumerType.py +++ b/tests/ConsumptionSaving/test_KinkedRconsumerType.py @@ -1,7 +1,7 @@ import unittest from HARK.ConsumptionSaving.ConsIndShockModel import KinkedRconsumerType -from HARK.tests import HARK_PRECISION +from tests import HARK_PRECISION class testKinkedRConsumerType(unittest.TestCase): diff --git a/HARK/ConsumptionSaving/tests/test_PerfForesightConsumerType.py b/tests/ConsumptionSaving/test_PerfForesightConsumerType.py similarity index 99% rename from HARK/ConsumptionSaving/tests/test_PerfForesightConsumerType.py rename to tests/ConsumptionSaving/test_PerfForesightConsumerType.py index 2f37ae64c..2ada42bec 100644 --- a/HARK/ConsumptionSaving/tests/test_PerfForesightConsumerType.py +++ b/tests/ConsumptionSaving/test_PerfForesightConsumerType.py @@ -3,7 +3,7 @@ import numpy as np from HARK.ConsumptionSaving.ConsIndShockModel import PerfForesightConsumerType -from HARK.tests import HARK_PRECISION +from tests import HARK_PRECISION class testPerfForesightConsumerType(unittest.TestCase): diff --git a/HARK/ConsumptionSaving/tests/test_PerfForesightFastConsumerType.py b/tests/ConsumptionSaving/test_PerfForesightFastConsumerType.py similarity index 92% rename from HARK/ConsumptionSaving/tests/test_PerfForesightFastConsumerType.py rename to tests/ConsumptionSaving/test_PerfForesightFastConsumerType.py index 4d249232c..55eafc094 100644 --- a/HARK/ConsumptionSaving/tests/test_PerfForesightFastConsumerType.py +++ b/tests/ConsumptionSaving/test_PerfForesightFastConsumerType.py @@ -1,6 +1,6 @@ from HARK.ConsumptionSaving.ConsIndShockModel import PerfForesightConsumerType from HARK.ConsumptionSaving.ConsIndShockModelFast import PerfForesightConsumerTypeFast -from HARK.ConsumptionSaving.tests.test_PerfForesightConsumerType import ( +from tests.ConsumptionSaving.test_PerfForesightConsumerType import ( testPerfForesightConsumerType, ) diff --git a/HARK/ConsumptionSaving/tests/test_SmallOpenEconomy.py b/tests/ConsumptionSaving/test_SmallOpenEconomy.py similarity index 100% rename from HARK/ConsumptionSaving/tests/test_SmallOpenEconomy.py rename to tests/ConsumptionSaving/test_SmallOpenEconomy.py diff --git a/HARK/ConsumptionSaving/tests/test_TractableBufferStockModel.py b/tests/ConsumptionSaving/test_TractableBufferStockModel.py similarity index 100% rename from HARK/ConsumptionSaving/tests/test_TractableBufferStockModel.py rename to tests/ConsumptionSaving/test_TractableBufferStockModel.py diff --git a/HARK/ConsumptionSaving/tests/test_modelInits.py b/tests/ConsumptionSaving/test_modelInits.py similarity index 100% rename from HARK/ConsumptionSaving/tests/test_modelInits.py rename to tests/ConsumptionSaving/test_modelInits.py diff --git a/HARK/ConsumptionSaving/tests/test_modelcomparisons.py b/tests/ConsumptionSaving/test_modelcomparisons.py similarity index 100% rename from HARK/ConsumptionSaving/tests/test_modelcomparisons.py rename to tests/ConsumptionSaving/test_modelcomparisons.py diff --git a/HARK/tests/__init__.py b/tests/__init__.py similarity index 100% rename from HARK/tests/__init__.py rename to tests/__init__.py diff --git a/HARK/tests/test_HARKutilities.py b/tests/test_HARKutilities.py similarity index 100% rename from HARK/tests/test_HARKutilities.py rename to tests/test_HARKutilities.py diff --git a/HARK/Calibration/Income/tests/test_IncomeTools.py b/tests/test_IncomeTools.py similarity index 100% rename from HARK/Calibration/Income/tests/test_IncomeTools.py rename to tests/test_IncomeTools.py diff --git a/HARK/tests/test_TractableBufferStockModel.py b/tests/test_TractableBufferStockModel.py similarity index 100% rename from HARK/tests/test_TractableBufferStockModel.py rename to tests/test_TractableBufferStockModel.py diff --git a/HARK/tests/test_approxDstns.py b/tests/test_approxDstns.py similarity index 100% rename from HARK/tests/test_approxDstns.py rename to tests/test_approxDstns.py diff --git a/HARK/tests/test_core.py b/tests/test_core.py similarity index 100% rename from HARK/tests/test_core.py rename to tests/test_core.py diff --git a/HARK/tests/test_dcegm.py b/tests/test_dcegm.py similarity index 100% rename from HARK/tests/test_dcegm.py rename to tests/test_dcegm.py diff --git a/HARK/tests/test_discrete.py b/tests/test_discrete.py similarity index 100% rename from HARK/tests/test_discrete.py rename to tests/test_discrete.py diff --git a/HARK/tests/test_distribution.py b/tests/test_distribution.py similarity index 99% rename from HARK/tests/test_distribution.py rename to tests/test_distribution.py index da1500eb1..d514178a8 100644 --- a/HARK/tests/test_distribution.py +++ b/tests/test_distribution.py @@ -23,7 +23,7 @@ distr_of_function, expected, ) -from HARK.tests import HARK_PRECISION +from tests import HARK_PRECISION class DiscreteDistributionTests(unittest.TestCase): diff --git a/HARK/tests/test_econforgeinterp.py b/tests/test_econforgeinterp.py similarity index 100% rename from HARK/tests/test_econforgeinterp.py rename to tests/test_econforgeinterp.py diff --git a/HARK/tests/test_interpolation.py b/tests/test_interpolation.py similarity index 100% rename from HARK/tests/test_interpolation.py rename to tests/test_interpolation.py diff --git a/HARK/Calibration/tests/test_load_data.py b/tests/test_load_data.py similarity index 100% rename from HARK/Calibration/tests/test_load_data.py rename to tests/test_load_data.py diff --git a/HARK/tests/test_mat_methods.py b/tests/test_mat_methods.py similarity index 100% rename from HARK/tests/test_mat_methods.py rename to tests/test_mat_methods.py diff --git a/HARK/tests/test_model.py b/tests/test_model.py similarity index 100% rename from HARK/tests/test_model.py rename to tests/test_model.py diff --git a/HARK/models/test_models.py b/tests/test_models.py similarity index 100% rename from HARK/models/test_models.py rename to tests/test_models.py diff --git a/HARK/simulation/test_monte_carlo.py b/tests/test_monte_carlo.py similarity index 100% rename from HARK/simulation/test_monte_carlo.py rename to tests/test_monte_carlo.py diff --git a/tests/test_package.py b/tests/test_package.py new file mode 100644 index 000000000..733668d5f --- /dev/null +++ b/tests/test_package.py @@ -0,0 +1,9 @@ +from __future__ import annotations + +import importlib.metadata + +import HARK as m + + +def test_version(): + assert importlib.metadata.version("econ-ark") == m.__version__ diff --git a/HARK/tests/test_parallel.py b/tests/test_parallel.py similarity index 100% rename from HARK/tests/test_parallel.py rename to tests/test_parallel.py diff --git a/HARK/tests/test_parser.py b/tests/test_parser.py similarity index 90% rename from HARK/tests/test_parser.py rename to tests/test_parser.py index 0a49e4171..8530fdbc3 100644 --- a/HARK/tests/test_parser.py +++ b/tests/test_parser.py @@ -9,7 +9,9 @@ class test_consumption_parsing(unittest.TestCase): def setUp(self): this_file_path = os.path.dirname(__file__) - consumer_yaml_path = os.path.join(this_file_path, "../models/consumer.yaml") + consumer_yaml_path = os.path.join( + this_file_path, "../src/HARK/models/consumer.yaml" + ) self.consumer_yaml_file = open(consumer_yaml_path, "r") diff --git a/HARK/tests/test_simulate.py b/tests/test_simulate.py similarity index 100% rename from HARK/tests/test_simulate.py rename to tests/test_simulate.py diff --git a/HARK/tests/test_validators.py b/tests/test_validators.py similarity index 100% rename from HARK/tests/test_validators.py rename to tests/test_validators.py