Issues with Ramsey Planner Model (Blanchard Kahn with undetected issues in model diagnostics)

I am solving a Ramsey Planner Model.
The private model with simple rules works fine.

For the Ramsey, I take out the rules and obtain the planner’s FOCs. Afterward, I include those equations in the model block in the .mod file.

I use the method outlined in Christiano, Rostagno, Motto (2007) to obtain the Steady State. It works and the errors of static eqs are 0.

Now, I run the model and have the following error message (BK conditions):

There are 58 eigenvalue(s) larger than 1 in modulus 
for 57 forward-looking variable(s)

The rank condition ISN'T verified!

Error using print_info (line 32)
Blanchard & Kahn conditions are not satisfied: no stable equilibrium.
Error in stoch_simul (line 103)
    print_info(info, options_.noprint, options_);
Error in MaPRamseyCoop.driver (line 917)
[info, oo_, options_, M_] = stoch_simul(M_, options_, oo_, var_list_);
Error in dynare (line 293)
evalin('base',[fname '.driver']) ; 

I run model_diagnostics:

>> model_diagnostics(M_,options_,oo_)
MODEL_DIAGNOSTICS:  No obvious problems with this mod-file were detected.

What can I do to fix this model?

I think the problem is that one or more Ramsey Lagrange Multiplier is close to zero (or zero), possibly becoming colinear with another Lagrange multiplier. Is there any way to know what variables are the troublesome ones?

I want to remove one of these Lagrange multipliers from the model (if it’s zero it won’t affect the policy lagrangian after all), however, I don’t know what equation to take out (how to pick which Ramsey FOC to remove?). My intuition is that one constraint is irrelevant and could be removed.

In practical terms, I want to take out one variable (the zero-valued LMult) and one equation. But I don’t how to proceed from here.

Other details: I am solving a Ramsey model associated to a three country model. I cannot use the built in Ramsey command because it won’t allow me to solve non-cooperative policy cases and sometimes the Cooperative one also fails to work.

Thanks in advance for any help,

Camilo

Files attached:
MaPRamseyCoop.mod (25.6 KB)
MaPRamseyCoop_steadystate.m (6.3 KB)
find_ss.m (2.6 KB)
MaPCoord_sseqs.m (7.6 KB)
LMultStaticCoop.m (20.2 KB)

(the last three are files used by the _steadystate file).

Update:

I started to discard zero valued Lagrange Multipliers and attemped to run the models. Then I used model_diagnostics(M_,options_,oo_) to check remaining issues (e.g. identify the eqs. causing problems). In most cases the issue persisted. However, I started obtaining cases where the B-Kahn conditions did hold.

The new problem: The resulting IRFs had a strongly marked Zig-Zag pattern. Not a slightly wavy pattern but some were heavily zig-zagged arond zero, it looked like a 90-degree turned triangle.

Upon running the model diagnostics most of the times there were issues related to the same FOC:
The FOC with respect to one of the policy instruments

0 = -(Hc^(1 - alphha)*Kc(-1)^(alphha - 1)*Lw18*alphha*exp(Ac)*exp(xic)^alphha)/Qc(-1);

This implied the lagrange multiplier Lw18 was zero by construction, and that messed up some of the other equations.

This occurred because the rest of the effect of the instrument in the equations was absent since I was not using the Budget Constraint of that agent due to Walras Law (I was using the MC Condition with respect to the goods market instead).

In principle, using the remaining Budget Constraint or the Market Clearing condition should be analogous choices. Indeed, there was no difference in the private model (no Ramsey) with simple policy rules. This is something I always check just in case.

Then, as an experiment, I stopped using the MC Condition and used the Budget Constraint of the remaining household/country in the Ramsey Planner Model.

The new FOC is no longer troublesome: (does not imply zero valued LagrMult)

0 = -(Hc^(1 - alphha)*Kc(-1)^(alphha - 1)*alphha*exp(Ac)*exp(xic)^alphha*(Lw18 - Kc(-1)*Lw42*Qc(-1)))/Qc(-1);

Now it works:

There are 57 eigenvalue(s) larger than 1 in modulus 
for 57 forward-looking variable(s)

The rank condition is verified.


MODEL SUMMARY

  Number of variables:         108
  Number of stochastic shocks: 6
  Number of state variables:   27
  Number of jumpers:           57
  Number of static variables:  36


MATRIX OF COVARIANCE OF EXOGENOUS SHOCKS
Variables       epsAc     epsAa     epsAb    epsxic    epsxia    epsxib
epsAc        1.000000  0.000000  0.000000  0.000000  0.000000  0.000000
epsAa        0.000000  1.000000  0.000000  0.000000  0.000000  0.000000
epsAb        0.000000  0.000000  0.000000  0.000000  0.000000  0.000000
epsxic       0.000000  0.000000  0.000000  1.000000  0.000000  0.000000
epsxia       0.000000  0.000000  0.000000  0.000000  1.000000  0.000000
epsxib       0.000000  0.000000  0.000000  0.000000  0.000000  0.000000

