Unstable paths simulation

Hello,

In a deterministic model with saddle-point stability, is there any way to simulate an unstable path with Dynare? I know that such a simulation would be straightforward to implement on my own since it is the simulation of a backward looking system, but once I have coded the model into Dynare for the computation of the saddle path, it would be convenient if I could use an other command to simulate an unstable path, if such a command exists.

As a workaround, I have tried to declare all of my forward looking variables as predetermined ones. It raises the warning that the Blanchard-Kahn conditions are not satisfied, which is true, but I would have expected the Juillard algorithm to work anyway. It is said “Failed to solve perfect foresight model” and the value in output are quite far from the exact unstable path, though not completely absurd. It is logged that maxit is reached so I have tried to increase it, but the results are kept unchanged.

Thanks a lot for your help.

Regards,
Thibaut

What do you mean with simulating an unstable path in a saddle-path stable model?

If I consider for example the investment Tobin’s q theory, I get a simple model with two variables (physical capital K and Tobin’s q)

dK(t) = f(K(t),q(t))
dq(t) = g(K(t),q(t))

Starting from an initial point (K(0), q(0)), one can simulate a path by using the recursive rule

K(i+1) = K(i) + f(K(i),q(i))
q(i+1) = q(i) + g(K(i),q(i))

If the system is saddle-point stable (one Eigen value of the transition matrix being larger than one and the other being smaller than one), this path would most probably not converge, unless the initial point is on the saddle path q=h(K).

This is why it is assumed that q(0) jumps instantaneously to the saddle path value h(K(0)).

Would Dynare let me NOT do this assumption, and simulate the unstable path without this initial jump?

Said differently, by using different initial points, I would obtain the “gradient lines” of the “saddle”.

Sure. If your model is purely backward-looking, you can simulate it forward. The Solow model is an example: https://github.com/JohannesPfeifer/DSGE_mod/tree/master/Solow_model
What you cannot have in your model, obviously, is the equation determining how q jumps in the initial periods to satisfy the saddle path. The problem, of course, is having a good guess for the numerical solver. Because as your model is not stable, there is no steady state/initial condition you could use.

Thank you for your reply.
If I use perfect_foresight_solver as in the solow model you are talking about, my guess is that it will solve simultaneously all the equations for every period using a Newton method. I would then indeed need a first guess, not easy to find since my model is not stable as you said. This is exactly the problem I have, Dynare is probably unable to find a good first guess by itself and the solver fails.
However, this is a very complicated method to solve such a simple problem.
Is there a way to ask Dynare to solve my purely backward-looking model one period after the other?

@stepan-a Do you have an idea?

Update:

The Newton solver failed to solve my unstable and purely backward looking model because of this bug:
https://github.com/DynareTeam/dynare/issues/1602

Once I avoid the use of the predetermined_variables command with model-local variables, the solver converges well.

However, I am still interested to know whether we can ask Dynare to solve a purely backward model in a more straightforward manner, one period after the other.

Thanks a lot!

Thibaut