Expectations + Second order


I am puzzled by one result in Dynare and would like your help to understand it.
I would like to plot response of the expectation of a variable, say consumption, to a one time shock (the typical impulse-response graph). I have potentially two ways of doing this. The first is to create a new variable, EC = C(+1) and plot it. The second is to plot the one-period-ahead IRF for consuption.
In a first order approximation both procedures give the same result. In a second order, they are different, but the difference is always constant (I start the IRF at the “stochastic steady state”, defined as the situation where all shocks are shut-down but agents expect them to be non-zero, but this does not matter for the result).
I would like to understand why they are different.

Thank you,

I am attaching a file which reproduces the behavior I describe (the file is and example from Jesus Fernandez-Villaverde, I just tweak some values to make the behavior more salient).

I appreciate if someone can explain why the difference.
Thank you
rbc_sv_low.mod (3.94 KB)

According to your computations, the IRF in t+1 computes the one-period ahead forecast conditional on future shocks equal to zero. EC computes the one-period ahead conditional expectation of C(t+1). This is only identical if the forecast function is linear, not when it is quadratic in shocks.The difference comes from Jensen’s inequality.

Hope it helps