Skip to content

Latest commit

 

History

History
23 lines (14 loc) · 850 Bytes

File metadata and controls

23 lines (14 loc) · 850 Bytes

Description

Custom implementation of BVAR model (Bayesian vector autoregression) using PyMC library. The implemented model was tested on macroeconomic data for forecasting inflation (CPI index) data.

Bayesian VAR / BVAR / Bayesian vector autoregression PYMC

Model Specificaiton

Several edits were made to improve existing PyMC BVAR implementations:

  • You can pass K exogenous variables in the model, but state that only L of them (L<=K) are used for fitting. For example, this allows to model 4 VAR equations with 20 exogenous variables;
  • OLS prior estimates were added to improve model convergence speed;
  • Added code snippets for forecasting model on test period.

Model results

alt text

PyMC model graph

alt text

Usefull links

https://kevinkotze.github.io/ts-9-tut/