Page 1 of 1

How to obtain parameter steady state values?

PostPosted: Sun Apr 01, 2012 10:25 am
by AndersE88
Hi,

I'm able to estimate the DSGE model, which mod-file I've posted below. I have borrowed the model from a paper and I've got the mod-file and the dataset. My question is: How has the steady state values been obtained of the following parameters: gammac, gammay, QSS, phSS, pfSS, CHSS, CFSS, CH_fSS, CHTSS, GSS, pi_fSS, rSS and ySS?

//----------------------------------------------------//
// Declaration of endogenous and exogenous variables //
//----------------------------------------------------//

var y C CH CF CH_f C_f r rf bf z_y z_u z_r z_b pi pih pif pif_f ph pf w Q N vepsHhat vepsFhat G
dQSA_PCPIJAEI dQSA_PCPIJAEIMP logQUA_QI44 dQSA_YMN QUA_RN3M dAUA_WILMN_PCT_Qr;
varexo xi_u xi_y xi_C_f xi_r xi_rf xi_b xi_pif_f xi_vepsH xi_vepsF xi_G;

//----------------------------------------------------//
// Declaration of parameters //
//----------------------------------------------------//

parameters alpha beta eta h gammac gammay omega_pi omega_y omega_r phi phi_cf1 phi_cf2
phi_ch1 phi_ch2 sigma vepsilon vphi rho_u rho_r rho_rf rho_y rho_b rho_C_f rho_pif_f rho_vepsH rho_vepsF rho_G GSS QSS phSS pfSS CFSS CHSS CHTSS CH_fSS pi_fSS rSS ySS ;

alpha = 0.32; // Degree of openness
beta = 0.993; // Discount factor
sigma = 1; // Intertemporal elastisity of substitution
vphi = 3; //2.5; // Elastisity of labour supply
eta = 1.1; // Elastisity of substitution between domestic and foreign goods
chi = 2;
vepsilon= 6; // Elastisity of substitution between different types of domestic and foreign produced goods
omega_pi = 1.5; // Weight on inflation gap in taylor rule
omega_y = 0.5; // Weight on output gap in taylor rule
omega_r = 0.7; // Degree of interest rate smoothing in taylor rule
phi = 0.0002; // Parameter for risk premium on holding foreign bonds (higher phi = lower premium)
h = 0.75; // Degree of habit formation in consumption
phi_ch1 = 1; // Parameter for price change costs relative to steady state. Domestic produced goods
phi_ch2 = 1; // Parameter for price change costs relative to last period's aggregate inflation. Domestic produced goods
phi_cf1 = 1; // Parameter for price change costs relative to steady state. Foreign produced goods
phi_cf2 = 1; // Parameter for price change costs relative to last period's aggregate inflation. Foreign produced goods

rho_u = 0.5; //\
rho_y = 0.5; //|
rho_b = 0.5;
rho_G = 0.5; //|
rho_r = 0; // Durability of shocks
rho_rf = 0.5; //
rho_vepsH = 0.5; //|
rho_vepsF = 0.5; //|
rho_pif_f = 0.5; //|
rho_C_f = 0.5; ///

//SS values Dynare v.4

gammac = 0.32469; //Import share of consumption
gammay = 0.12001; //Export share of production
QSS = 0.72043;
phSS = 1.0717;
pfSS = 0.86452;
CHSS = 0.51597;
CFSS = 0.30754;
CH_fSS = 0.20674;
CHTSS = 1.7227;
GSS = 1;
pi_fSS = 1;
rSS = 1/beta;
ySS = 1.7227;


//----------------------------------------------------//
// DSGE model specification //
//----------------------------------------------------//


model(linear);

//Demand
C = (1-gammac)*CH+gammac*CF;
CH = C-eta*(ph);
CF = C-eta*(pf);
CH_f = C_f-eta*(ph-Q);

y = (CHSS/CHTSS)*CH+(CH_fSS/CHTSS)*CH_f+(GSS/CHTSS)*G;

y = z_y+N;

//Euler
r = (sigma/(1-h))*C(+1)-((1+h)/(1-h))*sigma*C+(h*sigma/(1-h))*C(-1)+pi(+1)-z_u(+1)+z_u;

//Intratemporal
w = vphi*N+(sigma/(1-h))*C-((sigma*h)/(1-h))*C(-1);

//Producer FOCs
pih =((vepsilon*(vepsilon-1))/(1000*phi_ch1+(1+beta)*1000*phi_ch2))*(w-z_y-ph)
+(1000*phi_ch2/(1000*phi_ch1+(1+beta)*1000*phi_ch2))*pih(-1)
+beta*((1000*phi_ch1+1000*phi_ch2)/(1000*phi_ch1+(1+beta)*1000*phi_ch2))*pih(+1)
-(vepsilon/(1000*phi_ch1+(1+beta)*1000*phi_ch2))*vepsHhat;

pif =((vepsilon*(vepsilon-1))/(1000*phi_cf1+(1+beta)*1000*phi_cf2))*(Q-pf)
+(1000*phi_cf2/(1000*phi_cf1+(1+beta)*1000*phi_cf2))*pif(-1)
+beta*((1000*phi_cf1+1000*phi_cf2)/(1000*phi_cf1+(1+beta)*1000*phi_cf2))*pif(+1)
-(vepsilon/(1000*phi_cf1+(1+beta)*1000*phi_cf2))*vepsFhat;

//UIP
r -rf= Q(+1)-Q+pi(+1)-pif_f(+1)-phi*QSS*bf+z_b;

