Blanchard & Kahn conditions are not satisfied: indeterminacy

dear professor:
I’m new in dynare and recently I want to build a model.But when I run the model, it can’t work. The message is " Blanchard & Kahn conditions are not satisfied: indeterminacy." I have tried my best for months to slove the problem, but the result is always the same error. Because of this I am so sad everyday. Any help would be greatly appreciated!

Thank you very much.
dawn

kdx.mod (1.6 KB)

Is your first equation

rhohat(+1)=(1/(1+r))*chat*phat/(chat(+1)*phat(+1));

the stochastic discount factor? If yes, it has the wrong timing. Everything needs to be shifted back one period.

Thanks so much for your reply!!My mod is ready to run!may I ask another question? I recently study a paper;In my understanding, the model of thispaper does not impose an impact, but only sets a higher initial value than the steady state value.The purpose is to study the path to steady state. I do n’t know how to write this typle of model program, or am I misunderstanding.At last ,I must express my gratitude again.
The picture is the part of the paper I intercepted

An example in a perfect foresight context is https://github.com/JohannesPfeifer/DSGE_mod/blob/master/Solow_model/Solow_SS_transition.mod

really appreciate you! following your example, I know how to write the code. I still have a little question:how to let the program run At a particular point in time. For example, the perfect foresight program in this picture is to run from the initial value to the steady state in the 20th period

Without knowing the details of the paper, it is impossible to tell. The picture looks as if they simply plot the steady state for the first 20 periods and then a surprise shock happens. In that case, the actual simulation would start with period 20.

thank you very much! I understand.