Bayesian Macroeconometrics

optim Build Coverage Status

Watch Star Fork


BM++ is a templated C++ library for estimating Bayesian Vector Autoregressive (BVAR) and Dynamic Stochastic General Equilibrium (DSGE) models.


Features
  • Several popular prior specifications:
    • normal-inverse-Wishart prior,
    • Minnesota prior, and
    • Mattias Villani's steady-state prior.
  • BM++ can also estimate BVARs with time-varying parameters, as well as classical (non-Bayesian) VARs.
 
  • For DSGE models, the library can
    • solve models using Harald Uhlig's method of undetermined coefficients and Chris Sims' canonical decomposition;
    • estimate models using MCMC and a choice of filtering methods, the Kalman filter or Chandrasekhar recursions; and
    • estimate a hybrid DSGE-VAR model.

Author: Keith O'Hara

License


Download and Installation

  • The source code is available on GitHub.

BM++ can be installed in the standard way:

# clone BM++
git clone -b master --single-branch https://github.com/kthohr/bmlib ./bmlib
# build and install
cd ./bmlib
./configure -i "/usr/local" -p
make
make install

The last line will install BM++ into /usr/local

Configuration options: (see ./configure -h)

    Primary
  • -h print help
  • -i install path; default: the build directory
            example: -i "/usr/local"
  • -m specify the BLAS and Lapack libraries to link against;
            examples: -m "-lopenblas" or -m "-framework Accelerate"
  • -o compiler optimization options;
            default: -O3 -march=native -ffp-contract=fast -flto -DARMA_NO_DEBUG
  • -p enable OpenMP parallelization features (recommended)
  • Secondary
  • -c a coverage build (used with Codecov)
  • -d a 'development' build
  • -g a debugging build (optimization flags set to -O0 -g)

Armadillo

BM++ is built on the Armadillo C++ linear algebra library. The configure script will search for Armadillo files in the standard locations: /usr/include, /usr/local/include, /opt/include, /opt/local/include. If the Armadillo header files are installed elsewhere, set the following environment variable before running configure:
export ARMA_INCLUDE_PATH=/path/to/armadillo
Otherwise the build script will download the required files from the Armadillo GitLab repository.