Blanchard-Kahn, Matlab vs Octave

Hello,

I am trying to run a version of the Gali model with dynare 4.0.4 and octave 3.2.3 under Mac OSX Snow Leopard. I am using the binary package kindly provided by Christophe Cahn.

While the code works fine under Windows with Matlab R2009A, it raises a Blanchard-Kahn condition error under octave/Mac.

It seems that the eigenvalues are not all the same.

From Matlab:

[code]EIGENVALUES:
Modulus Real Imaginary

  1.502e-016      -1.502e-016                0
         0.4              0.4                0
         0.4              0.4                0
         0.4              0.4                0
         0.4              0.4                0
      0.7908           0.7908                0
       1.022             1.02          0.07026
       1.022             1.02         -0.07026[/code]

From octave:

[code]EIGENVALUES:
Modulus Real Imaginary

   2.471e-16        2.471e-16                0
         0.4              0.4                0
         0.4              0.4                0
         0.4              0.4                0
         0.4              0.4                0
      0.7908           0.7908                0
      0.8405           0.8405                0
       1.199            1.199                0[/code]

Does anyone know how I could solve this issue? I would really prefer to use octave if I have the choice. Many thanks!
gali.mod (1.45 KB)

Hi,

In this example, MATLAB is giving the right answer, and Octave a wrong answer.

I found the reason: it is due to the fact that your Dynare installation doesn’t contain the MEX files for Octave. And without them, Octave returns wrong eigenvalues (in future releases, Dynare will fail in that case, to avoid misleading people).

So you can use Dynare 4.0.4 with Octave, but you need to compile MEX files. See: dynare.org/DynareWiki/BuildingDlls

Best,

Hello,

Thanks a million, it works just fine now!

I just followed the instructions to build the DLLs with build_octave.m.

Best,

Hello,
I’m facing the same problem but with new versions of dynare (4.4.3) and Octave (3.8.2): running the same .mod file with Matlab and Octave, the steady state is identical but the eigenvalues are different (and the rank condition holds on matlab but fails on Octave). Would you know how to solve the problem so that Octave gets the right eigennvalues?
Thanks.

I would need to see the mod-file.