# Second order approximation

Dear Dynare Forum,

We have a question regarding second order approximation. How does Dynare make such an approximation? We have written a model in levels and then let Dynare do the second order approximation using the command stoch_simul(order=2,irf=50);

In the model we have a quadratic equation, but for some reason this quadratic equation gives negative IRFs. How is this possible? How can a second order approximation of a quadratic equation be negative?

Attached, you find a simple model in which we highlight our problem. Why does the second order approximation of pi_2, which is a quadratic function, give negative IRFs?

Dynare_forum.mod (250 Bytes)

In your example, the problem is that you are computing simulation-based GIRFs. There you can have numerical inaccuracies.

Dear Prof. Pfeifer, thank you for your reply. Do you think is there anything we can do to overcome this issue?

Besides this simple example, our original problem is that we need to insert price dispersion in our DSGE. According to Woodford (2003), the price dispersion can be written in log linear form as:

d(t)= theta*d(t-1)+(theta/(1-theta))*pi^2

When we do insert this expression in our model, we get a negative IRF, which does not make much sense. Would you have any suggestion about it?

Negative IRF for what exactly? What is it that you are interested in that depends on a second-order property?

Dear Prof. Pfeifer

Thank you for your reply. We are doing welfare analysis for our model under different policy regimes. Our problem is the following:

We define output as:

Y=A*(LU^((phi)*(1-alpha))LF^((1-phi)(1-alpha)))/exp(d);

Where “Y” is the output, “LU” and “LF” are the labour inputs, “alpha”, “phi” and “A” are constants. We divide the output by “(exp(d))” to take into account the price dispersion, in the attempt of obtaining an expression similar to Gali (2015, pg.59), second equation in the page. The expression for the price dispersion (Woodford, 2003; pg.399, eq.2.20) in log linear terms is :

d= theta*d(t1)+(theta/(1-theta))*pi^2