Trends not compatible with growth path error

This issue came up under a different topic, but it’s really a separate issue, so I started a new topic. I am getting the error “trends not compatible with balanced growth path; the second-order cross partial of equation 22 (line 73) w.r.t. trend variable Bu and endogenous variable Omegauprime is not null (abs. value = 0.520612)…” I had written:

In the attached file, the model solves fine with gamu = 0.01 (line 33). If I change it to gamu=0.011, for example, I get that error. I’ve also gotten that error from changing initial values (even to those I think are closer to the steady state). gamu is the growth rate parameter of one of the two stochastic trends in the model.

You suggested

Your growth factor specification

  gu=exp(gamu+w);
  gd=exp(gamd+u);

is incorrect. It must be

  gu=1+gamu+w;
  gd=1+gamd+u;

I tried that (in the attached file) but still get the same error. It works for gamu=0.01, but gamu=0.011 triggers the error.
investmentGE_Oct2021_hfac_UR_ML1.mod (4.2 KB)

Are you sure that

  Omegauprime=kappa*(iu/(iu(-1)*(1+gamu))-1)*(iu(-1)*(1+gamu));

is correct? You are multiplying with a term at the end that is trending, so Omegauprime should have a trend as well.

You’re right! That was a coding error on my part. Not sure why it was only flagged for certain values of the parameter, but thanks for catching it, and sorry to take your time for that.

The reason is that the check for a BGP needs to be conducted with some numerical tolerance.