Rank condition in nk model

Hi all!
I met a problem for ‘rank condition’ when I ran my code.
The question is that when I use ‘pit=Pt/Pt(-1)’ to define the inflation rate, the rank condition isn’t verified! I tried to revise my code and I used ‘pit(+1)=Pt(+1)/Pt’ to define the inflation rate, the rank condition is verified but it could not find a linear solution.

I believe there are mistakes in my dynare code but I can not find them. Thanks for your help!
The mod file is attached.
TransPath_Benchmark_debt.mod (6.6 KB)

You did not provide ParaSet.mat. That being said, what you describe indicates that there is still a fundamental timing error that you “fix” by shifting the timing of an unrelated variable.

ParaSet.mat (1.4 KB)
TransPath_Benchmark_debt.mod (6.5 KB)

Thank you very much, Mr. Jpfeifer.
I fixed a timing error but the rank condition was still not verified. Are there some tools that helps me find the timing error or are there some common mistakes that I can check whether they appear in my code.

Now the SteadyState0.mat is missing. But usually it’s about the timing of state variables, which is more complicated in your model, because you seem to do explicit detrending.

SteadyState0.mat (2.0 KB)
Here’s the steady state file.
Thanks for your help. I will check the state variables thoroughly one more time.

I am still getting an error message that P0 is missing.

I’m sorry I left that variable out. Here is the complete one. Thanks for your nice help.
SteadyState0.mat (2.3 KB)

The external functions are also missing.

Phi_2.m (395 Bytes)
G.m (147 Bytes)
Here are the external functions.

Your model is explosive. Are you sure that debt cannot explode?

Hi, Mr Jpfeifer. The bond supply is determined by the flow budget constraint of government and the bond demand is an interior solution in household’s maximization problem. I have no idea how to make sure that the bond cannot explode, but as far as I could judge, the debt cannot explode.

Have a look at Money growth rule cause rank condition problem