Monetary policy and the drifting natural rate of interes: 
                 Replication codes 

Equipment
-----------------------------------------------------
1. Windows machine, Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz 2.59 GHz processor, 
with 6 physical cores, and 16 GB of RAM.
2. Additional free disk storage space: max 50 GB 
3. Matlab R2019a (older versions may be sufficient though) and parallel computing 
toolbox
4. CompEcon Toolbox: the folder should be stored in 'C:\Program Files' and named 
'CEtools'. The toolbox is available here: https://pfackler.wordpress.ncsu.edu/compecon/154-2/


1. Folder Optimal_policy
------------------------

1.1. Baseline
-------
'Baseline' refers to an economy in which the TFP (trend) growth rate is constant and equal to psi. 

- Outputs (to be produced):

  1) ocbaseline_grid_uniform_50x50x50_cy_0pt73_rn_0pt5_beta_0pt9982_psi_0pt5_vola_0pt294.mat          --> solution, simulated data, simulation moments for psi (and thus rbar)=0.5%
  2) ocbaseline_grid_uniform_50x50x50_cy_0pt73_rn_0pt_beta_0pt9982_psi_0pt_vola_0pt294.mat            --> solution, simulated data, simulation moments for psi (and thus rbar)=0%
  3) ocbaseline_grid_uniform_50x50x50_cy_0pt73_rn_1pt5_beta_0pt9982_psi_1pt5_vola_0pt294.mat          --> solution, simulated data, simulation moments for psi (and thus rbar)=1.5%
  4) ocbaseline_grid_uniform_50x50x50_cy_0pt73_rn_1pt_beta_0pt9982_psi_1pt_vola_0pt294.mat            --> solution, simulated data, simulation moments for psi (and thus rbar)=1% 
  5) ocbaseline_grid_uniform_50x50x50_cy_0pt73_rn_2pt_beta_0pt9982_psi_2pt_vola_0pt294.mat            --> solution, simulated data, simulation moments for psi (and thus rbar)=2% 
  6) ocbaseline_grid_uniform_50x50x50_cy_0pt73_rn_3pt5_beta_0pt9982_psi_3pt5_vola_0pt294.mat          --> solution, simulated data, simulation moments for psi (and thus rbar)=3.5%
  7) ocbaseline_grid_uniform_50x50x50_cy_0pt_rn_3pt5_beta_0pt9913_psi_0pt_vola_0pt294                 --> solution, simulated data, simulation moments for psi to Adam and Billi 2006


1.2. Drifting_Rbar
-------
'Drifting_Rbar' refers to an economy in which the TFP (trend) growth rate has a stochastic trend

- Outputs (to be produced):

  1) LFPWBrestrictedsupport_uniform_Legendre_40x40x40x40_cy_0pt73_rn_1pt5_beta_0pt9982_xilb_0pt_xiub_3pt.mat
        --> solution, simulated data, simulation moments, IRFs, welfare indicators



2. Folder Price_level_targeting
-------------------------------

1.1. Drifting_Rbar
-----------

- Outputs (to be produced):

  1) LFPWB_plt_grid_uniform_50x50x50_cy_0pt73_rn_1pt5_beta_0pt9982_xilb_0pt_xiub_3pt_pistar_0pt.mat       --> solution, simulated data, simulation moments, IRFs, welfare indicators for pi*=0%
  2) LFPWB_plt_grid_uniform_50x50x50_cy_0pt73_rn_1pt5_beta_0pt9982_xilb_0pt_xiub_3pt_pistar_0pt025.mat    --> solution, simulated data, simulation moments, welfare indicators for pi*=2.5 bps
  3) LFPWB_plt_grid_uniform_50x50x50_cy_0pt73_rn_1pt5_beta_0pt9982_xilb_0pt_xiub_3pt_pistar_0pt05.mat     --> solution, simulated data, simulation moments, welfare indicators pi*=5 bps
  4) LFPWB_plt_grid_uniform_50x50x50_cy_0pt73_rn_1pt5_beta_0pt9982_xilb_0pt_xiub_3pt_pistar_0pt075.mat    --> solution, simulated data, simulation moments, welfare indicators for pi*=7.5 bps
  5) LFPWB_plt_grid_uniform_50x50x50_cy_0pt73_rn_1pt5_beta_0pt9982_xilb_0pt_xiub_3pt_pistar_0pt1.mat      --> solution, simulated data, simulation moments, IRFs, welfare indicators for pi*=10 bps
  6) LFPWB_plt_grid_uniform_50x50x50_cy_0pt73_rn_1pt5_beta_0pt9982_xilb_0pt_xiub_3pt_pistar_0pt125.mat    --> solution, simulated data, simulation moments, welfare indicators for pi*=12.5 bps
  7) LFPWB_plt_grid_uniform_50x50x50_cy_0pt73_rn_1pt5_beta_0pt9982_xilb_0pt_xiub_3pt_pistar_0pt15.mat     --> solution, simulated data, simulation moments, welfare indicators for pi*=15 bps
  8) LFPWB_plt_grid_uniform_50x50x50_cy_0pt73_rn_1pt5_beta_0pt9982_xilb_0pt_xiub_3pt_pistar_0pt175.mat    --> solution, simulated data, simulation moments, welfare indicators for pi*=17.5 bps 
  9) LFPWB_plt_grid_uniform_50x50x50_cy_0pt73_rn_1pt5_beta_0pt9982_xilb_0pt_xiub_3pt_pistar_0pt2.mat      --> solution, simulated data, simulation moments, welfare indicators for pi*=20 bps 
  10) LFPWB_plt_grid_uniform_50x50x50_cy_0pt73_rn_1pt5_beta_0pt9982_xilb_0pt_xiub_3pt_pistar_0pt225.mat   --> solution, simulated data, simulation moments, welfare indicators for pi*=22.5 bps 
  11) LFPWB_plt_grid_uniform_50x50x50_cy_0pt73_rn_1pt5_beta_0pt9982_xilb_0pt_xiub_3pt_pistar_0pt25.mat    --> solution, simulated data, simulation moments, welfare indicators for pi*=25 bps  


3. 'master_file_results.m': main file to run
-----------------------------------------------

This program generates the figures that are in the main text of the paper (Figures 1 to 5; 
tables 2 to 3; Figures 2 and 3 in appendix C) and stores them in the folder 'Tables_and_Figures'. 

- Inputs: all the aforementioned .mat files

