Appendix D — Reproducibility
The full pipeline lives in macro_drivers/:
make data # Eurostat + KNF download, panels (data/processed/*.parquet)
make models # stylised facts, full-sample estimation
make backtest # backtest (~2 min, 8 cores), evaluation, cash layer, forecast, extra figures, S12 analysis
make test # consistency test suite (tests/test_consistency.py, pytest)
make report # copy figures (PNG for HTML, vector PDF for the PDF book), render, mirror into report/_book
| Module | Role |
|---|---|
src/cit/fetch_eurostat.py |
Eurostat JSON API client; series list in config.yaml; raw CSV with last-update metadata |
src/cit/fetch_knf.py |
KNF banking xlsx (2009–2017 archive + current), de-cumulation, December-YTD check |
src/cit/panel.py |
quarterly, monthly, annual panels; metadata and coverage |
src/cit/transform.py |
log 4Q sums, relative PPI, net exports, sector-weighted base |
src/cit/models.py |
all model classes (common fit / forecast API) |
src/cit/backtest.py |
expanding-window engine, combinations, DM test, MCS |
src/cit/descriptive.py, estimation.py, bt_analysis.py, cash.py, forecast.py, extra_figs.py |
tables and figures |
report/_book/ is the complete, self-contained web output (HTML book, PDF, PNG figures, search index); it contains no source files and can be uploaded as is.
D.1 Consistency tests
tests/test_consistency.py is the mechanical layer of the consistency audit. It runs after the pipeline and fails if:
- the A10 GOS shares do not sum to 100% (± 0.1), or manufacturing appears both on its own and inside B–E;
- the de-cumulated monthly KNF flows do not reproduce the December year-to-date values (to 10⁻⁶);
- any results table contains a column that is entirely missing;
- the BVAR historical decomposition is labelled differently from the FEVD, or shocks plus the deterministic path do not add up to actual CIT growth;
- the backtest origins differ from
config.yaml; - a model refitted on a panel physically truncated at the origin produces a different forecast from the backtest at that origin (look-ahead test at three origins, five models).
Test 3 caught a NaN-only column in the ARDL table, caused by wrongly indexed critical values. Test 4 encodes the shock-labelling error found in the first version of the historical decomposition.
D.2 Revision log
Version 2 (December 2026) implemented an external audit (revise_011226.md):
- Fixed: BVAR historical-decomposition labels; CCF lead/lag interpretation of the REER; double counting of manufacturing in the sector shares and the factor pool; sector weights built as averages of annual share ratios; look-ahead in the sector-weighted base; ARDL critical values; HAC errors in the factor table; ENET stability selection; scenario phasing;
first_originread from the configuration. - Added: ESA concept reconciliation; one-quarter-step bridges; ENET_WIDE in the backtest; BVAR bootstrap bands, diagnostics and prior/lag sensitivity; single-equation residual diagnostics; a unit-root battery (ADF with fixed lags, PP, KPSS); direct macro-to-cash models on matched samples; out-of-sample nowcast evaluation and prediction standard errors; accounting-consistent scenarios; full disclosure of negative information-gap shares; the consistency test suite.
- Checked and not changed: the Eurostat skill path in
fetch_eurostat.pywas valid. A fallback search was added nonetheless.
Administrative inputs (budget cash, CIT-8 aggregates, GUS F-01) are read from the Ministry modelling database (mininempf/assumptions/admin). Python 3.14, pandas, statsmodels 0.15, scikit-learn 1.9, Quarto 1.9.