Content:
This folder contains the programs used to solve the model under the assumption that the TFP growth rate is constant and equal to psi. 

--------------------------------------------------------------------------
1. init_guesses.m (time: 8min)
--------------------------------------------------------------------------
!!!!!!!!! You can skip this step since initial guesses already exist. 

This file produces guesses used to initialize the solution algorithm in 'master_file_solution_parallelfeb24'.

- Outputs (stored in the folder 'Outputs'):
  1) ocbaseline_grid_uniform_15x15x15_cy_0_rn_3pt5_beta_0pt9913_psi_0_vola_0pt294.mat            --> initial guess and calibration, for Adam Billi 2006
  2) ocbaseline_grid_uniform_15x15x15_cy_0pt73_rn_0pt5_beta_0pt9982_psi_0pt5_vola_0pt294.mat     --> initial guess and calibration, for psi (and thus rbar)=0.5%
  3) ocbaseline_grid_uniform_15x15x15_cy_0pt73_rn_0pt_beta_0pt9982_psi_0pt_vola_0pt294.mat       --> initial guess and calibration, for psi (and thus rbar)=0%
  4) ocbaseline_grid_uniform_15x15x15_cy_0pt73_rn_1pt5_beta_0pt9982_psi_1pt5_vola_0pt294.mat     --> initial guess and calibration, for psi (and thus rbar)=1.5%
  5) ocbaseline_grid_uniform_15x15x15_cy_0pt73_rn_1pt_beta_0pt9982_psi_1pt_vola_0pt294.mat       --> initial guess and calibration, for psi (and thus rbar)=1% 
  6) ocbaseline_grid_uniform_15x15x15_cy_0pt73_rn_2pt_beta_0pt9982_psi_2pt_vola_0pt294.mat       --> initial guess and calibration, for psi (and thus rbar)=2% 
  7) ocbaseline_grid_uniform_15x15x15_cy_0pt73_rn_3pt5_beta_0pt9982_psi_3pt5_vola_0pt294.mat     --> initial guess and calibration, for psi (and thus rbar)=3.5%

- Other Outputs (stored in the folder 'Outputs'): 
  1) spreadsheet named '15x15x15_uniform' in xls file named 'moments'   --> simulation moments and accuracy indicators for each of these economies 

- Intputs: different calibrations (stored in folder 'Inputs')

--------------------------------------------------------------------------
2. master_file_solution_parallelfeb24: main program to run (computing time: 10min)
--------------------------------------------------------------------------

- Outputs (stored in the folder 'Outputs'):

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

- Other Outputs (stored in the folder 'Outputs'): 
  1) spreadsheet named '50x50x50_uniform' in xls file named 'moments'   --> simulation moments and accuracy indicators for each of these economies 

- Intputs 
  
  1) ocbaseline_grid_uniform_15x15x15_cy_0_rn_3pt5_beta_0pt9913_psi_0_vola_0pt294.mat            --> initial guess and calibration, for Adam Billi 2006
  2) ocbaseline_grid_uniform_15x15x15_cy_0pt73_rn_0pt5_beta_0pt9982_psi_0pt5_vola_0pt294.mat     --> initial guess and calibration, for psi (and thus rbar)=0.5%
  3) ocbaseline_grid_uniform_15x15x15_cy_0pt73_rn_0pt_beta_0pt9982_psi_0pt_vola_0pt294.mat       --> initial guess and calibration, for psi (and thus rbar)=0%
  4) ocbaseline_grid_uniform_15x15x15_cy_0pt73_rn_1pt5_beta_0pt9982_psi_1pt5_vola_0pt294.mat     --> initial guess and calibration, for psi (and thus rbar)=1.5%
  5) ocbaseline_grid_uniform_15x15x15_cy_0pt73_rn_1pt_beta_0pt9982_psi_1pt_vola_0pt294.mat       --> initial guess and calibration, for psi (and thus rbar)=1% 
  6) ocbaseline_grid_uniform_15x15x15_cy_0pt73_rn_2pt_beta_0pt9982_psi_2pt_vola_0pt294.mat       --> initial guess and calibration, for psi (and thus rbar)=2% 
  7) ocbaseline_grid_uniform_15x15x15_cy_0pt73_rn_3pt5_beta_0pt9982_psi_3pt5_vola_0pt294.mat     --> initial guess and calibration, for psi (and thus rbar)=3.5%

