I am new to matlab and dynare, so I wish you can be patient with this.

I am dealing with the two country model by Corsetti and Pesenti (2001), and am trying to simulate the model using dynare. The original paper provides an analytical solution, so I could compare dynare steady state values to the ones of the analytical solution.
The model in brief: two country large open economy with monopolistic supply of labor that induce one period nominal rigidities, as labor set wages one period ahead and cannot adjust immediately to, e.g., monetary shock. Bonds and wages should be predetermined variables and I think I have adjusted the timing to match dynare requirements (following the User Guide).
I try a simple extension of the model. I want to study the effect of international demand for home currency, induced by foreign household demand of home currency demand. I am interested in the shor- and long-run effects.

I will try to summarize the problem in few points:

The rank condition is not verified, so I were only able to use “simul” but not “stoch_simul”

Regarding the original model, the steady states values (of initval and endval) are correct, however, the simulation didn’t capture the short-run since the solver assumes perfect foresight and the workers anticipated the shock and adjusted accordingly.

Regarding the extended model, dynare is giving weird steady state values after home monetary shock, with consumption close to zero, although money should be neutral.

I can’t see where I did wrong.

I attached the MOD files of the original and the extended models, along with the pdf of model setup and equilibrium conditions.

I hope you can help me, and thank you all for your patience.

Hi,
the fact that there are 8 eigenvalues larger than 1 for 5 forward-looking variables suggests a fundamental timing problem. Why are wages predetermined?

The authors introduced nominal rigidities through one/period ahead nominal wage contracts, i.e. wages at time t are predetermined with contracts signed at time t-1.

I followed the UserGuide, in this case wages should be predetermined (t-1) in the labour demand equations, but with time t in the wage setting equation.

If I see it correctly, wages are set based on a predetermined information set. You cannot simply set them as predetermined in this case, but rather should use the

EXPECTATION(-1)

operator to implement first order conditions like the equation (15) in their paper (see the manual)

I have used the operation operator in the wage setting equations in both models:
Expectation(-1)(kappalh) = (phi-1)/phiWhExpectation(-1)((1/ph(ch^(-rho))));

The deterministic simulation gave the expected results, both in the short- and long-run.
The issue is solved regarding what I was trying to do.

However, in both models I get the following:
“There are 8 eigenvalue(s) larger than 1 in modulus
for 7 forward-looking variable(s)
The rank condition ISN’T verified!”

In general, would this be an issue? The results seem correct in terms of dynamics and values.

Thank you very much for your patience and your help!

Yes, this would be an issue. If your linearized model is locally unstable, then a perfect foresight solution most probably will also not be stable. Rather, you will be hiding the underlying problem. There is most probably still something wrong with your implementation (usually the timing). Unfortunately, I currently don’t have the time to look deeper into your particular file.