// How to use it? // // First you need to install dynare. Go to dynare.org, download the newest // stable version of dynare and install it on the computer. // // Open Matlab. Write "addpath c:\dynare" (the path where you installed dynare) // // Go to the folder with the current file and write "dynare NKM". This file // should then run if you do one of the things listed below. // // Simulate with Taylor-rule: Uncomment line 34 and 46 and run. // Simulate with discretionary optimal policy: uncomment line 49, 52, and 53 // Simulate with optimal policy under commitment: uncomment line 49 and 56 var y inflation r g u; varexo y_ inf_; parameters beta sigma kappa lambda phipi phiy gamma_y_ gamma_inf_ rhou rhog; kappa = 0.18; beta = 0.99; sigma = 1; phipi = 1.5; phiy = 0.5/4; lambda = 0.5; rhou = 0.5; rhog = 0.5; model(linear); y = y(+1)-1/sigma *(r - inflation(+1)) + g; inflation = beta*inflation(+1) + kappa*y + u; u = rhou*u(-1) + inf_; g = rhog*g(-1) + y_; //r = phipi*inflation + phiy*y; end; shocks; var y_; stderr 0.1; var inf_; stderr 0.1; end; // Taylor rule //stoch_simul; // Optimal Policy //planner_objective inflation^2 + lambda*y^2; // 1. Discretion //steady; //discretionary_policy(instruments=(r)); // 2. Commitment //ramsey_policy(planner_discount=beta);