Dyn_risky_steadystate_solver

Dear Musketeers,

Dynare library contains file dyn_risky_steadystate_solver.m, ie dynare will be away to calculate the risky steady state (or currently has an undocumented feature). In addition, there is the option options_.risky_steadystate that seems to be boolean. I could not resist temptation in setting this option to 1. It results a crash. I just wonder if somebody from the dev team could post an example how to obtain the risky steady state.

Best,
Antti

There are test-files that run with the curent snapshot at
github.com/DynareTeam/dynare/tree/master/tests/risky_ss

Thanks for the link!

I tried the last file with the curren dynare. There is interesting error message by Matlab

[code]At compilation, “hessian” was determined to be a variable and
this
variable is uninitialized. “hessian” is also a function name
and previous versions of MATLAB would have called the
function.
However, MATLAB 7 forbids the use of the same name in the
same
context as both a function and a variable.

Error in dyn_risky_steadystate_solver>risky_residuals_k_order
(line 513)
resid =
resid1+0.5*(d1(:,dr.i_fwrd_f)*guu(dr.i_fwrd_g,:)+hessian(:,dr.i_fwrd2_f)*kron(gu1,gu1))*vec(M.Sigma_e);
[/code]

It seems that the test files do not work in 1 and 2 Oct 2013 unstable versions. First, I must delete USE_DLL option. Then the resulting error message is the following

[code]Undefined variable dr_np.

Error in dyn_risky_steadystate_solver>risky_residuals_k_order
(line 325)
gu1 = dr_np.ghu(i_fwrd_g,:);

Error in solve1 (line 56)
fvec = feval(func,x,varargin{:});
…[/code]
Should I try more distant unstable versions?

Cheers,
Antti

Seems as if I was wrong and not all of those files run. jerman98_2 for example is working. I am going to ask Michel about the current status.

Thanks. Indeed it does work with version 2013-10-02, but not with 4.3.3, that results the following

[code]Reference to non-existent field ‘ghu’.

Error in dyn_risky_steadystate_solver>risky_residuals (line
245)
gu1 = dr.ghu(dr.i_fwrd_g,:);

Error in csolve (line 62)
f0=feval(FUN,x,varargin{:});
[/code]
Thanks again!
Antti

Hi Antti,

I haven’t be working on it for a while. I will look into it and get back to you.

Best

Michel

Thanks again!

I tried the risky steady state in my own model and I got it run without problems using the **second order **approximation. The third order results the following error message:

[code]Undefined variable dr_np.

Error in dyn_risky_steadystate_solver>risky_residuals_k_order
(line 325)
gu1 = dr_np.ghu(i_fwrd_g,:);

Error in solve1 (line 56)
fvec = feval(func,x,varargin{:});

Error in dyn_risky_steadystate_solver (line 127)
[ys, info] = solve1(func,ys0,1:endo_nbr,1:endo_nbr,0,1,
options.gstep, …[/code]

I have a question about the test codes: *jermann.mod, *jermann-2.mod, *jermann-3.mod files. I tried to run each of them and replicate the results for the deterministic and risky steady state cases reported at page 12 in Juillard’s manuscript “Local approximation of DSGE models around the risky steady state” (Oct. 20, 2011 version). However, I found that I always get the results reported under the column of the deterministic steady state case whether the code includes “options_.risky_steadystate = 1;” or not. Would anybody kindly explain to me how I could get the results reported under the column of the risky steady state?
Another question is whenever I run the code with “model(use_dll);” instead of “model;”, I have the same error message reported below by ripatti. I would also appreciate it if somebody could tell me what the problem is.
Thank you in advance.
wrhee