Skip to main content

Demo programs to learn macroeconomics and macro-econometrics concepts

Project description

MACRODEMOS

Macroeconomics Demos: A Python package to teach macroeconomics and macroeconometrics

The purpose of this package is to provide tools to teach concepts of macroeconomics and macroeconometrics.

To date, the package provides these functions:

  • ARMA( ): Demo for learning about ARMA processes. It creates a dash consisting of 7 plots to study the theoretical properties of ARMA(p, q) processes, as well as their estimated counterparts. The plots display

    1. a simulated sample
    2. autocorrelations
    3. partial autocorrelations
    4. impulse response function
    5. spectral density
    6. AR inverse roots
    7. MA inverse roots.
  • Markov('state_0',...,'state_n'): a demo to illustrate Markov chains. User sets the number of states, the transition matrix, and the initial distribution. The demo creates a dash consisting of 2 plots:

    1. a simulated sample
    2. the time evolution of the distribution of states
  • Solow( ): this demo illustrates the Solow-Swan model. Users can simulate the dynamic effect of a shock in a exogenous variable or a change in a model parameter. You will find 6 figures about the Solow-Swan model:

    1. Capital stock, per capita
    2. Output per capita,
    3. Savings per capita,
    4. Consumption per capita,
    5. Change in capital stock, and
    6. Output growth rate

    It also presents plots to illustrate how steady-state capital is determined, and the golden rule.

  • filters( ): to illustrate the use of the Hodrick-Prescott, Baxter-King, Christiano-Fitzgeral and Hamilton filters.

In a near future, I expect to add a few more demos:

  • Bellman( ): to illustrate the solution of a Bellman equation by value function iteration
  • BoxJenkins( ): to illustrate the Box-Jenkins methodology, by fitting two ARIMA models side-by-side to user-provided data.
  • FilterMyData( ): to filter user-supplied data with several methodologies, comparing their resulting cycles.

Instructions

To use the demos, just install this package pip install macrodemos and then run any of the demos you want.

import macrodemos
macrodemos.ARMA()
macrodemos.Markov()
macrodemos.Solow()
macrodemos.filter()

This will open a new tab in your default Internet browser with a Plotly dash. A current limitation is that you can only run one demo at a time.

Disclaimer

This program illustrates basic concepts of macroeconomics and time series econometrics. It was developed for teaching purposes only: you are free to use it in your own lectures or to learn about these topics.

If you have any suggestions, please send me an email at randall.romero@ucr.ac.cr

Copyright 2016-2024 Randall Romero-Aguilar

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

macrodemos-2025.4.10.tar.gz (307.6 kB view details)

Uploaded Source

Built Distribution

macrodemos-2025.4.10-py3-none-any.whl (304.6 kB view details)

Uploaded Python 3

File details

Details for the file macrodemos-2025.4.10.tar.gz.

File metadata

  • Download URL: macrodemos-2025.4.10.tar.gz
  • Upload date:
  • Size: 307.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for macrodemos-2025.4.10.tar.gz
Algorithm Hash digest
SHA256 f28181f5a75544991ac807feeee36466cf82369b6213a38df683e534b83730c1
MD5 3efb87f11b20c7be5d889ee7cde8e170
BLAKE2b-256 80945afae70d94a936cbfea7b47817e1d8ba8811bd730b6ff16b745d6f7ee5ab

See more details on using hashes here.

File details

Details for the file macrodemos-2025.4.10-py3-none-any.whl.

File metadata

  • Download URL: macrodemos-2025.4.10-py3-none-any.whl
  • Upload date:
  • Size: 304.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for macrodemos-2025.4.10-py3-none-any.whl
Algorithm Hash digest
SHA256 74bfb451b2f4b6ea96ce6d955655c5fe30b5ff34673f95325dfb68263920f285
MD5 ba429518040678b148b498496cd8a9a0
BLAKE2b-256 3e9dff2db2c4b2e3da20ce516a371c40038bd5deae0e343b2b6323357ddd0b70

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page