- Functions called by the program:
  compute_duration_ELB.m                      --> computes the average duration of a ZLB episode                          
  equations_oc_baseline.m                     --> model equations / computes endogenous varibales as well as the
                                                  values of the inflation rate and of the output gap implied by
                                                  the system of equations (new guesses)
  Grid_uniform.m                              --> constructs an 'evenly spaced' grid
  irf_oc_baseline.m                           --> not needed/used
  irf_oc_baseline_det.m                       --> not needed/used
  parsave.m                                   --> saves the model solution in a .mat file 
  Policy_function_iteration.m                 --> solution algorithm
  recursion_welfare_loss_oc_baseline.m        --> not needed/used
  sim_welfare_loss.m                          --> not needed/used        
  sim_welfare_loss_rec_baseline.m             --> not needed/used     
  simulate_oc_baseline.m                      --> generates (simulated) data, compute simulation moments, compute accuracy indicators
  
- Other functions (not in the folder 'Functions'):
  qnwnorm                                     --> generates the (Gauss-Hermite) quadrature nodes and weights for computing the expectations of functions 
                                                  of normal random variates; in CompEcon toolbox 

- Robustness check: alternative grid
  
  1) disable these three command lines:
     grid_type             = 'uniform';
     construct_grid        = @Grid_uniform; 
     excsheet              = '50x50x50_uniform';

  2) enable these three command lines:
     grid_type             = 'adaptative_density';
     construct_grid        = @Grid_adaptative_density3;   --> the function 'Grid_adaptative_density3.m' constructs an 'adaptative' grid
     excsheet              = '50x50x50_adaptative';

  3) Recommended (to avoid cluttering your hard drive): change dummy_save = 0 instead of 1

  Output: 
  1) spreadsheet named '50x50x50_adaptative' in xls file named 'moments'   --> simulation moments and accuracy indicators for each of these economies 

  Other outputs (if you kept dummy_save = 1)
  1) ocbaseline_grid_adaptative_density_50x50x50_cy_0pt73_rn_0pt5_beta_0pt9982_psi_0pt5_vola_0pt294.mat          --> solution and simulated data for psi (and thus rbar)=0.5%
  2) ocbaseline_grid_adaptative_density_50x50x50_cy_0pt73_rn_0pt_beta_0pt9982_psi_0pt_vola_0pt294.mat            --> solution and simulated data for psi (and thus rbar)=0%
  3) ocbaseline_grid_adaptative_density_50x50x50_cy_0pt73_rn_1pt5_beta_0pt9982_psi_1pt5_vola_0pt294.mat          --> solution and simulated data for psi (and thus rbar)=1.5%
  4) ocbaseline_grid_adaptative_density_50x50x50_cy_0pt73_rn_1pt_beta_0pt9982_psi_1pt_vola_0pt294.mat            --> solution and simulated data for psi (and thus rbar)=1% 
  5) ocbaseline_grid_adaptative_density_50x50x50_cy_0pt73_rn_2pt_beta_0pt9982_psi_2pt_vola_0pt294.mat            --> solution and simulated data for psi (and thus rbar)=2% 
  6) ocbaseline_grid_adaptative_density_50x50x50_cy_0pt73_rn_3pt5_beta_0pt9982_psi_3pt5_vola_0pt294.mat          --> solution and simulated data for psi (and thus rbar)=3.5%
  7) ocbaseline_grid_adaptative_density_50x50x50_cy_0pt_rn_3pt5_beta_0pt9913_psi_0pt_vola_0pt294                 --> solution and simulated data for a calibration similar to Adam and Billi 2006




