Advertisement
Accalio

Macroeconomics

Feb 21st, 2022
1,687
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Octave 1.94 KB | None | 0 0
  1. close all
  2.  
  3. % [1] Declare variables and parameters
  4. var m v u theta J W U f q w n y z;
  5. varexo ez;
  6. parameters beta chi alpha c s phi b rhoz sigmaz mss vss
  7. uss thetass Jss Wss Uss fss qss wss nss yss zss;
  8.  
  9. % [2] Declare variables and parameters
  10. beta=0.99;  % quarterly rate to get a 4% annual real interest rate
  11. alpha=0.5;  % Hosios condition
  12. phi=0.5;    % Hosios condition
  13. uss=0.08;   % Target unemployment rate of 8% on average from data
  14. s=0.04;     % Target observed separation rate from data
  15. sigmaz=0.007; % standard values for AR(1) process in the RBC litterature
  16. rhoz=0.9;   % standard values for AR(1) process in the RBC litterature
  17. nss=1-uss;  % by definition from equation 11
  18. fss=nss*s/uss; %job finding rate obtain from steady state equation 10
  19. qss=0.9;    % fixed from Andolfatto paper (1996);
  20. thetass=fss/qss; % tightness obtained from f/q
  21. vss=thetass*uss; % vacancies obtained theta=v/u
  22. zss=0;
  23. yss=1;
  24. b=0.5;        %  b fixé
  25. c=beta*(yss-(1-phi)*yss-phi*b)/(1/qss+beta*(1-phi)*thetass-beta*(1-s)*1/qss);
  26. wss=(1-phi)*(yss+c*thetass)+phi*b; % Equation 9;
  27. mss=fss*uss;
  28. chi=mss/(uss^alpha*vss^(1-alpha));
  29. Jss=(yss-wss)/(1-beta*(1-s));
  30.  
  31.  
  32. % [3] Declare model’s equations
  33. model;
  34. m=chi*u^alpha*v^(1-alpha); % 1
  35. f=m/u; % 2
  36. q=m/v;% 3
  37. theta=v/u;% 4
  38. U=b+beta*(f*W(+1)+(1-f)*U(+1)); % 5
  39. W=w+beta*(s*U(+1)+(1-s)*W(+1));% 6
  40. J=y-w+beta*(1-s)*J(+1);% 7
  41. c/q=beta*J(+1);% 8
  42. w=(1-phi)*(y+c*theta)+phi*b;% 9
  43. u=u(-1)+n(-1)*s-f(-1)*u(-1);% 10
  44. n=1-u; % 11
  45. y=exp(z);% 12
  46. z=rhoz*z(-1)+ez;% 13
  47. end;
  48.  
  49.  
  50. % [4] Set initial value for steady state
  51. initval;
  52. m=mss;
  53. v=vss;
  54. u=uss;
  55. theta=thetass;
  56. J=Jss;
  57. W=1;
  58. U=1;
  59. f=fss;
  60. q=qss;
  61. w=wss;
  62. n=nss;
  63. y=yss;
  64. z=zss;
  65. end;
  66.  
  67.  
  68. % CHECK for residual
  69.  resid(1);
  70.  
  71. % ASK dynare to calculate the steady state
  72. steady;
  73.  
  74. resid(1);
  75. pause
  76.  
  77. % [6] Declare shock variance
  78. shocks;
  79. var ez; stderr sigmaz;
  80. % var ex; stderr 0.04;
  81. end;
  82.  
  83.  
  84. % [7] Simulation command
  85. stoch_simul(irf=30, periods=2000) u;
  86.  
  87.  
  88.  
  89.  
  90.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement