Steady states - simple credit cycle model

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.

Steady states - simple credit cycle model

Postby monsoon » Fri Feb 26, 2016 7:29 am

I am trying to run a very basic credit cycle model with 2 households (patient and impatient) and a bank. But for some reason, I am not getting the steady state even for this simple model. The residuals of even the AR processes are not zero. I get the following error

esiduals of the static equations:

Equation number 1 : -0.0033601
Equation number 2 : 0
Equation number 3 : 0.00022747
Equation number 4 : 0
Equation number 5 : 0
Equation number 6 : 0
Equation number 7 : 1.4099e-06
Equation number 8 : 0.33601
Equation number 9 : 2.65e-07
Equation number 10 : -0.14052
Equation number 11 : 0.31532
Equation number 12 : 0.055441
Equation number 13 : -0.041847
Equation number 14 : -0.91972
Equation number 15 : 0
Equation number 16 : 0.00045401
Equation number 17 : -0.0015415
Equation number 18 : 0.00013921
Equation number 19 : 6.4466e-05
Equation number 20 : 0
Equation number 21 : -2.3119e-05
Equation number 22 : -0.0061356
Equation number 23 : 0
Equation number 24 : 0.0026809
Equation number 25 : 0
Equation number 26 : -0.0087771
Equation number 27 : 0
Equation number 28 : 0


Error using print_info (line 74)
Impossible to find the steady state. Either the model doesn't have a steady state, there are an infinity of steady states, or
the guess values are too far from the solution

Error in steady (line 92)
print_info(info,options_.noprint, options_);

Error in fi_simple (line 363)
steady;

Error in dynare (line 180)
evalin('base',fname) ;

>> Attached is the mod file. Any help is greatly appreciated.
Attachments
fi_simple.mod
(5.58 KiB) Downloaded 70 times
monsoon
 
Posts: 35
Joined: Mon Nov 09, 2015 4:47 am

Re: Steady states - simple credit cycle model

Postby federico » Fri Feb 26, 2016 10:20 am

Hi,

I tried to run your mod file and I obtained this

Residuals of the static equations:

Equation number 1 : 0
Equation number 2 : 0
Equation number 3 : 0
Equation number 4 : 0
Equation number 5 : 0
Equation number 6 : 0
Equation number 7 : 0
Equation number 8 : 0
Equation number 9 : 0
Equation number 10 : -0.495
Equation number 11 : 0
Equation number 12 : 0
Equation number 13 : 0
Equation number 14 : 0
Equation number 15 : 0
Equation number 16 : 0
Equation number 17 : 0
Equation number 18 : 0
Equation number 19 : 0
Equation number 20 : 0
Equation number 21 : 0
Equation number 22 : -0.0061489
Equation number 23 : 0
Equation number 24 : 0
Equation number 25 : 0
Equation number 26 : -0.0092173
Equation number 27 : 0
Equation number 28 : 0


It 's seemed that you have problems with equation 10 that is

m_e = 0.33 * (1+z_e/(eta2*z_l));

Maybe the problem is there.

Without having the equations and the complete list of the parameters is hard to tell what is going on beyond the scene.

PS: you have a variable m_h that is fixed equal to 0.33 (eq 7). It's strange, it seems a parameter to me.
federico
 
Posts: 68
Joined: Fri Mar 30, 2012 4:46 pm

Re: Steady states - simple credit cycle model

Postby monsoon » Fri Feb 26, 2016 5:33 pm

Thank you Federico. It is strange but your residuals are different from my residuals. This means that I am not running the mod file properly. Would you please share your file so that I know where I am going wrong.

m_h is the labour supplied by patient households. In the literature (RBC), this is generally fixed at 0.33 (some papers also take the fraction of time endownment devoted to working at 0.2).

Similarly, m_e and n_i are also time devoted by impatient households to working in two different firms (n_i to the goods market, m_e to a banking intermediary) and hence m_e+n_i = 0.33. But these are non-separable as in Iacoviello (1/(1+tau))(n_i^(1+theta)+m_e^(1+theta))^(1+tau)/(1+theta).

Hope this clarifies the idea to some extent. Please do let me know where I am going wrong. Thanks.
monsoon
 
