Supplementary Code for: Climate Shocks and Regime Dependence: A Structural Analysis of Macroeconomic Stability in the MENA Region
Summary
No summary yet. VIRAT can read this paper and write a plain-language summary of its aim, methods, key findings and limitations.
Summarise with VIRAT Free to try with your Science Catalogs account.Abstract
Abstract This repository contains the Python code used to generate all statistical results and figures presented in the manuscript "Climate Shocks and Regime Dependence: A Structural Analysis of Macroeconomic Stability in the MENA Region". The code provides a complete replication package for the empirical analysis, enabling researchers to verify and build upon the findings. Methodology Overview The code implements a comprehensive empirical strategy including: MENA Climate Risk Index (MCRI): Construction of a composite climate shock index using Principal Component Analysis (PCA) integrating temperature anomalies, rainfall deviations, and SPEI-12 drought intensity. Unit Root and Cointegration Tests: Augmented Dickey-Fuller (ADF), Kwiatkowski-Phillips-Schmidt-Shin (KPSS), and Engle-Granger tests to establish integration and cointegration properties. Linearity Tests: Comparison of linear VAR and Markov-switching VAR using AIC and BIC criteria. Tunisia VAR: Linear structural VAR with Cholesky decomposition to compute impulse response functions for GDP growth, inflation, and FDI. Egypt MS-AR: Univariate Markov-switching autoregressive models for GDP growth, inflation, and FDI, capturing regime-dependent dynamics. Robustness Checks: Alternative lag lengths, subsample analysis, and alternative climate index specifications. Figure Generation: All main text and appendix figures in publication-ready format. File Structure text Supplementary_Code.zip ├── README.txt # Instructions and file descriptions ├── requirements.txt # Python package dependencies ├── 01_data_preprocessing.py # Data loading, MCRI construction, normalization ├── 02_unit_root_tests.py # ADF, KPSS, PP tests ├── 03_cointegration_tests.py # Engle-Granger and Johansen tests ├── 04_linearity_tests.py # Linearity tests (AIC comparison) ├── 05_tunisia_var.py # Linear VAR for Tunisia (Figure 4) ├── 06_egypt_ms_ar.py # MS-AR models for Egypt (Figures 5-6) ├── 07_appendix_figures.py # Appendix A and F figures ├── 08_robustness_checks.py # Alternative specifications └── 09_main_figures.py # Main text figures (Figures 1-3) Requirements Python 3.8 or higher Dependencies listed in requirements.txt Install with: bash pip install -r requirements.txt Usage Run the scripts in numerical order: bash python 01_data_preprocessing.py python 02_unit_root_tests.py python 03_cointegration_tests.py python 04_linearity_tests.py python 05_tunisia_var.py python 06_egypt_ms_ar.py python 07_appendix_figures.py python 08_robustness_checks.py python 09_main_figures.py Data Sources The code uses publicly available data from: Climate data: Climatic Research Unit (CRU TS v4.0), SPEI Global Database Macroeconomic data: World Bank World Development Indicators (WDI) Institutional data: Varieties of Democracy (V-Dem), Worldwide Governance Indicators (WGI) Processed panel data are generated by the 01_data_preprocessing.py script. Output Figures: Saved as PNG and PDF in the current directory Tables: Printed to console and saved as Excel files Results: Excel files containing unit root, cointegration, and linearity test results License This code is released under the MIT License.
Fields of Study & Subjects
Monetary Policy and Economic Impact
Climate Change Policy and Economics
Market Dynamics and Volatility
Publication details
- Journal / source
- Zenodo (CERN European Organization for Nuclear Research)
- Publication date
- 28 March 2026
- Language
- EN