Page 1 of 1

ask for urgent help!!

PostPosted: Tue Nov 29, 2011 11:33 am
by mayong1982
hello,everyone. i am a new user of dynare and have some questions of how to write a right DSGE model in dynare. the questions are as follows:
1,what equations in the economic model should be written in a dynare code: FOCs, resource constraint, equilibrium conditions? and, should the consumer's budget constraint be written in dynare?
2,i have written a dynare code but it cannot run properly, the information given by dynare is as follows:

SOLVE: maxit has been reached
??? Error using ==> steady_
STEADY: convergence problems

Error in ==> steady at 54
steady_;

Error in ==> macroprudential at 293
steady;

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


i have posted my dynare code in the attachment. will someone help me to find out what's actually wrong? thank you very much.

Re: ask for urgent help!!

PostPosted: Tue Nov 29, 2011 9:43 pm
by jpfeifer
You have to type in all equilibrium conditions, including the budget constraint (which is the FOC w.r.t. to the Lagrange multiplier). However, due to Walras Law, you have to omitt one market clearing condition.
The problem with your model is that your starting values are too far away from the true steady state values to find the steady state. Provide better values in the initval-block.

Re: ask for urgent help!!

PostPosted: Wed Nov 30, 2011 4:34 am
by mayong1982
dear jpfeifer,
thank you very much for your kindly reply and suggestions, and i will try better initial values as you suggested. hope eveything goes fine. i will return and give feedback latter.
B.T.W, as you say, i have to "omitt one market clearing condition", here, suppose that i have in total 20 economic equations(including 3 market clearing conditions and 17 other equilibrium conditions), what you mean is: (1)i can write any 19 equations of the 20 equations in dynare; or (2)i should write all the 17 other equilibrium conditions and any 2 of the 3 market clearing conditions? many thanks.

Re: ask for urgent help!!

PostPosted: Wed Nov 30, 2011 7:31 am
by jpfeifer
I am saying the second. You should have 19 variables and 20 equations. Walras' Law says that if n-1 markets clear, the n-th market also clears. Hence, one of the market clearing conditions is implied by all the others. The same is not true for the other FOCs as they do not imply each other.

Re: ask for urgent help!!

PostPosted: Wed Nov 30, 2011 10:16 am
by mayong1982
jpfeifer wrote:I am saying the second. You should have 19 variables and 20 equations. Walras' Law says that if n-1 markets clear, the n-th market also clears. Hence, one of the market clearing conditions is implied by all the others. The same is not true for the other FOCs as they do not imply each other.


thanks a lot. i will review my model first to see if any modifications needed and try better initial values. i will give the feedback later whatever the result. thanks agian.

Re: ask for urgent help!!

PostPosted: Wed Nov 30, 2011 3:39 pm
by mayong1982
dear friend jpfeifer,
i have another problem when calculate the steady state values.
suppose the comsumer's budget constraint is: P(t)C(t)+T(t)+D(t+1)+B(t+1)=W(t)N(t)+Z(t)+R(t)[D(t)+B(t)],
where, P(t) is the aggregate price in time t, C(t) denotes aggregate consuption, T(t) is the lump sum taxes, D(t) and B(t) are households' deposit and bonds(both will pay a nominal return of R(t) one period later),W(t) and N(t) denote nominal wages and labour hours respectively, Z(t) is the nominal profits from the production sector.
my question is:
when calculate the steady state, whether or not the above condition should be written as: PC+T+D+B=WN+Z+R(D+B)? namely, is the following true: in steady state, D(t+1)=D(t) =D and B(t+1)=B(t)=B??
thank you for your patience and help.

Re: ask for urgent help!!

PostPosted: Wed Nov 30, 2011 3:41 pm
by mayong1982
jpfeifer wrote:I am saying the second. You should have 19 variables and 20 equations. Walras' Law says that if n-1 markets clear, the n-th market also clears. Hence, one of the market clearing conditions is implied by all the others. The same is not true for the other FOCs as they do not imply each other.



dear friend jpfeifer,
i have another problem when calculate the steady state values.
suppose the comsumer's budget constraint is: P(t)C(t)+T(t)+D(t+1)+B(t+1)=W(t)N(t)+Z(t)+R(t)[D(t)+B(t)],
where, P(t) is the aggregate price in time t, C(t) denotes aggregate consuption, T(t) is the lump sum taxes, D(t) and B(t) are households' deposit and bonds(both will pay a nominal return of R(t) one period later),W(t) and N(t) denote nominal wages and labour hours respectively, Z(t) is the nominal profits from the production sector.
my question is:
when calculate the steady state, whether or not the above condition should be written as: PC+T+D+B=WN+Z+R(D+B)? namely, is the following true: in steady state, D(t+1)=D(t) =D and B(t+1)=B(t)=B??
thank you for your patience and help.