Advertisement
Accalio

Macroeconomics

Feb 21st, 2022
1,395
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Octave 1.55 KB | None | 0 0
  1. close all
  2.  
  3. % [1] Declare variables and parameters
  4.  
  5. var u v h s w q theta We Wu J c z m p;
  6. varexo epsilon_s epsilon_p A B epsilon sigma E V;
  7. parameters beta mu alpha rho gamma uss vss hss s_ss wss qss thetass Wess Wuss Jss css zss mss pss;
  8.  
  9.  
  10.  
  11. % [2] Declare variables and parameters
  12.  
  13. beta=0.5;  
  14. alpha=0.5;  
  15. rho=0.988;  
  16. s=0.0591;
  17. u=0.0567;
  18. p=1.00;
  19. z=0.4;
  20. h=0.98;
  21. v=0.06;
  22. w=0.96;
  23. theta=0.98/0.9;
  24. V=0
  25. A=[s(+1); p(+1)];
  26. B=[s; p];
  27. epsilon= [epsilon_s(+1); epsilon_p(+1)];
  28. E=epsilon';
  29. gamma= [0.4877 -0.9690; -0.0097 0.8676];
  30. gamma_11=gamma(1,1)
  31. gamma_12=gamma(1,2)
  32. gamma_22=gamma(2,2)
  33. sigma=epsilon*E;
  34. sigma=[0.0074 -0.0002; -0.0002 0.0001];
  35. uss=1+s_ss/hss;
  36. thetass=hss/qss;
  37. vss=uss*thetass;
  38. mu=mss/(u^(alpha)*v^(1-alpha));
  39. hss= (s_ss(1-u))/u;
  40. Jss= (pss-wss)/(1-(1-s_ss)rho);
  41.  
  42. % [3] Declare model’s
  43. model;
  44. u=u(-1)+s(1-u(-1))-h*u(-1);
  45. theta=v/s;
  46. h=mu*u^(alpha-1)*v^(1-alpha);
  47. q=mu*u^(alpha)*v^(-alpha);
  48. m=mu*u^(alpha)*v^(1-alpha);
  49. We=w+s*rho*Wu(+1)+(1-s)*rho*We(+1);
  50. Wu=z+h*rho*We(+1)+(1-h)*rho*Wu(+1);
  51. J=p-w-s*rho*V(+1)+(1-s)*rho*J(+1);
  52. z=Wu-h*rho*We(+1)-(1-h)*rho*Wu(+1);
  53. c=(w-(1-beta)z-beta*rho)/(beta*theta);
  54. c/q=rho*J(+1);
  55. w=(1-beta)*z+beta*(p+c*theta);
  56. A=gamma*B+epsilon;
  57. s=gamma_11*s(-1)+gamma_12*p(-1)+epsilon_s
  58. p=gamma_12*s(-1)+gamma_22*p(-1)+epsilon_p
  59.  
  60. % [4] Set initial value for steady state
  61.  
  62. u=uss;
  63. v=vss;
  64. h=hss;
  65. s=s_ss;
  66. w=wss;
  67. q=qss;
  68. We=Wess;
  69. Wu=Wuss;
  70. J=Jss;
  71. c=css;
  72. z=zss;
  73. m=mss;
  74.  
  75. % CHECK for residual
  76.  resid(1);
  77.  
  78. % ASK dynare to calculate the steady state
  79. steady;
  80.  
  81. resid(1);
  82. pause
  83.  
  84.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement