MCPcopy Index your code
hub / github.com/QuantEcon/QuantEcon.py

github.com/QuantEcon/QuantEcon.py @v0.11.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.11.2 ↗ · + Follow
1,393 symbols 4,031 edges 167 files 500 documented · 36%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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')

Build Status Coverage Status Documentation (stable) Documentation (latest) PyPI Version PyPI - Python Version

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

pip install flit
flit 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.5281/zenodo.10345102},
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}
}

Star History

Star History Chart

Core symbols most depended-on inside this repo

check_random_state
called by 46
quantecon/util/random.py
is_nash
called by 24
quantecon/game_theory/normal_form_game.py
best_response
called by 19
quantecon/game_theory/normal_form_game.py
solve
called by 17
quantecon/markov/ddp.py
simulate
called by 16
quantecon/markov/core.py
nelder_mead
called by 15
quantecon/optimize/nelder_mead.py
timeit
called by 15
quantecon/util/timing.py
stationary_values
called by 13
quantecon/_lqcontrol.py

Shape

Method 760
Function 488
Class 145

Languages

Python100%

Modules by API surface

quantecon/tests/test_quad.py96 symbols
quantecon/game_theory/tests/test_normal_form_game.py79 symbols
quantecon/util/tests/test_timing.py39 symbols
quantecon/optimize/tests/test_nelder_mead.py39 symbols
quantecon/markov/tests/test_core.py32 symbols
quantecon/markov/core.py29 symbols
quantecon/_graph_tools.py28 symbols
quantecon/game_theory/game_generators/tests/test_bimatrix_generators.py27 symbols
quantecon/markov/tests/test_approximation.py26 symbols
quantecon/tests/test_graph_tools.py25 symbols
quantecon/markov/ddp.py25 symbols
quantecon/game_theory/normal_form_game.py25 symbols

For agents

$ claude mcp add QuantEcon.py \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact