Skip to content

Releases: joshuaccchan/bvar-toolkit

bvar-toolkit 1.1.0

Choose a tag to compare

@joshuaccchan joshuaccchan released this 24 Sep 23:22

Six tutorials, new model wrappers and samplers, and the ml_tvpsv package functionized.

Tutorials

Each tutorial answers one question from applied work with the settings of a published paper. build.m reproduces every number and figure on the page, and your_data.m runs the same analysis on other data.

  • Does the order of the variables change my VAR results?
  • How should I choose the shrinkage hyperparameters of my BVAR?
  • Which stochastic volatility specification should my VAR use?
  • Does modeling the volatility improve my forecasts?
  • Can I use many sign restrictions in my large VAR?
  • How do I handle missing and mixed-frequency data in my VAR?

Library

  • bvar.models: var_sv (Cholesky and order-invariant stochastic volatility), var_csv (common stochastic volatility) and mfvar_csv (mixed-frequency VAR with common stochastic volatility)
  • bvar.samplers: missing_var (missing and mixed-frequency observations, with soft restrictions) and var_coef_joint
  • bvar.sv.csv_armh_block: the common volatility path drawn in blocks
  • bvar.forecast: predictive, simulate and mixquantile
  • bvar.diag: inefficiency factors, numerical standard errors and Geweke's convergence test
  • bvar.structural.check_separable
  • bvar.ml: the marginal likelihoods of Chan and Eisenstat (2018) (mltvpsv_*), and a 'gram', 'blocks' option that speeds up the estimators of Chan (2023)
  • bvar.util: report, select_obs, mm_constraint, dlog_gaps and kron_gram

Replications

  • chan_eisenstat2018_jae_mltvpsv: run_all (estimation of the ten models) and run_ml (marginal likelihoods), both tested draw for draw against the published code. The published regime-switching likelihood starts its filter at 1/3 whatever the number of regimes; run_ml corrects this by default, and 'bugcompat', true reproduces the published code.

Other

  • Examples ex05 (common stochastic volatility), ex13 (MCMC diagnostics) and ex14 (mixed-frequency VAR)
  • CITING.md (what to cite for each method, with BibTeX) and RELATED.md (the R and Python code of the book, and the R package bvars)
  • Each precision matrix is now factored once for the solve, the draw and the log determinant, which changes results only in the last digits
  • var_sv uses a truncated candidate for the AR coefficient of the log-volatilities by default

bvar-toolkit 1.0.0

Choose a tag to compare

@joshuaccchan joshuaccchan released this 17 Sep 02:36

First archived release.

  • core/: the bvar MATLAB library of samplers, priors, stochastic volatility, marginal likelihoods, forecasting and structural identification, with unit tests.
  • replications/: fourteen replication packages, preserved verbatim.
  • examples/: eleven short scripts in four groups.

Requires MATLAB with the Statistics and Machine Learning Toolbox.