Page 1 of 1

Informative Normal-Wishart Litterman Prior

Posted: Thu Oct 04, 2012 10:26 am
by Andy_T
Dear all,

I am trying to replicate the Normal-Wishart Litterman Prior as in Kadiyala and Karlsson, 1997 (JAE) pp. 104-105. GIBBSVAR.src handles the Normal-Diffuse version of it, but I want the prior for the residual covariance matrix to be informative. I know that due to the natural conjugacy of the Normal-Wishart prior reflected in the Kronecker structure in the prior specification, the prior covariance of the coefficients in every equation must be the same (apart from the proportinality constant). According to the paper this can be achieved by setting what they call pi1=pi2 which in the GIBBBSVAR code I would say translates into setting the relative tightness of the other lags to 1?

However, in this case there is still the scale factor accounting for the differing variablity of the variables. As this is a ratio of the (estimated) residual variance in equation i to the residual variance in equation j this should imply a different covariance matrix structure in each equation. I do not see how this is dealt with in the paper and I was wondering if there is a common way to handle this?

I am also trying to avoid using an independent Normal-Wishart prior.

Re: Informative Normal-Wishart Litterman Prior

Posted: Mon Oct 22, 2012 8:44 pm
by tclark
At the risk of pointing out things you already know, using the Normal-Wishart prior and posterior entails a few changes relative to the Normal-diffuse prior coded up in GIBBSVAR.SRC. First, using the Normal-Wishart means that the equations must be treated symmetrically. It is no longer possible to impose one rate of shrinkage on "own" lags and another on "other" lags; the shinkage on lag k of variable j has to be the same in equation i as in equation j. Second, under the Normal-Wishart, Gibbs sampling is no longer needed. The posterior mean and variance have simple closed forms. These closed form equations can be simulated directly without Gibbs sampling. Finally, as you note, under the Normal-Wishart, it is necessary to have a proper Wishart prior on Sigma, which the diffuse setup leaves out. Sune Karlsson has a forthcoming survey paper (link below) for vol 2. of the Handbook of Economic Forecasting that provides an up-to-date explanation of this stuff and related literature. Finally, within the world of Gibbs sampling, it would be possible to modify the Normal-diffuse setup to preserve the option of "other" variable shrinkage while having a Wishart prior on Sigma.

Putting aside this long prelude, I have attached a procedure that handles the conventional Normal-Wishart prior and posterior described in sources such as K-K (1997). The procedure computes the posterior mean and variance and then, if the user sets the number of MC draws to be greater than 1, it simulates the distributions of the VAR coefficients and Sigma, as well as forecasts.

http://www.oru.se/PageFiles/36235/WP%2012%202012.pdf

Re: Informative Normal-Wishart Litterman Prior

Posted: Wed Oct 31, 2012 10:50 am
by Andy_T
Dear Todd,

thank you very much for your reply and the attached paper and code. As you pointed out Gibbs sampling is no longer needed when using the natural conjugate Normal-Wishart prior, at the cost of having to impose symmetry across equations when specifying the prior coefficient covariance matrix. This is where I don't fully understand the K-K (1997) paper. They impose the same overall tightness on all lags by setting their relative tightness parameter to 1. However, the Minnesota prior still accounts for differences in the units of measurement for different variables through the ratio sigma_i/sigma_j for parameters on lags of variable j (sigma_i being the residual standard error from a univariate OLS regression of lagged values of variable i). These would then still lead to asymmetric prior covariance structures in different equations.

For example in a VAR with 2 equations, 2 lags and no constant the entries in equation 1 relating to the second variable would be multiplied by the ratio sigma_1/sigma_2. Conversely, the entries in equation 2 relating to the first variable would be multiplied by the ratio sigma_2/sigma_1. However, I can only specify one 4x4 matrix with one ratio for the parameter covariance because I have to obey symmetry?

In the attached procedureI understand that there is no cross-variable shrinkage such that symmetry across different equations holds. However, K-K also do this (by setting realtive tightness to 1) but if I understand it correctly they still account for differences in the units of measurement with the above mentioned ratio. I couldn't see if and where in the procedure this is dealt with and I still haven't been able to figure out how to implement this. Thanks a lot for the procedure though - it helps a great deal!

The more I try to find the answer, the more I get the feeling that I am overlooking something very elementary.

Re: Informative Normal-Wishart Litterman Prior

Posted: Thu Nov 01, 2012 5:47 pm
by tclark
It is a question of where scaling is placed. Equation (6) in K-K (1997) gives the prior variance of each coefficient. This prior variance, denoted Sigma, then appears directly in the posterior mean of the VAR coefficient vector given in equations 16a-b. Tom Doan's code for Gibbs sampling under the Normal-Wishart setup uses this. In the case of the Normal-Wishart specification, the prior variance of the coefficient matrix is written (p.104) as Psi kroneker Omega, where Psi corresponds to the variance-covariance matrix of the VAR's innovations. Because this prior uses Psi to include scaling by the variances of each variable, the scaling needs to not be included in Omega. This means that, for use in the Normal-Wishart, under a Minnesota prior without cross-variable shrinkage, Omega needs to be defined to consist of terms analogous to those appearing in equation (6), but all divided by sigma(i)^2 to take out the scaling embedded in the Minnesota prior. The N-W procedure I sent reflects this, defining Omega in this way.

Re: Informative Normal-Wishart Litterman Prior

Posted: Thu Nov 08, 2012 7:04 am
by Andy_T
Thank you very much for pointing this out in such detail. I did indeed miss that Psi contains the variances of the respective equations such that they do not have to appear again in Omega. It all makes sense now and I can see it in the paper and in your code at

comp minnprec((j-1)*lags+l) = univar(j)*float(l)**shrinkage(2)/shrinkage(1)

Also, thanks again for your code and the survey paper!