################################################################################################################
###---------------------------------------------- Readme ----------------------------------------------------###
###-------------------------- Replication of Hauzenberger, Huber, and Koop (2023) ---------------------------### 
###---------------- Dynamic Shrinkage Priors for Large TVP Regressions using Scalable MCMC ------------------###
################################################################################################################

The replication files in the form of R-codes allow for estimating the VAR based on real data and 
reproducing in-sample results discussed in Section 6. 

For the empirical exercise, we rely on yield curve data obtained from Eurostat 
(available via https://ec.europa.eu/eurostat/de/data/database and Data/EA_ylds.rda).
This dataset covers 30 different maturities ranging from 2005:M1 to 2019:M12. 
Here, we focus on a Nelson-Siegel factor model and  estimate a VAR with M = 3 equations 
on an equation-by-equation basis. 

The forecasting results in the paper are obtained using a cluster. 
Hence, reproducing them on a standard desktop pc is infeasible. For the forecasting exercise, 
we use basically the same codes but expand the model set and hold-out sample.

List of files: 

 "EA_ylds.rda" contains the yield curve data set.
 
 "estim-eqbyeq-main.R" contains the codes for estimating the VAR on an equation-by-equation basis.

 "collect-VAR.R" collects the individual VAR equations.

 "main_mcmc_sampler.R" contains the scalable MCMC sampler for a large TVP regression.

 "aux_mcmc_functions.R" contains a set of helper functions for MCMC estimation.