This repository contains the scripts used to reproduce the analyses in "A Bayesian workflow for securitizing casualty insurance risk" by Haines, Goold, & Shoun (2024).
The Bayesian models themselves are implemented in Stan scripts located in the bayesian-workflow-paper-2024/stan/
directory.
All analyses were run with Python 3.11
. Once Python 3.11
is installed locally, we recommend the
following steps:
- navigate to your local
bayesian-workflow-paper-2024/
directory - initialize a virtual environment:
python3.11 venv env
- activate the environment:
source env/bin/activate
- install requirements:
pip install -r requirements/requirements.txt
Analyses can then be reproduced by running the following scripts in order:
- download and pre-process the data:
python -m pull
- run simulation-based calibration:
python -m sbc
- run backtests along with prior and posterior predictive checks:
python -m backtest
- run Balona (2020) working example:
python -m analyze
Once analyses are reproduced, figures are located in the bayesian-workflow-paper-2024/figures/
directory.