Code for "Habit Formation and the Government Spending Multiplier"

Published: 12 January 2024| Version 1 | DOI: 10.17632/86b5cttbjb.1
Contributor:
Rym Aloui

Description

This dataset contains the computational code used in the paper "Habit Formation and the Government Spending Multiplier." The code is designed to solve a Dynamic Stochastic General Equilibrium (DSGE) model, incorporating New Keynesian economics with deep habits, perform impulse response functions to government spending shocks, and calculate the government spending multiplier. These elements are crucial for understanding the dynamics discussed in the paper and replicating the key figures. Software Requirements: MATLAB R2019b or equivalent Dynare (5.4) Data Description: The code uses synthetic data generated within a DSGE framework to analyze the impact of government spending shocks in various scenarios. The use of this controlled data environment is key for exploring the theoretical implications of the model. Additionally, the government spending multiplier is calculated over different time horizons. A detailed guide to reproducing the figures and tables in "Habit Formation and the Government Spending Multiplier" is available in the included readme file. Instructions for Use: Ensure MATLAB and Dynare are installed and functioning on your machine. Create a folder where you the files will be saved. Follow the step-by-step instructions in the readme file to replicate the analysis and figures. Contact Information: For queries or further clarification, please contact Rym Aloui at aloui@gate.cnrs.fr.

Files

Steps to reproduce

The following steps will guide you through the process of replicating the figures presented in the paper. Each figure corresponds to specific scenarios and regimes in the DSGE model. Replicate Figure 2: Government spending shock in regime M, \lambda=0 *Create a folder named IRF_RM (impluse response functions in regime M). *Upload the following files to this folder: mc_steady_state_helper.m, base_RM_NoR.mod, base_RM.mod, figure_irfs_RM.m, figure_irfs_RM_NoR.m, Make_irfs_RM.m * In MATLAB, navigate to the IRF_RM folder and run Make_irfs_RM.m to generate the figure. Replicate figure 3: Government Spending Shock in regime F, \lambda=0 *Create a folder named IRF_RF (impluse response functions in regime F). *Upload the following files to this folder: mc_steady_state_helper.m, base_RF_NoR.mod, base_RF.mod, figure_irfs_RF.m, figure_irfs_RF_NoR.m, Make_irfs_RF.m * In MATLAB, navigate to the IRF_RF folder and run Make_irfs_RF.m to generate the figure. Replicate figure 4: Government Spending Shock in regime M *Create a folder that you can name IRF_RM_lamda (impluse response functions in regime M) where lamda can take two values ( 0 and 0.15). *Upload the following files to the folder: mc_steady_state_helper.m, base_RM.mod, figure_irfs_lamda_RM.m * Run figure_irfs_lamda_RM.m to get the figure. Replicate figure 5: Government Spending Shock in regime F *Create a folder named IRF_RF_lamda (impluse response functions in regime F) where lamda can take two values ( 0 and 0.15). *Upload the following files to the folder: mc_steady_state_helper.m, base_RF.mod, figure_irfs_lamda_RF.m * Run figure_irfs_lamda_RF.m to get the figure. Replicate figure 6 and 7 : Government Spending Shock in regime M and regime F *Create a folder that named Multiplier *Upload the following files to the folder : mc_steady_state_helper.m, base_RF_0.mod, base_RF_1.mod, base_RF_2.mod, base_RM_0.mod, base_RM_1.mod, base_RM_2.mod, Make_GSM_F_0.m, Make_GSM_F_1, Make_GSM_F_2.m, Make_GSM_M_0.m, Make_GSM_M_1.m, Make_GSM_M_2.m, figure_multiplier.m, * In MATLAB, navigate to the Multiplier folder and run figure_multiplier.m to generate the figures.

Institutions

Universite Lumiere Lyon 2

Categories

Computational Economics

Licence