POLICY AND TRANSITION FUNCTIONS
                                  Yc              Kc              Cc              Ya              Ka              Ca            taua            taub            tauc
Constant                    2.703415       25.646024        2.093913        0.910168        1.300448        0.861833        0.811176        0.811176       -0.140132
Rdc(-1)                            0               0               0               0               0               0               0               0      -25.146608
Bc(-1)                     -0.207904       -0.060338        0.144145       -0.055529       -0.003198        0.047067        2.210682        2.210682       -0.552569
Ba(-1)                     -0.010413       -0.000682        0.007220       -0.051129       -0.006738        0.043337       -0.042909        3.148569       -0.868296
Bb(-1)                     -0.010413       -0.000682        0.007220       -0.017416        0.001237        0.014762        3.148569       -0.042909       -0.868296
Kc(-1)                     -0.066576        0.940745        0.097151       -0.027439        0.002765        0.023257       -0.719581       -0.719581        0.872643
Ka(-1)                      1.041444        0.141913       -0.722060        0.684634        0.837910       -0.166395      -27.931105       46.225006       -7.845034
Kb(-1)                      1.041444        0.141913       -0.722060        0.229732        0.044784       -0.194722       46.225006      -27.931105       -7.845034
Fa(-1)                     -0.179535       -0.076871        0.124476        0.006312        0.002762       -0.005350       -0.677421       -0.817333        2.029112
Fb(-1)                     -0.179535       -0.076871        0.124476       -0.027373       -0.005251        0.023201       -0.817333       -0.677421        2.029112
Dc(-1)                             0               0               0               0               0               0               0               0       -1.122039
Rba(-1)                    -0.186327       -0.079780        0.129185        0.006551        0.002866       -0.005553       -0.703048       -0.848252        2.105874
Rbb(-1)                    -0.186327       -0.079780        0.129185       -0.028408       -0.005450        0.024079       -0.848252       -0.703048        2.105874
Ac(-1)                      1.399737       -0.560616        2.367649       -0.689507        0.016398        0.584429       -6.666538       -6.666538       17.398086
Aa(-1)                      0.436434        0.084680       -0.302590        1.446349       -0.065368        0.148006      -11.671979       22.839959       -5.266753
Ab(-1)                      0.436434        0.084680       -0.302590        0.062360        0.018363       -0.052857       22.839959      -11.671979       -5.266753
xic(-1)                   -11.209515       20.442003        8.883434       -2.542339        0.531045        2.154896      -98.743968      -98.743968       72.509319
xia(-1)                     6.253207       -0.225099       -4.335507        2.291825        0.231273       -1.485038     -153.735987      271.358315      -30.740650
xib(-1)                     6.253207       -0.225099       -4.335507        1.566821        0.134444       -1.328043      271.358315     -153.735987      -30.740650
Ic(-1)                      0.204943        0.995005       -0.142092        0.042326        0.019686       -0.035876       -2.457339       -2.457339       -1.863867
Ia(-1)                      1.535399       -2.426970       -1.064531        0.927411        0.562095       -0.786077      -10.571103       64.349775       24.358062
Ib(-1)                      1.535399       -2.426970       -1.064531        0.703901       -0.273643       -0.596629       64.349775      -10.571103       24.358062
epsAc                       0.011527       -0.004617        0.019498       -0.005678        0.000135        0.004813       -0.054901       -0.054901        0.143278
epsAa                       0.003594        0.000697       -0.002492        0.011911       -0.000538        0.001219       -0.096122        0.188094       -0.043373
epsAb                       0.003594        0.000697       -0.002492        0.000514        0.000151       -0.000435        0.188094       -0.096122       -0.043373
epsxic                     -0.065938        0.120247        0.052255       -0.014955        0.003124        0.012676       -0.580847       -0.580847        0.426525
epsxia                      0.036784       -0.001324       -0.025503        0.013481        0.001360       -0.008736       -0.904329        1.596225       -0.180827
epsxib                      0.036784       -0.001324       -0.025503        0.009217        0.000791       -0.007812        1.596225       -0.904329       -0.180827


THEORETICAL MOMENTS
VARIABLE         MEAN  STD. DEV.   VARIANCE
Yc             2.7034     0.1153     0.0133
Kc            25.6460     1.1447     1.3104
Cc             2.0939     0.1116     0.0124
Ya             0.9102     0.0392     0.0015
Ka             1.3004     0.0633     0.0040
Ca             0.8618     0.0289     0.0008
taua           0.8112     1.6563     2.7432
taub           0.8112     2.1324     4.5473
tauc          -0.1401     0.6519     0.4250

Just as importantly, there is not a Zig-zag pattern in the IRFs anymore.

Best,

Camilo

Sorry for the delay. But I don’t have anything to say beyond the generic “Try working with a simplified version of the model”. Oscillations like you describe are typically a sign of a complex eigenvalue. They are most commonly caused by either a timing error or a problematic parameterization in something like a (fiscal) feedback rule.