How partomia/alm-irrbb-casa-behavioural-forecasting works
This project refreshes CASA deposit behavioural assumptions for ALM/IRRBB: balance history is prepared as weekly segment data, forecast and backtest results produce core/non-core splits and liquidity buckets, and ALCO users inspect results or run stress what-ifs. The graph follows the documented CDE-to-CAI workflow and includes reporting, lineage, and optional endpoint scoring. Some app, validation, and silver-stage wiring is documented but not shown in sampled source; the graph uses those documented stages without inferring their internals.
Main entry points: pipeline.py Monthly pipeline · casa_alm_dag.py Airflow DAG · storage.py Storage adapter · build_silver_daily.py Daily silver build
Components 23
Data preparation
- Bronze generator
cde/jobs/generate_cbs_bronze.py - Bronze tables
- Bronze validation
cde/jobs/validate_bronze.py - Daily silver build
cde/jobs/build_silver_daily.py - Silver daily table
- Weekly gold build
cde/jobs/build_gold_weekly.py
Run orchestration
- Airflow DAG
cde/dags/casa_alm_dag.py - Monthly forecast job
cai/jobs/monthly_forecast.py
Forecast analytics
- Weekly balance table
- Monthly pipeline
casa/pipeline.py - TimesFM forecasting
casa/model.py - Rolling backtest
casa/backtest.py - Core and SLS rules
casa/behavioural.py - Storage adapter
casa/storage.py - ALCO output tables
- Stress scoring
casa/scoring.py
ALCO consumption
- ALCO Streamlit app
app/streamlit_app.py - App data access
app/data.py - What-if client
casa/client.py - Model endpoint
cai/model/predict.py - Impala reports
sql/reports.sql
Other components
- CBS extract
- ALCO user
Connections 30
- CBS extract → Bronze generator: provides balances
- Bronze generator → Bronze tables: writes
- Airflow DAG → Bronze generator: dispatches
- Airflow DAG → Bronze validation: dispatches
- Airflow DAG → Daily silver build: dispatches
- Airflow DAG → Weekly gold build: dispatches
- Bronze validation → Bronze tables: validates
- Bronze validation → Daily silver build: gates
- Daily silver build → Bronze tables: reads
- Daily silver build → Silver daily table: writes
- Weekly gold build → Silver daily table: reads
- Weekly gold build → Weekly balance table: merges
- Airflow DAG → Monthly forecast job: triggers via API
- Monthly forecast job → Monthly pipeline: runs
- Monthly pipeline → Storage adapter: reads weekly data
- Storage adapter → Weekly balance table: reads
- Monthly pipeline → Rolling backtest: runs
- Monthly pipeline → TimesFM forecasting: forecasts with
- Monthly pipeline → Core and SLS rules: applies rules
- Monthly pipeline → Storage adapter: writes outputs
- Storage adapter → ALCO output tables: reads and writes
- ALCO user → ALCO Streamlit app: views ALCO results
- ALCO Streamlit app → App data access: loads data through
- App data access → Storage adapter: reads tables
- ALCO Streamlit app → What-if client: requests stress what-if
- What-if client → Model endpoint: calls when configured
- Model endpoint → Stress scoring: scores request
- Stress scoring → TimesFM forecasting: forecasts with
- What-if client → Stress scoring: scores locally
- Impala reports → ALCO output tables: queries