First order approximation of DSGE and Forecasting

Hi I have a question about the first order approx of the DSGE as outlined in the manual and on forecasting:

y(t) = ys + A*(y(t-1) - ys) + Bu(t) ()

So, in my code i have:

  • ys a 14x1 vector (there are 5 original endog variables + 9 aux vbles created by Dynare, between lags, leads and expressions involving leads). To make it consistent with A and B i have to order ys by DR order.
  • A is a 14 x 8 matrix (rows in DR order, columns are state vbles in DR order)
  • [y(t-1) - ys] is a 14x1 column vector in DR order
  • B is 14x5 matrix (rows in DR order, columns in declaration order of the exogenous variables)

The questions/issues are:

  1. Isn’t eqn (*) nonconformable? Because A is a 14x8 and [y(t-1) - ys] is 14x1. Should i augment the A matrix with zeros as in A = [A zeros(14,6)], using Matlab notation?
  2. If i use the 1st order approximation in eqn (*) with the parameters in A and B evaluated at posterior means, should I get the same forecasts as those in oo_.MeanForecast.Mean? I don’t get exactly the same numbers which makes me think that maybe I’m doing something wrong on 1st order approximation.
  3. How do i get the historical data for the 14 variables (that is the original endogenous variables and the 9 aux variables). Right now, I’m using oo_.SmoothedVariables and add their steady states. This could be another source of discrepancies.

Many thanks in advance!

Mariano

[quote=“mp0112358”]Hi I have a question about the first order approx of the DSGE as outlined in the manual and on forecasting:

y(t) = ys + A*(y(t-1) - ys) + Bu(t) ()

So, in my code i have:

  • ys a 14x1 vector (there are 5 original endog variables + 9 aux vbles created by Dynare, between lags, leads and expressions involving leads). To make it consistent with A and B i have to order ys by DR order.
  • A is a 14 x 8 matrix (rows in DR order, columns are state vbles in DR order)
  • [y(t-1) - ys] is a 14x1 column vector in DR order
  • B is 14x5 matrix (rows in DR order, columns in declaration order of the exogenous variables)

The questions/issues are:

  1. Isn’t eqn (*) nonconformable? Because A is a 14x8 and [y(t-1) - ys] is 14x1. Should i augment the A matrix with zeros as in A = [A zeros(14,6)], using Matlab notation?
    [/quote]

No. You need to extract purely backwards and mixed variables out of the ys vector, and put them in the right order. See the reference manual, section about “stoch_simul”.

I think that oo_.MeanForecast is mean of forecasts drawn from posterior (which is not the same than forecast at mean of the posterior). The discrepancy can also come from the problem mentionned in previous point.

I think you’re doing right here.

Best,