QuantEcon.py
A high performance, open source Python code library for economics
from quantecon.markov import DiscreteDP
aiyagari_ddp = DiscreteDP(R, Q, beta)
results = aiyagari_ddp.solve(method='policy_iteration')
Installation
Before installing quantecon we recommend you install the Anaconda Python distribution, which includes a full suite of scientific python tools.
Next you can install quantecon by opening a terminal prompt and typing
pip install quantecon
or using conda-forge by typing
conda install -c conda-forge quantecon
Usage
Once quantecon has been installed you should be able to import it as follows:
import quantecon as qe
You can check the version by running
print(qe.__version__)
If your version is below what’s available on PyPI then it is time to upgrade. This can be done by running
pip install --upgrade quantecon
Examples and Sample Code
Many examples of QuantEcon.py in action can be found at Quantitative Economics. See also the
QuantEcon.py is supported financially by the Alfred P. Sloan Foundation and is part of the QuantEcon organization.
Downloading the quantecon Repository
An alternative is to download the sourcecode of the quantecon package and install it manually from the github repository. For example, if you have git installed type
git clone https://github.com/QuantEcon/QuantEcon.py
Once you have downloaded the source files then the package can be installed by running
cd QuantEcon.py
pip install .
(To learn the basics about setting up Git see this link.)
Citation
QuantEcon.py is MIT licensed, so you are free to use it without any charge and restriction. If it is convenient for you, please cite QuantEcon.py when using it in your work and also consider contributing all your changes back, so that we can incorporate it.
A BibTeX entry for LaTeX users is
@article{10.21105/joss.05585,
author = {Batista, Quentin and Coleman, Chase and Furusawa, Yuya and Hu, Shu and Lunagariya, Smit and Lyon, Spencer and McKay, Matthew and Oyama, Daisuke and Sargent, Thomas J. and Shi, Zejin and Stachurski, John and Winant, Pablo and Watkins, Natasha and Yang, Ziyue and Zhang, Hengcheng},
doi = {10.21105/joss.05585},
title = {QuantEcon.py: A community based Python library for quantitative economics},
year = {2024},
journal = {Journal of Open Source Software},
volume = {9},
number = {93},
pages = {5585},
url = {https://joss.theoj.org/papers/10.21105/joss.05585}
}
Star History
Release files for quantecon 0.12.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| quantecon-0.12.0.tar.gz | 310.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| quantecon-0.12.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 662.5 kB
Release files / quantecon-0.12.0.tar.gz
| Download URL | quantecon-0.12.0.tar.gz |
|---|---|
| Size | 310.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ebde3d16a7f63c819de52e2cd82309747efed9796274eda247cc89cca431d767
|
|
BLAKE2b-256 checksum How to use checksums |
607258ef3548c4e3b9d023313d08af36b6a017900c0d556bd06c85759867e25a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.34.2
|
Release files / quantecon-0.12.0-py3-none-any.whl
| Download URL | quantecon-0.12.0-py3-none-any.whl |
|---|---|
| Size | 351.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f7c7bc869f9e26369f47a3d8f2cc278d428fa64bf74642e40f0ef87c2a924a0e
|
|
BLAKE2b-256 checksum How to use checksums |
31692ae52fa1bfa37f3b9c584a4828a8bc478e04052fae917478fe054bfc62e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.34.2
|