// // RBC model // var y,c,i,k,n,lb,a,w,r; // Name of the variables varexo ea; // Name of the exogenous variable parameters beta,nu,sigma,chi, // Preferences alpha,delta, // Technology ra,sa,Ass; // Technology Shock beta = 0.99; // Discount factor sigma = 2; // Intertemporal elasticity of subst. nu = 2; // Inverse of labor supply elasticity alpha = 0.35; // capital elasticity delta = 0.025; // depreciation rate ra = 0.95; // Persistence of Technology Shock sa = 0.01; // Std. dev. of Technology Shock Ass= 1; // Steady state of technology // Assisting steady state rs = (1-beta*(1-delta))/beta; ksy = alpha/rs; isy = delta*ksy; csy = 1-isy; ns = 1/3; ys = ksy^(alpha/(1-alpha))*ns; cs = csy*ys; is = isy*ys; ks = ksy*ys; ws = (1-alpha)*ys/ns; lbs = cs^(-sigma); // Although chi is a parameter, it has to be set such that nss=1/3 chi = lbs*ws*ns^(-nu); // Equations of the model model; c^(-sigma)=lb; // Consumption chi*n^(nu)=lb*w; // Labor supply lb=beta*lb(+1)*(r(+1)+(1-delta)); //Euler equation k=i+(1-delta)*k(-1); //capital accumulation y=c+i; //market clearing y=a*(k(-1))^alpha*n^(1-alpha); // Production function w=(1-alpha)*a*y/n; //labor demand r=alpha*a*y/(k(-1)); //capital demand // Choose either the shock in levels or in logs by commenting out the other //a=(1-ra)*Ass+ra*a(-1)+ea; // Supply Shock in levels log(a)=(1-ra)*log(Ass)+ra*log(a(-1))+ea; // Supply Shock in logs end; initval; ea = 0; a = 1; y = ys; c = cs; i = is; k = ks; n = ns; lb = lbs; w = ws; r =rs; end; steady; check; // Declaring the shocks shocks; var ea; stderr sa; end; // Launch solving procedure stoch_simul(order=1,irf=20,hp_filter=1600) y,c,i,k,n,a;