Where Does Fertility Sit in the Macroeconomic Shock Network? Time-Varying Connectedness Evidence from Greece

Published: 21 July 2026| Version 1 | DOI: 10.17632/sff6324h9t.1
Contributor:

Description

This package contains the complete data and code required to reproduce all results in the accompanying article, which asks where fertility sits within the macroeconomic shock network of Greece and how its position evolves over time. Research question and approach. Fertility is usually modelled as a slow-moving demographic outcome driven by macroeconomic conditions. We instead treat births as one node in a dynamic system of macroeconomic and uncertainty variables, and measure the direction and intensity of shock transmission between them. The empirical framework is a time-varying parameter VAR with generalised forecast error variance decomposition, from which we compute the total connectedness index, net directional connectedness for each variable, and net pairwise connectedness, with wild-bootstrap confidence bands. Data. The core analysis dataset is monthly for Greece, 2000M1–2025M12 (312 observations), combining live births with the seasonally adjusted unemployment rate, the Economic Sentiment Indicator, consumer confidence, the HICP, industrial production, and an Economic Policy Uncertainty index, together with year-on-year transformations of each series. Three further datasets support the extensions: monthly births disaggregated by birth order (parity 1, 2, 3+) for 2000–2024, obtained by Denton temporal disaggregation of annual order-specific counts; a four-country monthly panel (Greece, Spain, Italy, Portugal) for 2001–2024; and Bongaarts–Feeney tempo-adjusted annual total fertility, 1960–2024. All series derive from publicly available sources, chiefly Eurostat and the Economic Policy Uncertainty project. The original downloaded files are included in data/raw, so the pipeline runs offline with no further retrieval. Findings the data support. Total connectedness rises sharply around the sovereign debt crisis and the pandemic. Births are a persistent and statistically significant net receiver of shocks rather than a transmitter, while the Economic Sentiment Indicator is a significant net transmitter. These conclusions are stable across bootstrap replications, seeds, VAR lag orders and forecast horizons. Contents and reuse. The archive contains ten documented Python scripts (database construction, order disaggregation, the TVP-VAR/GFEVD engine, baseline and robustness estimation, bootstrap bands, and the multi-country extension), the raw and processed datasets, requirements.txt, one-command runners for Windows and Unix (run_all.bat, run_all.sh), and HOW_TO_RUN.md with step-by-step instructions, script-by-script input/output mapping, bootstrap options and troubleshooting. Requires Python 3.10+ with numpy, pandas, statsmodels, matplotlib, scipy and openpyxl. Running the pipeline regenerates every figure (F1–F8) and table (T1–T8) in the article. The processed datasets can also be reused independently as a cleaned monthly macro-demographic database for Greece and Southern Europe.

Files

Steps to reproduce

DATA COLLECTION. All series are public. The original downloaded files are included in data/raw, so the pipeline runs offline with no re-download. Macro and demographic series come from Eurostat: monthly live births (demo_fmonth), seasonally adjusted unemployment (une_rt_m), Economic Sentiment Indicator and consumer confidence (ei_bssi_m_r2), HICP (prc_hicp_midx), industrial production (sts_inpr_m) and fertility rates (demo_frate). Economic Policy Uncertainty indices for Greece, Spain, Italy and Portugal come from the Economic Policy Uncertainty project (policyuncertainty.com). Annual births by birth order are from national vital statistics. SOFTWARE. Python 3.10-3.12 on Windows, macOS or Linux. Create a virtual environment (py -m venv .venv on Windows, python3 -m venv .venv otherwise), activate it, then: pip install -r requirements.txt. This installs numpy, pandas, statsmodels, matplotlib, scipy and openpyxl. No proprietary software, no R, no compilation. EXECUTION. Scripts use relative paths (../data, ../results), so run them from inside the code folder: cd code python build_database.py python disaggregate_orders.py python run_connectedness.py python bootstrap_bands.py --B 2000 Alternatively run the full pipeline in one command from the package root: run_all.bat (Windows) or bash run_all.sh (macOS/Linux). WHAT EACH STEP DOES. build_database.py merges births with the macro series, builds year-on-year transformations and computes Bongaarts-Feeney tempo-adjusted total fertility. disaggregate_orders.py converts annual order-specific births to monthly by Denton proportional temporal disaggregation, using total monthly births as the indicator. connectedness.py is the estimation engine (imported, not run directly): a time-varying parameter VAR with forgetting factors, from which generalised forecast error variance decompositions (Pesaran-Shin) are computed at a 12-month horizon with lag order 1, giving the total connectedness index and net directional and net pairwise measures. run_connectedness.py produces the baseline and four robustness systems; bootstrap_bands.py adds wild-bootstrap bands. EXTENSIONS. build_multicountry.py and run_multicountry.py replicate the analysis for the four-country panel; order_macro.py runs the order-specific system; robustness.py varies lag order, horizon and forgetting factors; bootstrap_npdc.py bootstraps the net pairwise measures. OUTPUTS. Tables T1-T8 are written to results/tables and figures F1-F8 to results/figures, matching those reported in the article. REPRODUCIBILITY. The bootstrap is stochastic: pass --seed for identical output. Replications are set with --B (default 2000; about 0.04 seconds each, roughly 1.5 minutes at B=2000). Percentiles (--lower, --upper), horizon (--H) and lag order (--p) are configurable. Matplotlib uses the Agg backend, so figures are saved as PNG rather than displayed. Conclusions are unchanged across seeds, B, lag orders and horizons.

Institutions

Categories

Economics, Demography, Applied Economics

Licence