Open economy steady state

Dear prof jpfeifer,
I’m trying to solve the basic open economy with investment from Carlos veg book. I want to implement a for periods productivity shock in the 2 different case : current account initially worsen and next current account initially improve.
I wrote a code as I understood it but it seems that Dynare have some double finding and computing a steady state because the blanchard-khan conditions are not satisfied. Any idea of the problem?
I also have some trouble in implementing the periods for temporary shock with your working code on USG (2003) dynare don’t find any autocorrelation.
Thanks

exo2.mod (2.7 KB)

Recheck all equations. If equation 1 is correct, then the timing of r in equation 4 is wrong. Equation 6 seems to be missing brackets around (1-alpha)