Blanchard Kahn conditions are not satisfied in a code with external habit

Hi all,

I created a code for a RBC model with external habit formation (non-linear) and it worked.
Now I am trying to log linearised the model and make a code for it. However, when I run the code I get that the Blanchard Kahn conditions are not satisfied but I don’t really understand why.

If someone could help me I would really appreciate.

Thanks External_hab_lin.mod (1.7 KB)

Why do you want to linearize by hand?

As I am a student, I was just practising the log-linearisation process

Your timing for capital is inconsistent. It’s a mixture of beginning and end of period timing. That cannot work.