Fan Chart (Predictive Density) - Forecast from a State-Space
Posted: Sun Mar 26, 2017 6:05 pm
Hello dear all,
I want to use the state space representation from a DSGE model to get fan charts (predictives densities) using dynare.
In order to do this, I need one state space, like this:
y_t = Z*alpha_t + eps_t, eps_ t ~ N(0,H) observation equation
apha_t+1 = T*alpha_t + R*eta_t, eta_t ~ N(0,Q) state equation
I am using notation from Koopman and Durbin: "Filtering and smoothing of state vector for difuse state space models".
With this representation I will get several paths of forecasts by simulation, and after that I will compute percentiles of simulations to plot fan charts.
Also I am needing alpha_0 which must be the smoothed estimate in end of the sample.
My questions are:
1. How could I retrieve Z, H, T, R and Q?, and How could I check order of variables in y_t and alpha_t? I hope to get in y_t (alpha_t) variables in the same order of declared observed variables (declared endogenous variables) in .mod.
I saw https://github.com/JohannesPfeifer/DSGE_mod/tree/master/FV_et_al_2007. I guess it works when it is needed decomposition in states and shocks, but I need work with observed variables too.
2. How could I retrieve alpha_0 (smoothed estimate of alpha_t in end of the sample)?
3. Is there another ideas to get predictive densities in dynare?
Thanks
Aldo
I want to use the state space representation from a DSGE model to get fan charts (predictives densities) using dynare.
In order to do this, I need one state space, like this:
y_t = Z*alpha_t + eps_t, eps_ t ~ N(0,H) observation equation
apha_t+1 = T*alpha_t + R*eta_t, eta_t ~ N(0,Q) state equation
I am using notation from Koopman and Durbin: "Filtering and smoothing of state vector for difuse state space models".
With this representation I will get several paths of forecasts by simulation, and after that I will compute percentiles of simulations to plot fan charts.
Also I am needing alpha_0 which must be the smoothed estimate in end of the sample.
My questions are:
1. How could I retrieve Z, H, T, R and Q?, and How could I check order of variables in y_t and alpha_t? I hope to get in y_t (alpha_t) variables in the same order of declared observed variables (declared endogenous variables) in .mod.
I saw https://github.com/JohannesPfeifer/DSGE_mod/tree/master/FV_et_al_2007. I guess it works when it is needed decomposition in states and shocks, but I need work with observed variables too.
2. How could I retrieve alpha_0 (smoothed estimate of alpha_t in end of the sample)?
3. Is there another ideas to get predictive densities in dynare?
Thanks
Aldo