a software for Bayesian vector autoregressions and other Bayesian time-series applications
Project description
Alexandria
Alexandria is a Python package for Bayesian time-series econometrics applications. This is the second official release of the software, which introduces Bayesian vector autorgressions.
This is version 2.0, which includes Bayesian regression, Bayesian vector autoregression, and Bayesian VEC/VARMA models.
Alexandria offers a range of Bayesian linear regression models:
- maximum likelihood / OLS regression (non-Bayesian)
- simple Bayesian regression
- hierarchical (natural conjugate) Bayesian regression
- independent Bayesian regression with Gibbs sampling
- heteroscedastic Bayesian regression
- autocorrelated Bayesian regression
Alexandria also offers a large number of Bayesian vector autoregression models and applications:
- maximum likelihood (OLS) VAR
- Litterman Minnesota prior
- normal-Wishart prior
- independent prior with Gibbs sampling
- dummy observation prior
- large Bayeisian VAR prior
- Bayesian oxy-SVAR
prior customization:
- constrained coefficients
- dummy extensions (sums-of-coefficients, initial observation,long-run prior)
- stationary priors
- hyperparameter optimization from marginal likelihood
structural identification:
- Cholesky
- triangular factorization
- restrictions: sign and zero restrictions on IRFs, narrative on shocks and historical decomposition
applications:
- forecasts
- impulse response function
- forecast error variance decomposition
- historical decomposition
- conditional forecasts (agnostic and sctructural approaches, allowing for hard and soft conditions)
The current version includes Bayesian VEC and VARMA models, along with many applications:
- Bayesian VEC: uninformative, horseshoe and selection priors; general and reduced-rank approaches
- Bayesian VARMA: Minnesota prior on autoegressive and lag coefficients; residuals estimated from Bayesian state-space modelling
- structural identification and applications are the same as the Bayesian VAR models
Alexandria is user-friendly and can be used from a simple Graphical User Inteface (GUI). More experienced users can also run the models directly from the Python console by using the model classes and methods.
===============================
Installing Alexandria
Alexandria can be installed from pip:
pip install alexandria-python
A local installation can also obtain by copy-pasting the folder containing the toolbox programmes. The folder can be downloaded from the project website or Github repo:
https://alexandria-toolbox.github.io
https://github.com/alexandria-toolbox
===============================
Getting started
Simple Python example:
# imports
from alexandria import NormalWishartBayesianVar
from alexandria import DataSets
from alexandria import Graphics
import numpy as np
# load ISLM dataset
ds = DataSets()
islm_data = ds.load_islm()[:,:4]
# create and train Bayesian VAR with default settings
var = NormalWishartBayesianVar(endogenous = islm_data)
var.estimate()
# estimate forecasts for the next 4 periods, 60% credibility level
forecast_estimates = var.forecast(4, 0.6)
# create graphics of predictions
gp = Graphics(var)
gp.forecast_graphics(show=True, save=False)
===============================
Documentation
Complete manuals and user guides can be found on the project website and Github repo:
https://alexandria-toolbox.github.io
https://github.com/alexandria-toolbox
===============================
Contact
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file alexandria_python-2.0.1.tar.gz.
File metadata
- Download URL: alexandria_python-2.0.1.tar.gz
- Upload date:
- Size: 770.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ae87070404bf3063303437ef12a6fbaf43dbd7fe2933c1494118b8f396a5d37
|
|
| MD5 |
5015f310d2cfdf85b1b5b1b4be55c325
|
|
| BLAKE2b-256 |
079836b34e957354ffa3547a836e6f8a50eb1e7b1507449c87bc7328bf9e5e01
|
File details
Details for the file alexandria_python-2.0.1-py3-none-any.whl.
File metadata
- Download URL: alexandria_python-2.0.1-py3-none-any.whl
- Upload date:
- Size: 812.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a27b5cc497bbbea5a975d2e32909e6a8bff1e8d6c5f69eea1484963f6ed3ce6
|
|
| MD5 |
8af5f6a6e2bf7a219063e9d3a4f6b0e1
|
|
| BLAKE2b-256 |
8ff10c5954f3bfec8700cf556c5ae509d22fa48c67d2a14387addb1582c69a38
|