This repository contains a lightweight template for working with a macro‑level panel of bank stability metrics for the EA‑20 over 2000‑2022. It demonstrates a reproducible workflow for preparing a small processed sample, generating illustrative figures, and running baseline econometrics (two‑way fixed effects) and dynamic models (System‑GMM) using an extensible Python package.
- Two‑way fixed effects (FE) baseline: regress log Z‑score, NPL ratio and Tier‑1 capital ratio on macro fundamentals (GDP growth, unemployment, inflation, real short rate, lagged credit growth and the credit‑to‑GDP gap) with country and year effects and clustered errors.
- Dynamic System‑GMM module: handle persistence and potential endogeneity using a collapsed instrument set and lagged dependent variables.
- Mini data build pipeline:
build_data.py
produces a toypanel_sample.csv
indata/processed/
andmake_figures.py
draws a simple figure intofigures/
. - Notebook placeholder: a starter Jupyter notebook for exploratory analysis.
- CI, linting and testing: pre‑commit hooks (ruff) and GitHub Actions ensure code quality.
- Data policy: raw and interim data are excluded from version control; only processed and synthetic examples live in the repository. See
data/README.md
for details.
Clone the repo and run:
make setup # create a virtual environment and install requirements
make data # run src/macrobank/build_data.py to create processed data
make figures # run src/macrobank/make_figures.py to build example plots
make lint # run ruff for code style
make test # run pytest on test suite
make all # run data and figures targets
See docs/data_dictionary.md
for information on the variables used in the panel and docs
for additional documentation.
.
├── src/macrobank/ # Library code and data/figure build scripts
├── notebooks/ # Jupyter notebooks for EDA
├── data/ # Raw, interim and processed data (raw data not versioned)
├── figures/ # Output figures generated by scripts
├── docs/ # Data dictionary and other docs
├── tests/ # Unit tests
├── .github/workflows/ # Continuous integration config
├── .pre-commit-config.yaml # Pre‑commit hooks (ruff)
├── Makefile # Common tasks
If you use this project or adapt the structure for your own work, please cite it using the metadata in CITATION.cff
.