HELP! with simple Money in Utility Function (Sidrauski) code

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.

HELP! with simple Money in Utility Function (Sidrauski) code

Postby sheerkan » Wed Mar 14, 2007 8:59 pm

Dear all

Could anybody please tell me why my code doesn't work? The model is as follows:

model;
(1/b)*((a*c^b+(1-a)*m^b)^((1/b)-1))*(a*b*c^(b-1)) = beta*(1/b)*(((a*(c(+1))^b)+(1-a)*(m(+1))^b)^((1/b)-1))*(a*b*(c(+1))^(b-1))*(alpha*((k)^(alpha-1))+1-delta);
((1-a)/a)*((c/m)^(1-b)) = i;
r = alpha*(k(-1)^(alpha-1))-delta;
i = r + pi;
m=((1+x)/(1+pi(-1)))*m(-1);
c+inv = y;
y = (k(-1)^alpha);
inv= k-(1-delta)*k(-1);
x = exp(g)-1;
g=u;
end;

It is a Sidrauski model without labor, with CES utility function between consumption and money balances, in order to analyse monetary shocks.

It is really weird, with b=2 (the "rho" in CES) the model works fine, but theoretically we require b<1. For any other parameter velue the model won't give something good. An example of the errors is

??? Error using ==> print_info
Blanchard Kahn conditions are not satisfied: no stable equilibrium

Error in ==> stoch_simul at 49
print_info(info);

Error in ==> ra at 133
info=stoch_simul(var_list_);

Error in ==> dynare at 26
evalin('base',fname) ;

for b=.5. For b=1.5 I get

??? Error using ==> reshape
To RESHAPE the number of elements must not change.

Error in ==> th_autocovariances at 158
Gamma_y{1} = reshape(imathp_col(1,:),nvar,nvar);

Error in ==> disp_th_moments at 33
[Gamma_y,ivar] = th_autocovariances(dr,ivar);

Error in ==> stoch_simul at 74
disp_th_moments(dr_,var_list);

Error in ==> ra at 133
info=stoch_simul(var_list_);

Error in ==> dynare at 26
evalin('base',fname) ;



Thanks for helping me out. I am desperate :shock:!!

Jean Paul


ps: code attached
Attachments
ra.mod
(1.83 KiB) Downloaded 214 times
sheerkan
 
Posts: 2
Joined: Wed Mar 14, 2007 8:53 pm

Postby admin » Thu Mar 15, 2007 6:58 am

Most likely it has to do with the timing of money balances in the Euler equation.
Dynare requires that the stocks be expressed at the end of the period. It is therefore m(-1) that enter the utility function.

Best

Michel
admin
 

Still trouble...

Postby sheerkan » Fri Mar 16, 2007 10:45 pm

Hi Michel

Thank you very much for your answer. I modified the timing of the model, but it still doesn't work. At least, for different values of the elasticity of substitution between consumption and money balances, it gives the same error message:

??? Error using ==> steady_
STEADY: convergence problems

Error in ==> steady at 7
steady_;

Error in ==> ra at 127
steady(0);

Error in ==> dynare at 26
evalin('base',fname) ;




The model is

model;
(1/b)*((a*c^b+(1-a)*m(-1)^b)^((1/b)-1))*(a*b*c^(b-1)) = beta*(1/b)*(((a*(c(+1))^b)+(1-a)*(m)^b)^((1/b)-1))*(a*b*(c(+1))^(b-1))*(alpha*((k)^(alpha-1))+1-delta);
((1-a)/(a))*(m(-1)/c)^(b-1) = i;
r = alpha*(k(-1)^(alpha-1))-delta;
i = r + pi;
m=((1+x)/(1+pi(-1)))*m(-1);
c+inv = y;
y = (k(-1)^alpha);
inv= k-(1-delta)*k(-1);
x = exp(g)-1;
g=u;
end;



Do you know what is wrong??? This is really frustrating.

Thanks a lot for your help!

The code is attached.

Best wishes,
Jean Paul
Attachments
ra.mod
(1.84 KiB) Downloaded 261 times
sheerkan
 
Posts: 2
Joined: Wed Mar 14, 2007 8:53 pm

Postby MichelJuillard » Sun Mar 18, 2007 9:08 pm

The guess values for the steady state in initval must be reasonably close ot the solution. It won't work when you use extreme values for the parameters as b=10. You can solve the model for b=-1, then you can work your way towards b=-10.

Set the values of initval to the steady state value that you obtain for b=-1 and try to compute for b=-2 and so on.

Be careful, the Blanchard and Kahn conditions for the unicity of a stable equilibrium won't be satisfied for all values of the parameters

Good luck and remember that frustration is part of research ....

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


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 5 guests