Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- close all
- % [1] Declare variables and parameters
- var u v h s w q theta We Wu J c z m p;
- varexo epsilon_s epsilon_p A B epsilon sigma E V;
- parameters beta mu alpha rho gamma uss vss hss s_ss wss qss thetass Wess Wuss Jss css zss mss pss;
- % [2] Declare variables and parameters
- beta=0.5;
- alpha=0.5;
- rho=0.988;
- s=0.0591;
- u=0.0567;
- p=1.00;
- z=0.4;
- h=0.98;
- v=0.06;
- w=0.96;
- theta=0.98/0.9;
- V=0
- A=[s(+1); p(+1)];
- B=[s; p];
- epsilon= [epsilon_s(+1); epsilon_p(+1)];
- E=epsilon';
- gamma= [0.4877 -0.9690; -0.0097 0.8676];
- gamma_11=gamma(1,1)
- gamma_12=gamma(1,2)
- gamma_22=gamma(2,2)
- sigma=epsilon*E;
- sigma=[0.0074 -0.0002; -0.0002 0.0001];
- uss=1+s_ss/hss;
- thetass=hss/qss;
- vss=uss*thetass;
- mu=mss/(u^(alpha)*v^(1-alpha));
- hss= (s_ss(1-u))/u;
- Jss= (pss-wss)/(1-(1-s_ss)rho);
- % [3] Declare model’s
- model;
- u=u(-1)+s(1-u(-1))-h*u(-1);
- theta=v/s;
- h=mu*u^(alpha-1)*v^(1-alpha);
- q=mu*u^(alpha)*v^(-alpha);
- m=mu*u^(alpha)*v^(1-alpha);
- We=w+s*rho*Wu(+1)+(1-s)*rho*We(+1);
- Wu=z+h*rho*We(+1)+(1-h)*rho*Wu(+1);
- J=p-w-s*rho*V(+1)+(1-s)*rho*J(+1);
- z=Wu-h*rho*We(+1)-(1-h)*rho*Wu(+1);
- c=(w-(1-beta)z-beta*rho)/(beta*theta);
- c/q=rho*J(+1);
- w=(1-beta)*z+beta*(p+c*theta);
- A=gamma*B+epsilon;
- s=gamma_11*s(-1)+gamma_12*p(-1)+epsilon_s
- p=gamma_12*s(-1)+gamma_22*p(-1)+epsilon_p
- % [4] Set initial value for steady state
- u=uss;
- v=vss;
- h=hss;
- s=s_ss;
- w=wss;
- q=qss;
- We=Wess;
- Wu=Wuss;
- J=Jss;
- c=css;
- z=zss;
- m=mss;
- % CHECK for residual
- resid(1);
- % ASK dynare to calculate the steady state
- steady;
- resid(1);
- pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement