ask for urgent help!!

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.

ask for urgent help!!

Postby mayong1982 » Tue Nov 29, 2011 11:33 am

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.
Attachments
dynare.mod
(2.12 KiB) Downloaded 98 times
mayong1982
 
Posts: 26
Joined: Tue Nov 29, 2011 11:18 am

Re: ask for urgent help!!

Postby jpfeifer » Tue Nov 29, 2011 9:43 pm

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.
------------
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: ask for urgent help!!

Postby mayong1982 » Wed Nov 30, 2011 4:34 am

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.
mayong1982
 
Posts: 26
Joined: Tue Nov 29, 2011 11:18 am

Re: ask for urgent help!!

Postby jpfeifer » Wed Nov 30, 2011 7:31 am

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.
------------
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: ask for urgent help!!

Postby mayong1982 » Wed Nov 30, 2011 10:16 am

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.
mayong1982
 
Posts: 26
Joined: Tue Nov 29, 2011 11:18 am

Re: ask for urgent help!!

Postby mayong1982 » Wed Nov 30, 2011 3:39 pm

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.
Last edited by mayong1982 on Wed Nov 30, 2011 4:10 pm, edited 1 time in total.
mayong1982
 
Posts: 26
Joined: Tue Nov 29, 2011 11:18 am

Re: ask for urgent help!!

Postby mayong1982 » Wed Nov 30, 2011 3:41 pm

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.
mayong1982
 
Posts: 26
Joined: Tue Nov 29, 2011 11:18 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 5 guests