dyn_risky_steadystate_solver

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

dyn_risky_steadystate_solver

Postby ripatti » Thu Oct 03, 2013 11:53 am

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
ripatti
 
Posts: 59
Joined: Mon Jan 16, 2006 6:28 am
Location: Helsinki

Re: dyn_risky_steadystate_solver

Postby jpfeifer » Thu Oct 03, 2013 1:44 pm

There are test-files that run with the curent snapshot at
https://github.com/DynareTeam/dynare/tree/master/tests/risky_ss
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: dyn_risky_steadystate_solver

Postby ripatti » Thu Oct 03, 2013 2:38 pm

Thanks for the link!

I tried the last file with the curren dynare. There is interesting error message by Matlab
Code: Select all
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);
   


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: Select all
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{:});
...

Should I try more distant unstable versions?

Cheers,
Antti
ripatti
 
Posts: 59
Joined: Mon Jan 16, 2006 6:28 am
Location: Helsinki

Re: dyn_risky_steadystate_solver

Postby jpfeifer » Thu Oct 03, 2013 3:01 pm

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.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: dyn_risky_steadystate_solver

Postby ripatti » Thu Oct 03, 2013 5:25 pm

Thanks. Indeed it does work with version 2013-10-02, but not with 4.3.3, that results the following
Code: Select all
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{:});

Thanks again!
Antti
ripatti
 
Posts: 59
Joined: Mon Jan 16, 2006 6:28 am
Location: Helsinki

Re: dyn_risky_steadystate_solver

Postby MichelJuillard » Thu Oct 03, 2013 6:59 pm

Hi Antti,

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

Best

Michel
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am

Re: dyn_risky_steadystate_solver

Postby ripatti » Fri Oct 04, 2013 11:46 am

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: Select all
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, ...
ripatti
 
Posts: 59
Joined: Mon Jan 16, 2006 6:28 am
Location: Helsinki

Re: dyn_risky_steadystate_solver

Postby wrhee » Tue Jan 20, 2015 5:37 am

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
wrhee
 
Posts: 1
Joined: Fri Jan 06, 2006 10:58 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 11 guests