How to compute the decision rule matrix oo_.dr.ghx of a deterministic model?

Hello,

I am trying to get the decision rule matrix oo_.dr.ghx

If I understand well, it is computed by running the command stoch_simul, but I get the following error:

error: tril: requested diagonal out of range

Below is a trivial code example. I must be missing something obvious.

Thanks a lot for your help!

Best,
Thibaut

var K q;

parameters
a b delta r alpha dt
K_inf q_inf;

a=1;
b=1;
delta = 0.023;
alpha = 0.33;
r = 0.01;
dt=1;
q_inf = 1+(1+a)*b*delta^a;
K_inf = (((r+delta)*q_inf-a*b*delta^(a+1))/alpha)^(1/(alpha-1));

model;
# I = K(-1)*((q-1)/((1+a)*b))^(1/a);
# w = alpha*K(-1)^(alpha-1)+a*b*(I/K(-1))^(a+1);
K = K(-1) + (I-delta*K(-1))*dt;
q(+1) = q + (r+delta)*q*dt - w*dt;
end;

steady_state_model;
K = K_inf;
q = q_inf;
end;

initval;
K = 20;
q = q_inf;
end;

endval;
K = K_inf;
q = q_inf;
end;

check;

stoch_simul(noprint, order=1);

It seems actually that stoch_simul needs some stochastic exogenous variables to be defined.
How could I then compute the decision rule matrix oo_.dr.ghx with a deterministic model?
Thx!
Thibaut

Thanks for reporting this. Simply add an unused exogenous variable

varexo junk;

and use the nostrict option at command line.

1 Like