Conditional forecasts with paths of different lenght

Hi,

I’m trying to learn how to do conditional forecasts with dynare, so I started with a simple 3-eq model with exogenous government spending g, which follows an AR(1) process.
On top of that, I defined a variable y_obs which is just the y-y(-1).

In file model_fc_1, I define paths for y and g.
In file model_fc_2, I define paths for y_obs and g, which (I think) should be equivalent to model_fc_1.

However, when I plot the forecasts, I get very different paths for g.

To add context, this happens if the paths of y (y_obs) and g have different length. If they have the same length, that doesn’t happen.

Why is that the case?

Many thanks in advance for your help.

model_fc_2.mod (1.5 KB)
execute.m (1.5 KB)
model_fc_1.mod (1.6 KB)

Did you check the manual?

yes, what I don’t understand is why I get different results in case I set the conditioning path on the difference of y instead of the level of y

I would need to see the two files for the comparison.

Thank you. The .mod files I attached in my original message run the two conditional forecasts in question. The .m file calls dynare and then plots the results