Replication data for: Oil-shock pass-through and monetary policy in oil-importing emerging economies: Panel evidence and the case of Morocco
Description
Monthly panel data and Python code that reproduce every table and figure of the paper "Oil-shock pass-through and monetary policy in oil-importing emerging economies: Panel evidence and the case of Morocco" (Otmane Lahrizi and Meriem Demdoumi, ENCG Kénitra, Ibn Tofail University). Research question: how much of an oil supply shock reaches consumer prices in oil-importing emerging economies, and does the pass-through depend on monetary policy stance, on the share of solar and wind power in electricity, and, for Morocco, on the fuel-pricing regime (administered prices to August 2013, transition, liberalised pump prices from December 2015)? Contents: - oil_passthrough_panel_23countries_2007_2025.csv: monthly panel of 23 oil-importing emerging economies, January 2007 to March 2025 (5,037 rows, 34 columns): consumer price indices (headline, energy, food, core), policy rates, exchange rates, Brent price, oil supply and demand shocks, solar and wind share of electricity, and the constructed variables used in the regressions (monetary stance, Morocco regime indicators). - codebook.csv: definition and source of every column. - data/panel_monthly.csv: working file with all source columns before construction. - hcp_ipc_divisions_monthly.csv and hcp_ipc_items_annual.csv: Morocco, HCP consumer price indices (base 2017). - caisse_compensation_extracted.csv: Morocco, subsidy figures extracted from the Caisse de Compensation annual reports. - Python scripts (01 to 09 and replicate_main_results.py) and README.txt. Sources: World Bank Global Database of Inflation; Bank for International Settlements and IMF policy rates; U.S. EIA Brent price via FRED; Ember and Our World in Data electricity mix; HCP; Caisse de Compensation; Baumeister and Hamilton (2019) oil supply and demand shocks. The Baumeister-Hamilton shock series are included with the permission of Christiane Baumeister (e-mail of 5 October 2026). Users of these columns should cite Baumeister, C., and Hamilton, J. D. (2019), American Economic Review 109(5), 1873-1910, doi:10.1257/aer.20151569, and refer to https://sites.google.com/site/cjsbaumeister/datasets. Other series remain subject to the terms of their original providers. This dataset belongs to a new paper. It does not update the dataset of the earlier working paper on Morocco alone (doi:10.17632/k7hh8fwx6n.1).
Files
Steps to reproduce
Requirements: Python 3 with numpy, pandas, scipy and matplotlib. Download all files, keep the folder structure, and run every command from the dataset folder. Main results only (Table 2, a few seconds): python replicate_main_results.py Full pipeline (all tables and figures): 1. python 02_panel_lp.py --cap 3 --placebo 1000 --out results_p1000 2. python 02_panel_lp.py --cap 3 --drop TUR --placebo 1000 --out results_p1000_noTUR 3. python 04_time_variation.py --cap 3 --out results_time_cap3 4. python 08_test_size_simulation.py 5. python 06_morocco_hcp.py --hcp hcp_ipc_divisions_monthly.csv 6. python 09_manuscript_numbers.py 7. python 07_figures_tables.py --hcp hcp_ipc_divisions_monthly.csv --hcp_items hcp_ipc_items_annual.csv --placebo results_p1000 --placebo_noTUR results_p1000_noTUR --notitle --out paper_output Steps 1, 2 and 4 take 30 to 90 minutes each; steps 1 and 2 can run at the same time. The placebo and simulation use fixed random seeds, so the numbers match the paper exactly. Tables and figures are written to paper_output. Baseline choices: oil supply shock capped at plus or minus 3; horizons 0 to 12 months; six lags; Driscoll-Kraay standard errors. 01_build_panel.py rebuilds data/panel_monthly.csv from the original source downloads. Details in README.txt.