// Linearized // 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 csy, isy, // Auxiliary ste 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(linear); // note here that the option for the model specification changes -sigma*c=lb; // Consumption nu*n=lb+w; // Labor supply lb=lb(+1)+r(+1)*(1-beta*(1-delta)); //Euler equation k=delta*i+(1-delta)*k(-1); //capital accumulation y=csy*c+isy*i; //market clearing y=a+alpha*k(-1)+(1-alpha)*n; // Production function w=a+y-n; //labor demand r=a+y-k(-1); //capital demand a=(1-ra)*log(Ass)+ra*a(-1)+ea; // Supply Shock in levels end; initval; ea = 0; a = log(Ass); y = log(ys); c = log(cs); i = log(is); k = log(ks); n = log(ns); lb = log(lbs); w = log(ws); r = log(rs); end; steady; check; // Declaring the shocks shocks; var ea; stderr sa; end; // Launch solving procedure stoch_simul(irf=20,hp_filter=1600) y,c,i,k,n,a;