# The rank condition ISN'T verified, how to fix it?

Hi everyone! I have a new problem with my code, the error it gives me is: “There are 8 eigenvalue(s) larger than 1 in modulus, for 5 forward-looking variable(s), The rank condition ISN’T verified!”. In this case I added the last five equations, in correct code, following the attached file, but I don’t understand the reason for these errors. Can any of you help me?

energycost.mod (4.0 KB)
Ghazouani2020.pdf (503.2 KB)
scand.pdf (2.3 MB)

Typically, it’s a timing issue. For example, why did you comment out the required

``````predetermined_variables k;
``````

?

Dear professor,
I tried to do some tests, but it didn’t help. It must have been an oversight to leave it as a comment. I tried to change it, but it doesn’t work the same, do you have any suggestions I can apply?
Thank you!

But does the model run without your modifications? You need to proceed step by step.

sure, without the last five equations added and with the “predetermined variables k” command, the code works. Then I added these equations to follow the paper which should be all five connected but no longer works.

Where does

``````S(+1)=S-if+i-phif*Yss*If(+1)+phif*Yss*If;
``````

come from?

it is the log-linearized equation number 17 of the frist paper, it represents the evolution of foreign bonds. Do you think it is wrong? thank a lot for the help!

But isn’t that just simply the UIP condition of this economy? Where then does

``````i-if=S(+1)-S;
``````

come from?

dear professor, you are right, they are two redundant equations, in fact by modifying the phif parameter I obtain the same equation. I added this equation for S, the exchange rate, otherwise the number of variables added and the number of equations didn’t add up. Can you suggest another way to specify the exchange rate?
I thank you, above all for dedicating your time to me.

The UIP condition should determine the exchange rate expectation. You need to find out which equation you are missing.