Bayesian estimation of a Structural Vector Autoregression with Stochastic Volatility heteroskedasticity via Gibbs sampler
Bayesian estimation of a Structural Vector Autoregression with Stochastic Volatility heteroskedasticity via Gibbs sampler
Estimates the SVAR with Stochastic Volatility (SV) heteroskedasticity proposed by Lütkepohl, Shang, Uzeda, and Woźniak (2024). Implements the Gibbs sampler proposed by Waggoner & Zha (2003) for the structural matrix B and the equation-by-equation sampler by Chan, Koop, & Yu (2024) for the autoregressive slope parameters A. Additionally, the parameter matrices A and B
follow a Minnesota prior and generalised-normal prior distributions respectively with the matrix-specific overall shrinkage parameters estimated thanks to a hierarchical prior distribution. The SV model is estimated using a range of techniques including: simulation smoother, auxiliary mixture, ancillarity-sufficiency interweaving strategy, and generalised inverse Gaussian distribution summarised by Kastner & Frühwirth-Schnatter (2014). See section Details for the model equations.
## S3 method for class 'PosteriorBSVARSV'estimate(specification, S, thin =1, show_progress =TRUE)
Arguments
specification: an object of class PosteriorBSVARSV generated using the estimate.BSVAR() function. This setup facilitates the continuation of the MCMC sampling starting from the last draw of the previous run.
S: a positive integer, the number of posterior draws to be generated
thin: a positive integer, specifying the frequency of MCMC output thinning
show_progress: a logical value, if TRUE the estimation progress bar is visible
Returns
An object of class PosteriorBSVARSV containing the Bayesian estimation output and containing two elements:
posterior a list with a collection of S draws from the posterior distribution generated via Gibbs sampler containing:
A: an NxKxS array with the posterior draws for matrix A
B: an NxNxS array with the posterior draws for matrix B
hyper: a 5xS matrix with the posterior draws for the hyper-parameters of the hierarchical prior distribution
h: an NxTxS array with the posterior draws of the log-volatility processes
rho: an NxS matrix with the posterior draws of SV autoregressive parameters
omega: an NxS matrix with the posterior draws of SV process conditional standard deviations
S: an NxTxS array with the posterior draws of the auxiliary mixture component indicators
sigma2_omega: an NxS matrix with the posterior draws of the variances of the zero-mean normal prior for omega
s_: an S-vector with the posterior draws of the scale of the gamma prior of the hierarchical prior for sigma2_omega
last_draw an object of class BSVARSV with the last draw of the current MCMC run as the starting value to be passed to the continuation of the MCMC estimation using estimate().
Details
The heteroskedastic SVAR model is given by the reduced form equation:
Y=AX+E
where Y is an NxT matrix of dependent variables, X is a KxT matrix of explanatory variables, E is an NxT matrix of reduced form error terms, and A is an NxK matrix of autoregressive slope coefficients and parameters on deterministic terms in X.
The structural equation is given by
BE=U
where U is an NxT matrix of structural form error terms, and B is an NxN matrix of contemporaneous relationships. Finally, the structural shocks, U, are temporally and contemporaneously independent and jointly normally distributed with zero mean.
Two alternative specifications of the conditional variance of the nth shock at time t
can be estimated: non-centred Stochastic Volatility by Lütkepohl, Shang, Uzeda, and Woźniak (2022) or centred Stochastic Volatility by Chan, Koop, & Yu (2021).
The non-centred Stochastic Volatility by Lütkepohl, Shang, Uzeda, and Woźniak (2022) is selected by setting argument centred_sv of function specify_bsvar_sv$new() to value FALSE. It has the conditional variances given by:
Vart−1[un.t]=exp(wnhn.t)
where wn is the estimated conditional standard deviation of the log-conditional variance and the log-volatility process hn.t follows an autoregressive process:
hn.t=gnhn.t−1+vn.t
where hn.0=0, gn is an autoregressive parameter and vn.t is a standard normal error term.
The centred Stochastic Volatility by Chan, Koop, & Yu (2021) is selected by setting argument centred_sv of function specify_bsvar_sv$new() to value TRUE. Its conditional variances are given by:
Vart−1[un.t]=exp(hn.t)
where the log-conditional variances hn.t follow an autoregressive process:
hn.t=gnhn.t−1+vn.t
where hn.0=0, gn is an autoregressive parameter and vn.t is a zero-mean normal error term with variance sv.n2.
Examples
# simple workflow############################################################# upload datadata(us_fiscal_lsuw)# specify the model and set seedspecification = specify_bsvar_sv$new(us_fiscal_lsuw, p =1)set.seed(123)# run the burn-inburn_in = estimate(specification,10)# estimate the modelposterior = estimate(burn_in,20,2)# workflow with the pipe |>############################################################set.seed(123)us_fiscal_lsuw |> specify_bsvar_sv$new(p =1)|> estimate(S =10)|> estimate(S =20, thin =2)|> compute_impulse_responses(horizon =4)-> irf
References
Chan, J.C.C., Koop, G, and Yu, X. (2024) Large Order-Invariant Bayesian VARs with Stochastic Volatility. Journal of Business & Economic Statistics, 42 , tools:::Rd_expr_doi("10.1080/07350015.2023.2252039") .
Kastner, G. and Frühwirth-Schnatter, S. (2014) Ancillarity-Sufficiency Interweaving Strategy (ASIS) for Boosting MCMC Estimation of Stochastic Volatility Models. Computational Statistics & Data Analysis, 76 , 408--423, tools:::Rd_expr_doi("10.1016/j.csda.2013.01.002") .
Lütkepohl, H., Shang, F., Uzeda, L., and Woźniak, T. (2024) Partial Identification of Heteroskedastic Structural VARs: Theory and Bayesian Inference. University of Melbourne Working Paper, 1--57, tools:::Rd_expr_doi("10.48550/arXiv.2404.11057") .
Waggoner, D.F., and Zha, T., (2003) A Gibbs sampler for structural vector autoregressions. Journal of Economic Dynamics and Control, 28 , 349--366, tools:::Rd_expr_doi("10.1016/S0165-1889(02)00168-9") .