Deep neural network for solving continuous time economic models
Project description
Deep-MacroFin
Deep-MacroFin is a comprehensive deep-learning framework designed to solve equilibrium economic models in continuous time. The library leverages deep learning to alleviate curse of dimensionality.
Documentation: mkdocs
Start developing
Code
All the code are under deep_macrofin
, and the tests are under tests
The project is now configured with poetry for dependency management and packaging. To install the dependencies and run the code:
poetry config virtualenvs.in-project true --local # this sets the virtual environment path to be in the local directory.
poetry shell # creates the virtual environment
poetry install --no-interaction # installs the dependencies and the package
## You can now run the tests using the command:
pytest tests
To run the code and tests locally without poetry:
python -m venv venv
source venv/bin/activate # venv/Scripts/activate using Windows powershell
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install -r requirements-doc.txt
For easier testing, you can create a file in the root folder of the project, and import functions from deep_macrofin
.
To properly run all tests in the tests/
folder
pip install -e .
pytest tests/
Examples
Various examples using the library, with comparisons to DeepXDE and PyMacroFin are included in examples
basic_examples
: Solutions to basic ODEs/PDEs, diffusion equation, function approximation and systems of ODEs, with some comparisons to DeepXDE.initial_examples
: Initial scripts for testing deep neural networks for ODE/PDE solutions, and macromodels.kan_examples
: Solutions to basic ODEs, using KAN as approximatorsmacro_problems
: Macroeconomic models in different dimensions.paper_example
: Examples in the paper, with PyMacroFin and deepXDE comparisons. Models and log files for reproducing paper results can be found in Google Drive.pymacrofin_eg
: Examples from PyMacroFin and proposition 2 from Brunnermeier and Sannikov (2014)
Note: PyMacroFin and DeepXDE are used as benchmarks in several examples, but the associated packages are not included in this repo's requirements.txt
. To run the comparisons properly, please install their packages respectively.
Docs
The documentation site is based on mkdocs and mkdocs-mateiral.
Layouts
mkdocs.yml # The configuration file.
docs/
index.md # The documentation homepage.
... # Other markdown pages, images and other files.
To see the site locally, run the following command:
mkdocs serve
Cite Deep-MacroFin
If you use Deep-MacroFin for academic research, you are encouraged to cite the following paper:
@misc{wu2024deepmacrofin,
title={Deep-MacroFin: Informed Equilibrium Neural Network for Continuous Time Economic Models},
author={Yuntao Wu and Jiayuan Guo and Goutham Gopalakrishna and Zisis Poulos},
year={2024},
eprint={2408.10368},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2408.10368},
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file deep_macrofin-0.3.7.tar.gz
.
File metadata
- Download URL: deep_macrofin-0.3.7.tar.gz
- Upload date:
- Size: 123.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
3209dfa3a92e416ffca0f99f4f95756b303b7fd0d9f4107ef548181726aef14d
|
|
MD5 |
c210415e88aac2f055fe214a63175ee3
|
|
BLAKE2b-256 |
15f9aa1897cbc02a587458424d67de7392a49ee5f6a43aa8ece106442c01fab4
|
Provenance
The following attestation bundles were made for deep_macrofin-0.3.7.tar.gz
:
Publisher:
ci-build.yaml
on rotmanfinhub/deep-macrofin
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
deep_macrofin-0.3.7.tar.gz
-
Subject digest:
3209dfa3a92e416ffca0f99f4f95756b303b7fd0d9f4107ef548181726aef14d
- Sigstore transparency entry: 212538329
- Sigstore integration time:
-
Permalink:
rotmanfinhub/deep-macrofin@e2778bd01b010d10b9a957c63fde534f2d665366
-
Branch / Tag:
refs/tags/v0.3.7
- Owner: https://github.com/rotmanfinhub
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
ci-build.yaml@e2778bd01b010d10b9a957c63fde534f2d665366
-
Trigger Event:
release
-
Statement type:
File details
Details for the file deep_macrofin-0.3.7-py3-none-any.whl
.
File metadata
- Download URL: deep_macrofin-0.3.7-py3-none-any.whl
- Upload date:
- Size: 138.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
cff38fe8d678ff7601bddc6573251039fa4117d58784cb4baa318dfe71e5467a
|
|
MD5 |
701aae291b6a31adf9412ae4c4e913c4
|
|
BLAKE2b-256 |
5e5b1f23f7046204f7b7cbf948417ed7dc4a956a5df7ba2b2c2d5970063213ec
|
Provenance
The following attestation bundles were made for deep_macrofin-0.3.7-py3-none-any.whl
:
Publisher:
ci-build.yaml
on rotmanfinhub/deep-macrofin
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1
-
Predicate type:
https://docs.pypi.org/attestations/publish/v1
-
Subject name:
deep_macrofin-0.3.7-py3-none-any.whl
-
Subject digest:
cff38fe8d678ff7601bddc6573251039fa4117d58784cb4baa318dfe71e5467a
- Sigstore transparency entry: 212538332
- Sigstore integration time:
-
Permalink:
rotmanfinhub/deep-macrofin@e2778bd01b010d10b9a957c63fde534f2d665366
-
Branch / Tag:
refs/tags/v0.3.7
- Owner: https://github.com/rotmanfinhub
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com
-
Runner Environment:
github-hosted
-
Publication workflow:
ci-build.yaml@e2778bd01b010d10b9a957c63fde534f2d665366
-
Trigger Event:
release
-
Statement type: