Dear all,
I am very new to Dynare and I would like to do an out-of-sample forecast with the help of the program. I estimated a small DSGE with Bayesian techniques. Afterwards, I would like to insert the estimated values into the state space and make a simple prediction by iterating the state space for the specific time horizon. Unfortunately, the manual was unable to solve my lack of theoretical knowledge.

I do not quite understand how the forecasts are done in Dynare, i.e. what kind of formulas are used to compute the mean and point forecasts. Furthermore, what is the exact difference between those two methods? As far as I know, incorporates the point forecast the uncertainty of the shocks, but how exactly is this derived theoretically? Lastly, for the prediction I would not like to sample from the predictive distribution but just insert the posterior mean of the estimation and then iterating the state space. Is there a simple way to do this?

After a Bayesian estimation we do not use any formula to compute the forecasts, but rely on Monte Carlo simulations. In both cases, the initial condition of the forecast is provided by the Kalman smoother. In the case of the Point forecast we draw vectors of parameters in the posterior distribution. For each vector we compute the the initial condition (with the smoother) and from that point simulate the model adding Gaussian innovations for the exogenous variables during the forecasted periods. We obtain a posterior empirical distribution of the forecasts, and we can then compute various posterior moments (mean, deciles, â€¦). The Mean forecast follows the same approach except that future innovations are set to zero (ie we do not draw future innovations in a normal distribution). The posterior distributions of the Mean forecast do not account for the uncertainty coming from the shocks.

Dynare does exactly that, but the issue is uncertainty about parameters. For every given parameter vector, Dynare will iterate on the state space solution model. But in Bayesian estimation, there is uncertainty about parameters. So Dynare draws parameters from the posterior distribution and iterates on the state space (with or without shocks depending on the object your are looking at) for every draw. Finally, the mean is taken over the draws. This is different than frequentist econometrics where you would take the mean parameter vector and then iterate on the state space for the single mean parameter vector.

In the classical approach you would also iterate on the state space equation to recover the forecast uncertainty related to the future innovations (iterating on the covariance matrix of the innovations). The relative advantage of the Bayesian approach is that it is far easier to take into account the uncertainty related to the inference (ie the posterior distribution of the parameters) especially if the model is non linear with respect to the parameters (in the linear case I guess it is possible to derive classical confidence bands relying on asymptotic approximations, but I am not aware of such results in the non linear case and I suppose that a classical approach would also rely on Monte Carlo).

Hi, Since you do not provide an initial condition (with histval or initval) the endogenous variables are initialized at the steady state (zero in your model) and in the future these variables are supposed to converge to the steady state. Also, because the your model is linear the shocks are averaging out. So there is no reason to move, and it is not surprising if you observe a flat zero line for your forecasts.

You can call it after estimation with the respective parameter set and it will automatically use the end of sample smoothed states as the initial condition for forecasting.