Posts: 35
Joined: Mon Nov 09, 2015 4:47 am

Re: Steady states - simple credit cycle model

Postby jpfeifer » Sat Feb 27, 2016 3:02 pm

Usually labor is only fixed in steady state, not in the dynamic model (and requires adjusting the labor disutility parameter accordingly, something you seem to not do). Different residuals can happen with different Dynare versions. In any case, no steady state was found on both machines. For that reason I would suggest checking the model equations once more for correctness.
------------
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: Steady states - simple credit cycle model

Postby monsoon » Sun Feb 28, 2016 7:59 am

Thank you jpfeifer for pointing out the errors. I corrected my equations. And now all residuals are zero. But it does not compute the steady state. Appended are the results

Equation number 1 : 0
Equation number 2 : 0
Equation number 3 : 0
Equation number 4 : 0
Equation number 5 : 0
Equation number 6 : 0
Equation number 7 : 0
Equation number 8 : 0
Equation number 9 : 0
Equation number 10 : 0
Equation number 11 : 0
Equation number 12 : 0
Equation number 13 : 0
Equation number 14 : 0
Equation number 15 : 0
Equation number 16 : 0
Equation number 17 : 0
Equation number 18 : 0
Equation number 19 : 0
Equation number 20 : 0


Error using print_info (line 78)
The steady state is complex

Error in steady (line 92)
print_info(info,options_.noprint, options_);

Error in fi_simple (line 277)
steady;

Error in dynare (line 180)
evalin('base',fname) ;


How can I correct this? I am attaching the file for your reference.
Attachments
fi_simple.mod
mod file
(4.76 KiB) Downloaded 68 times
monsoon
 
Posts: 35
Joined: Mon Nov 09, 2015 4:47 am

Re: Steady states - simple credit cycle model

Postby federico » Tue Mar 01, 2016 5:13 pm

What is the meaning of the parameter gamma in your model?
federico
 
Posts: 68
Joined: Fri Mar 30, 2012 4:46 pm

Re: Steady states - simple credit cycle model

Postby monsoon » Tue Mar 01, 2016 6:07 pm

It is the share of labor of impatient households in the output of firms producing L.
monsoon
 
Posts: 35
Joined: Mon Nov 09, 2015 4:47 am

Re: Steady states - simple credit cycle model

Postby jpfeifer » Wed Mar 02, 2016 11:07 am

Omitting the small imaginary parts, the steady state is
c_p 0.00900836
c_i 9.99928e-06
R_d 1.001
R_b 0.99552
pi 1
n_i 3.33309e-06
m_e -0.000744074
d 8.99935
b 8.99935
w_f 3
w_b -0.0403157
q_h 11.1988
h 1
L 2.99978
y 9.99928e-06
z_e 3
z_l 3
z_b 3
eps_z 3
eps_l 3

Do these values make sense?
------------
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: Steady states - simple credit cycle model

Postby monsoon » Wed Mar 02, 2016 11:49 pm

fi_simple_3.mod
(4.81 KiB) Downloaded 66 times
I am getting the following values for my steady state

STEADY-STATE RESULTS:

c_p 7.53441
c_i 166.305
R_d 1.01016
R_b 1.00463
pi 1.00915
n_i 55.4351
m_e 9.11881
d 11820
b 11820
w_f 3
w_b 54.7128
q_h 14843.4
h 1
L 249.458
y 166.305
z_e 3
z_l 3
z_b 3
eps_z 3
eps_l 3

And it makes sense. But its not producing the impulse response. The error I am getting is

'One of the eigenvalues is close to 0/0 (the absolute value of numerator and denominator is smaller than 1e-06!
If you believe that the model has a unique solution you can try to reduce the value of qz_zero_threshold.'


I adjusted the qz_zero threshold but it did not yield results.
monsoon
 
Posts: 35
Joined: Mon Nov 09, 2015 4:47 am

Re: Steady states - simple credit cycle model

Postby monsoon » Fri Mar 04, 2016 6:13 am

