These files replicate the results in "The Role of Automatic Stabilizers 
in the US Business Cycle" by Alisdair McKay (amckay@bu.edu) and Ricardo 
Reis (rreis@columbia.edu).

July 13, 2015


***************************************************************************
Setup
***************************************************************************
 
When you want to solve the full model (with full heterogeneity) set the 
matlab path accordingly with setpath("FullModel").  Similarly for 
"RepAgent" and "HandToMouth".  Unless otherwise noted, run the commands 
from the main Replication directory.





***************************************************************************
Replicating section 3
****************************************************************************

Run:
setpath('FullModel')
FullModel

Fig 3: Optimal savings policies
Run: plot_dec_rules

Tables 3 and 4: Fraction of sub-population with low wealth, marginal propensity to consume
See: FullModel/results/steady_state_experiment_ex0_se0_rob0_sticky_1.txt

Fig 4: The (smoothed) ergodic wealth distribution (density)
plot_dist_wealth.m

Figs5 and 6: Impulse responses to aggregate shocks / three fiscal experiments
plot_IRFs.m


Table 5: Cyclicality of fiscal variables
FiscalCycle.m


Fig 7: Impulse response of output to three fiscal experiments with no wealth effect on labor supply
Edit: FullModel/FullModel.m  change robustness to 6 (line 49)
Run: FullModel.m
plot_IRFs.m (see line 19)


****************************************************************************
Replicating sections 4 and 5.1
****************************************************************************

This takes rather a long time.

Run: main.m
Then: 
cd tables
run: make_tables
The results are written to the tex_output directory.


****************************************************************************
Replicating sections 5.2 and 6
****************************************************************************



This requires that Dynare is installed.  

These sections involve results with and without stabilizers.  For each case, start by 
modifying the options at the top of FullModel.m to turn stabilizers on (experiment 0) and 
off (experiment 1).  Run these steps for one experiment, then go back to the beginning
and run them again for the other experiment.


Compute steady state using FullModel.m (i.e. run Fullmodel.m)
cd scratch
dynare transition;
dynare transition_ZLB;



Fig 8: The zero lower bound episode with and without automatic stabilizers
transitions/plotter.m


Table 13 is produced by the maketable command referred to above.  The results appear in 
tables/weflare_results/experiment_1_FiscalAdj_4_search_0_sticky_1_robustness_0.tex

Table 14 is produced by:
cd Replication/tabling/
WelfareDriver
The results appear in welfare_tables.tex (see the lines for "Utilitarian")
