GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — bvar-toolkit-python/guides at main · joshuaccchan/bvar-toolkit-python

Expand file tree

/

guides

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

guides

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
coefficient_draw
coefficient_draw
 
 
data
data
 
 
gibbs_sampler
gibbs_sampler
 
 
natural_conjugate_ml
natural_conjugate_ml
 
 
var_forecast
var_forecast
 
 
var_forecast_evaluation
var_forecast_evaluation
 
 
var_lag_shrinkage
var_lag_shrinkage
 
 
var_simulation
var_simulation
 
 
var_stacking
var_stacking
 
 
README.md
README.md
 
 

README.md

Outline

How-To Guides

Each guide shows how to use the toolkit's core functions on one small example with generated data. A guide is a page, README.md, and a script, guide.py, that prints the numbers and draws the figures on the page. The guides come in series, and within a series each guide builds on the one before. They are the Python versions of the guides of the MATLAB toolkit.

Getting Started with Bayesian VARs

The guides use the same generated VAR(2) of three variables.

Guide What it shows Core functions
How to Stack the Equations of a VAR Stack the equations in matrix form and as one long regression bvt.util.build_lags, bvt.util.surform2
How to Draw the VAR Coefficients under the Minnesota Prior Get posterior draws of the VAR coefficients bvt.priors.minn, bvt.samplers.var_coef_joint
How to Estimate a VAR by Gibbs Sampling Draw the coefficients and the error covariance matrix in turn, and check the chain bvt.samplers.var_coef_joint, bvt.diag.inefficiency_factor, bvt.diag.mcse, bvt.diag.geweke
How to Choose the Shrinkage of a VAR by the Marginal Likelihood Choose the shrinkage and the lag length by the closed-form marginal likelihood bvt.util.ldet, bvt.util.mgammaln, bvt.ml.kron_bvar

Forecasting with a VAR

The guides use data simulated from a VAR(4) fitted to US real GDP growth, PCE inflation and the unemployment rate, 1960Q1 to 2019Q4.

Guide What it shows Core functions
How to Simulate Data from an Estimated VAR Simulate data from a VAR fitted to US GDP growth, inflation and unemployment bvt.util.build_lags, bvt.util.simulate_var
How to Forecast with a Bayesian VAR Forecast from posterior draws, and compare with the true model's forecasts bvt.util.simulate_var, bvt.forecast.predictive, bvt.forecast.mixquantile
How to Evaluate Forecasts Out of Sample Score forecasts made at each quarter with the data of the time bvt.forecast.predictive, bvt.util.logsumexp
How to Choose the Lag Length and the Shrinkage for Forecasting Choose the lag length and the shrinkage by the marginal likelihood at each forecast origin bvt.util.build_lags, bvt.util.ldet, bvt.util.mgammaln

The tutorials answer empirical questions with the settings of published papers, and the examples of the MATLAB toolkit run the core functions on additional models, with real and generated data.

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.