Attached is a sticky price version of the same model. Wondering why c_p is zero while all the determinants of c_p (w_d and m_h) are non-zero. Also there is a problem with equation 25 which I could not figure out. All initial values are in place except for c_p. Any ideas would be helpful. Following are the results.

An infinite element was encountered when trying to solve equation(s) 25
with respect to the variable(s): x2.
The values of the endogenous variables when the problem was encountered were:
c_i 3
r_d 0.001001
r_b 0.04221
R_d_hat 0.02168
R_b_hat 0.02013
r_d_hat 0.0163
pi 1
n 1
m_h 0.1125
c_p 0
d 1.006
b 1.006
w_f 2.5
w_d 3.363
q_h 1.311
h 1
y 3
z_e 3
z_d 3
z_b 3
eps_z 3
eps_l 3
eps_d 4.03
eps_b 5.261
eps_y 6
x1 1.33
x2 1.235
t_p 0.1667
x 1.2

Error using lnsrch1 (line 71)
Some element of Newton direction isn't finite. Jacobian maybe singular or there is a problem with initial values

Error in solve1 (line 107)
[x,f,fvec,check]=lnsrch1(xold,fold,g,p,stpmax,func,j1,j2,varargin{:});
Attachments
sticky_fi.mod
(6.71 KiB) Downloaded 61 times
monsoon
 
Posts: 35
Joined: Mon Nov 09, 2015 4:47 am

Re: Steady states - simple credit cycle model

Postby jpfeifer » Fri Mar 04, 2016 2:45 pm

Regarding the first model, there is something strange. Steady state values like
Code: Select all
q_h 14843.4

do usually not make much sense. Given their size, they can lead to numerical problems. Please check your model equations again if there is a mistake somewhere.
------------
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: Steady states - simple credit cycle model

Postby monsoon » Mon Mar 07, 2016 8:08 am

The issue is I havent expressed my model in logs. In that case q_h being an asset price might be providing relatively higher values than other variables. But I will keep your observation about numerical issues arising from such large values in mind. I will express it in logs and see.
monsoon
 
Posts: 35
Joined: Mon Nov 09, 2015 4:47 am

Re: Steady states - simple credit cycle model

Postby monsoon » Sat Mar 12, 2016 8:06 am

I tried this again and now meaningful steady states are being generated but there seems to be another problem

"One of the eigenvalues is close to 0/0 (the absolute value of numerator and denominator is smaller than 1e-06!
If you believe that the model has a unique solution you can try to reduce the value of qz_zero_threshold."

There is no time convention issue here. I checked the equations. Can anyone point out the problem.

Attached is the mod file ( this is different from the first file i posted)

The steady state results are
STEADY-STATE RESULTS:

c_p 0.5
n_p 1
d 0.41
w_p 0.5
t_p -0.00840827
w_i 0.5
c_i 0.5
n_i 1
b 0.32
t_i 0.00761899
q_h 1.39286
h 1
r_d 0.020508
r_b 0.0238093
R_b 0.0194265
K 0.0288
pie 1
y 1
r_ib 0.0194265
eps_l_p 1
eps_d 0.82
eps_l_i 1
eps_b 0.899542
z_e 1
elas_d -18.9639
elas_b 5.43246
Attachments
utility_fi.mod
(3.35 KiB) Downloaded 63 times
monsoon
 
Posts: 35
Joined: Mon Nov 09, 2015 4:47 am

Re: Steady states - simple credit cycle model

Postby jpfeifer » Sun Mar 13, 2016 12:05 pm

Are you sure you uploaded the most recent version. In my version, b=0 so that q_h=0, which is inadmissible.
------------
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: Steady states - simple credit cycle model

Postby monsoon » Tue Mar 15, 2016 2:24 am

@jpfeifer I corrected the issue. There was a collinearity problem. The problem was solved when I ommitted the n_p=1 equation. Is that the right thing to do? Impulse responses are generated but are kinked at many places. Attached is the file for your comments. Also how do i get the impact of monetary policy shocks (zi) as you can see the impulse responses are not generated for zi.
Attachments
utility_3.mod
(6.34 KiB) Downloaded 63 times
monsoon
 
Posts: 35
Joined: Mon Nov 09, 2015 4:47 am

Next

Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 11 guests