nk027 / bvar

Toolkit for the estimation of hierarchical Bayesian vector autoregressions. Implements hierarchical prior selection for conjugate priors in the fashion of Giannone, Lenza & Primiceri (2015). Allows for the computation of impulse responses and forecasts and provides functionality for assessing results.
https://cran.r-project.org/package=BVAR
Other
48 stars 21 forks source link

Optimisation #54

Closed nk027 closed 4 years ago

nk027 commented 4 years ago

There are some significant speed improvements possible. I implemented some already, cutting down runtime to about half. The big things that remain is a bit of solveing, rmvnorm and avoiding the companion matrix.

There's quite some potential in the multivariate normal draws - (a) we wouldn't need to check for symmetry, (b) the Cholesky is quite a bit faster, (c) in draw_post() we actually already have the eigendecomposition of sigma.