Replication codes for: 
Demographics, monetary policy, and the zero lower bound
by Marcin Bielecki, Michal Brzoza-Brzezina and Marcin Kolasa
published in Journal of Money, Credit and Banking



*************************************************
***** A. Generating deterministic simulations ***
*************************************************

All simulation results are generated in Matlab, using Dynare (www.dynare.org) version 4.5.7.

1. Baseline deterministic simulation
Run dem_trans_closed.mod, with option 'simulations' in lines 7-8 set to 5. Rerun with 'simulation' set to 1.

2. Deterministic simulation with learning
Run dem_trans_closed.mod, with option 'simulations' in lines 7-8 set to 2. Rerun with 'simulation' set to 3.

3. Deterministic simulation with hawkish monetary policy
Run dem_trans_closed.mod, with option 'simulations' in lines 7-8 set to 7. Rerun with 'simulation' set to 8.

4. Deterministic simulation with pension systems
Run dem_trans_closed.mod, with option 'simulations' in lines 7-8 set to 6 and option 'pensions' in lines 12-13 set to 1.
Rerun with 'pensions' set to 2.



*******************************************************
***** B. Generating stochastic simulations with ZLB ***
*******************************************************

These simulations additionally need DynareOBC, downloadable from github.com/tholden/dynareOBC.
This paper used version v3.30.54.1968.

The main file to run the simulations is ZLB.m. Its first part allows to choose which deterministic simulation
from section A is used as the approximation point. All commented variants need to be run to get the full set of results
presented in the paper.



*******************************
***** C. Generating figures ***
*******************************

After completing the steps above, just run Figures.m to produce all the figures showing up in the paper.



*****************************
***** D. Data input files ***
*****************************

The codes described above use the following input files:
1. Age_profiles.xlsx - age profiles extracted from HFCS
2. Demography_EU_1900.xlsx - EA demographic input to deterministic simulations, backcasted to 1900
3. Demography_EU.xlsx - EA population structure
4. param_phi_closed.mat - labor disutility parameters to match the age profiles of hours worked
5. data_macro.mat - EA data to compare the model to the data
6. Laubach_Williams.mat - NRI estimates for EA with the HLW method
