Using perfect_foresight with a log-linearized model


The .mod available examples for perfect foresight simulation use the models in the non-linear form.

I wonder if it is possible to run a perfect foresight simulation with a log-linearized model, when the model block is “model(linear)”?


Yes, that is possible. Linearity is just a special case.

Dear Prof Johannes, thank you for the reply.

When the model is log-linearized, the government spending becomes a parameter representing the share of G in output (G/Y), for example.

If it is set to 0.2 (20% of output), how simulate its path to become 10% of GDP? I ask that because in t_1 the G/Y ratio is 0.2, but in t_2 it could be 0.19, but the parameter is fixed at 0.2 in the parameters block.

If there is some .mod example, it would be great.

Best regards

If it’s time varying, it should be a shock. Essentially, you are permanently shockin this ratio. The important question is, however, how you think that that ratio permanently increases? Is there an immediate jump today?

Hello, Prof Pfeifer.

For this model, it is necessary to simulate the transition of a local government debt to a specific target. It is today about 25% of output, and in the next years (around 15 periods), it must decrease every period in a specific way (a law details this).

I used G/Y as an example, however there are many other parameters (which were variables in the non-linear form) that might change when public debt decreases permanently between some periods (it is not a jump, it is a gradual path of decrease).

This public debt will decrease with more taxes or less government spending, or some other way.

But to run the perfect foresight to see this transition, the debt-to-GDP ratio, for example, is fixed in the parameters block.

Thank you for the reply!

But that is wrong in this context. It comes from linearizing around a steady state that is changing. Thus, you are not actually talking about true parameters that are time-invariant.

Okay, I understand that. The desired change in steady-state value is for a parameter in the log-linearized model (which was a variable in the non-linear form), and its value was fixed in the parameters block, but we need it to be time-variant.

So, it is not possible to run perfect foresight simulations in a log-linearized model. Right?

Since the model was log-linearized around a specific steady-state.

That is the reason why the .mod files examples for perfect foresight are in the non-linear form.

Or do we have some alternative for already log-linearized models?

I am not sure I understand the problem. Why would you linearize the model in the first place? It’s just an additional step that seems like unnecessary work.