//Taylor
r = omega_r*r(-1)+((1-omega_r)/rSS)*(omega_pi*pi+omega_y*ySS*(y-y(-1)))+xi_r; //;

//Bonds
beta*QSS*bf-QSS*bf(-1)/pi_fSS = phSS*CH_fSS*(ph+CH_f)-QSS*CFSS*(Q+CF);

//Pi
//pi = (1-alpha)*phSS^(1-eta)*pih+alpha*pfSS^(1-eta)*pif;
pif = pf-pf(-1)+pi;
pih = ph-ph(-1)+pi;

//AR1-processes
G = rho_G*G(-1)+xi_G;
vepsHhat = rho_vepsH*vepsHhat(-1)+xi_vepsH;
vepsFhat = rho_vepsF*vepsFhat(-1)+xi_vepsF;
pif_f = rho_pif_f*pif_f(-1)+xi_pif_f;
C_f = rho_C_f*C_f(-1)+xi_C_f;
rf = rho_rf*rf(-1)+xi_rf;
z_u = rho_u*z_u(-1)-xi_u;
z_y = rho_y*z_y(-1)+xi_y;
z_b = rho_b*z_b(-1)+xi_b;
z_r = rho_r*z_r(-1)+xi_r;


//Observables
dQSA_PCPIJAEI -1= pih;
dQSA_PCPIJAEIMP-1=pif;
logQUA_QI44=Q;
dQSA_YMN=y-y(-1);
QUA_RN3M=r;
dAUA_WILMN_PCT_Qr=w-w(-1);

end;

varobs dQSA_PCPIJAEI dQSA_PCPIJAEIMP logQUA_QI44 dQSA_YMN QUA_RN3M dAUA_WILMN_PCT_Qr; // //

// Compute steady state
steady; //(solve_algo = 0);

// Compute eigenvalues and check Blanchard-Kahn conditions
check;

estimated_params;

rho_y, beta_pdf, 0.5, 0.2;
rho_b, beta_pdf, 0.5, 0.2;
rho_G, beta_pdf, 0.5, 0.2;
rho_vepsH, beta_pdf, 0.5, 0.2;
rho_vepsF, beta_pdf, 0.5, 0.2;

phi_ch1, inv_GAMMA_PDF, 0.15, inf; //
phi_ch2, inv_GAMMA_PDF, 0.075, inf; //
phi_cf1, inv_GAMMA_PDF, 0.15, inf; //
phi_cf2, inv_GAMMA_PDF, 0.075, inf; //

stderr xi_y,INV_GAMMA_PDF,0.02, inf; //1.94,inf;
stderr xi_b,INV_GAMMA_PDF,0.01,inf; //10,inf;
stderr xi_G,INV_GAMMA_PDF,0.012,inf; //11,inf;
stderr xi_r,INV_GAMMA_PDF,.0025,inf; //11,inf;
stderr xi_vepsH,INV_GAMMA_PDF,0.051,inf; //1,inf;
stderr xi_vepsF,INV_GAMMA_PDF,0.051,inf; //1,inf;

end;

estimation(datafile=dataest, prefilter=1, lik_init=1, mh_replic=1500000, mh_jscale=0.5);


Anders

Re: How to obtain parameter steady state values?

PostPosted: Sun Apr 08, 2012 3:32 pm
by AndersE88
Anyone got an idea?

Re: How to obtain parameter steady state values?

PostPosted: Mon Apr 09, 2012 11:53 am
by bkjecn
If the values are coded in as part of the mod file, the author likely solved for the steady state using another program. You will likely need to write a program to solve for the steady state yourself.

Re: How to obtain parameter steady state values?

PostPosted: Tue Apr 10, 2012 11:12 am
by AndersE88
OK. Thank you.

Re: How to obtain parameter steady state values?

PostPosted: Fri Apr 20, 2012 9:28 pm
by boskar
I think that some of this steady state values were taken as given (for example GSS = 1; pi_fSS = 1). As I suppose they mean steady state values of "exogenous" variables, described by stochastic processes. So their steady state values are equal to their expected values. From
G = rho_G*G(-1)+xi_G; C_f = rho_C_f*C_f(-1)+xi_C_f;),
indeed states that GSS = 1, pi_fSS = 1.

Other steady state values you mentioned in the code probably result from ones taken as given. Usually for the steady state derivation one has to make some assumptions (for example exchange rate equal to 1) and decide expected values of exogenous variables (which are used as parameters for initialization of simulation, stochastc simulation, estimation in /dynare/).
Then it is possible to get any other steady state values analitically or numerically. For the second case one can write a few /matlab/ routines. For novices in this field I reccomend web site: http://www.mathworks.com/help/toolbox/o ... solve.html.

Re: How to obtain parameter steady state values?

PostPosted: Sat Apr 21, 2012 6:59 am
by jpfeifer
Apparently, the model was log-linearized by hand as was the steady state. For most models the steady state can be quite easily coputed analytically.

Re: How to obtain parameter steady state values?

PostPosted: Mon Apr 23, 2012 8:28 am
by AndersE88
I agree that some variables are easy to understand why they have a certain value, but not when it comes to the variables: QSS, phSS ,pfSS ,CHSS, CFSS and CH_fSS. It's also clear that ySS = CHTSS since this is a requirement for steady state, but I don't understand yet how I can get that value :(

Re: How to obtain parameter steady state values?

PostPosted: Mon Apr 23, 2012 5:11 pm
by jpfeifer
You can compute the steady state by hand. See for example http://economics.sas.upenn.edu/~jesusfv/benchmark_DSGE.pdf or the appendix to Smets/Wouters (2007).