Steady State

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 State

Postby a.bah » Fri Nov 18, 2016 8:37 am

Hi every one,

I have written a basic version of my dynamic model which I hope step by step I can add more detail to it later depending on the question I want to answer. But this basic version has no steady state, how can I solve this problem?
a.bah
 
Posts: 2
Joined: Fri Nov 18, 2016 8:25 am

Re: Steady State

Postby jpfeifer » Fri Nov 18, 2016 9:30 am

What do you mean with
this basic version has no steady state
?

Does the model not possess a steady state or is Dynare not able to find it? In the first case, you need to transform the model to have a steady state. In the latter case, you need to find out what the problem is. Often there is still a mistake in the equations.
------------
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 State

Postby a.bah » Fri Nov 18, 2016 10:42 am

I am not sure that the model has no ss, but I have tried solving ss equations using matlab code but It takes unusual time so I should stop matlab iteration. I should mention that, as I couldn’t solve the model I could not calibrate my model as well. So for insuring that the model has ss I assigned some values, maybe unjustified or ad hoc values, to the parameters and then I wrote the aforementioned matlab code.

1st I don’t khow if there are other standard approach testing uncalibrated models for ss. Would you mind if I ask you helping me?

2nd Supposing that the model has no ss, how can I change the model? I have no idea but some ad hoc changes, is there any systematic approach?
a.bah
 
Posts: 2
Joined: Fri Nov 18, 2016 8:25 am

Re: Steady State

Postby jpfeifer » Sat Nov 19, 2016 10:24 am

1. You simply pick "reasonable" parameters from the literature
2. For trending models, you have to stationarize the model.

In any case, you should try to compute the steady state using pencil and paper. At the current stage it does not seem as if you have the required knowledge about the model for the computer being of much help.
------------
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 State

Postby anifab18 » Fri Apr 21, 2017 11:32 pm

Hi every body
I have a problem when trying to solve the basic DSGE models. The steady state file did not compute steady state and even when I have tryed initialization and dinar solve it did not work

%TP DE MACRO

%DECLARATION DES VARIABLES endogenes DU MODELE

var y I n k a c w r R;

%DECLARATION DES VARIABLES EXOGENES

varexo e;

%DECLARATION DES PARAMETRES DU MODELE

parameters alpha sigma beta rho khi teta delta sigmae;

alpha = 0.33;
sigma = 1;
beta = 0.99;
rho = 0.95;
khi = 0;
teta = 2.95;
delta = 0.02;
sigmae = 0.01;

%DECLARATION DU MODELE

model;

%eq1
exp(c)^(-sigma) = beta*exp(c(+1))^(-sigma)*(alpha*exp(a(+1))*exp(k)^(alpha-1) + (1-delta));

%eq2
exp(y) = exp(a)*exp(k(-1))^(alpha)*n;

%eq3
exp(k) = exp(a)*exp(k(-1))^(alpha)*exp(n) - exp(c) + (1-delta)*exp(k(-1));

%eq4
a = rho*a(-1) + e;

%eq5
exp(y) = exp(c) + exp(I);

%eq6
exp(c)^(-sigma) = beta*exp(c(+1))^(-sigma)*(1+r);

%eq7
exp(R) = alpha*exp(a)*exp(k(-1))^(alpha-1);

%eq8
exp(w) = (1-alpha)*exp(a)*exp(k(-1))^(alpha);

%eq9
teta*exp(n)^(khi) = exp(c)^(-sigma)*(1-alpha)*exp(a)*exp(k(-1))^(alpha);

end;

%INITIALISATION DES VARIABLES D'ETAT STATIONNAIRE

%initval;
%k=log(9.4495);
%y=log(1.0051);
%a=0;
%c=log(0.7689);
%I=log(0.2362);
%n=log(1/3);
%r=0.0101;
%R=log(0.0351);
%w=log(2.0203);

%end;

%DECLARATION DE LA VARIANCE DU CHOC

shocks;

var e = sigmae^2;

end;

%CALCUL DE L'ETAT STATIONNAIRE ET VERIFICATION DES CONDITIONS DE BLANCHARD
%ET KAHN

steady;
check;

%RESOLUTION DU MODELE AVEC FILTRE HP,APPROXIMATION DE TAYLOR D'ORDRE 1 ET
%PRESENTER LES RESULTATS SUR 50 PERIDODES

stoch_simul(hp_filter=1600,order=1,irf=50);

%options_.rplottype=2
%rplot a k y I c r;
Attachments
part1.mod
(1.42 KiB) Downloaded 52 times
part1_steadystate.m
(799 Bytes) Downloaded 53 times
anifab18
 
Posts: 5
Joined: Tue Apr 04, 2017 9:12 pm

Re: Steady State

Postby jpfeifer » Sat Apr 22, 2017 8:29 am

Your steady state equations do not match the entered equations in the mod-file. If you put
Code: Select all
resid;

before
Code: Select all
steady

you will see
Residuals of the static equations:
Equation number 1 : -0.7706
Equation number 2 : -1.403
Equation number 3 : -23.9604
Equation number 4 : 0
Equation number 5 : 0
Equation number 6 : 0
Equation number 7 : -0.65884
Equation number 8 : 1.7129
Equation number 9 : 2.3991

Please make sure the model first runs without the exp()-substitution. In equation 2, there seems to be an exp() missing around the n. At the same time, the n is missing from most other equations (like the wage). That would only be valid if n were 1.
------------
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 State

Postby anifab18 » Sat Apr 22, 2017 8:43 pm

Thanks for your reply
I have made some of the corrections you suggest and I have tried to run the program without the exp(). it's that it solve now for one more equations but I still have eq4 and 6 which = 0.
For the wage equation I solve as w = (1-alpha)*(a)*K^alpha*N^(-alpha) = (1-alpha)*(a)*(K/N)^(alpha) with k = K/N thats why i didn't put n again


Residuals of the static equations:

Equation number 1 : -0.17873
Equation number 2 : 0.080785
Equation number 3 : -0.1887
Equation number 4 : 0
Equation number 5 : 1.6842
Equation number 6 : 0
Equation number 7 : -3.5032
Equation number 8 : 0.77892
Equation number 9 : 10.5431

I have check again the different equation but I still don't find out for the solution

Sorry for some basics mistake I'm new user on dynare
Attachments
part1_steadystate.m
(797 Bytes) Downloaded 50 times
part1.mod
(1.35 KiB) Downloaded 50 times
anifab18
 
Posts: 5
Joined: Tue Apr 04, 2017 9:12 pm

Re: Steady State

Postby jpfeifer » Mon Apr 24, 2017 6:24 am

This is not a Dynare issue, but a modeling problem. Please make sure you correctly entered your equations.
Code: Select all
w = (1-alpha)*(a)*K^alpha*N^(-alpha)

cannot be the proper real wage.
Code: Select all
a

is log TFP with mean 0. It must have an exp(), because that is the model specification unrelated to the question whether you want a log-linear or a linear approximation.

You can of course define capital in intensive form, but then you need to do this consistently. You cannot have k denote aggregate capital in one equation and intensive form capital in another.
------------
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


Return to Dynare help

Who is online

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