**************************************************************************************************************************************
This folder contains the code and the data to replicate the results in 
"The effects of oil price uncertainty on the global real economic activity"
by Soojin Jo.
Forthcoming in the Journal of Money, Credit and Banking.
August 2013.
**************************************************************************************************************************************

The main code is mainVAR.m which calls other required functions and will reproduce 
all the figures (Figures 1-7)in the main text automatically at the end. The main functions
called upon by mainVAR.m are:

1) genRV.m : produces the time series of realized volatility during the period the daily oil 
price data is available (i.e., since 1983Q1) and of its asymptotic variance for equation (7).

2) setup_benchmark.m : adjusts the raw data set to be appropriate for the benchmark analysis and obtain the 
OLS estimates to be used as parameters for prior distributions

3) initialdraws.m : sets up the parameter values for the very first iteration

4) GS_benchmark.m : runs the Gibbs-sampler algorithm for the benchmark analysis by calling other functions.


**************************************************************************************************************************************

Other functions called in the mainVAR.m are:

5) IRFtoUncertainty.m, and IRF1986.m : compute impulse response functions to reproduce Figures 6 and 7 in the main text

6) GS_woRV.m : runs the Gibbs sampler without realized volatility (i.e. without equation (7))

7) setup_74.m, setup_K.m, and setup_US.m : re-adjust the raw data or import other data sets for results using shorter sample,
                                        Kilian's (2009) real global economic acitivity measure, and US GDP, respectively.

**************************************************************************************************************************************

Lastly, the matlab function included in the folder is:

8) appVAR.m : the main code for replicating the additional results shown in the online Appendix, calling other required functions.

**************************************************************************************************************************************

The sub-folders contain the following:

1) Data : raw data sets

2) figures : matlab function files to create the figures in the main text and the appendix

3) functions : matlab function files used in the Gibbs sampling algorithm

4) Variations : matlab function files that set up a data set and run Gibbs-sampler algorithm for results with variations 
             other than the benchmark case.

**************************************************************************************************************************************