File size: 1,448 Bytes
b42959c 22cc556 b42959c ff521d6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
---
title: ALCO Liquidity & IR Dashboard
emoji: π¦
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: 5.49.1
app_file: app.py
pinned: true
---
# ALCO Liquidity & IR Dashboard (MotherDuck) β Hugging Face Space
This Space provides an offline-first dashboard for bank ALCO/ALM:
- Liquidity: T+1 gap and maturity ladder
- Interest-Rate Risk: duration (modified), DV01, and Β±100bp parallel shock
- Explainability: top T+1 contributors by tenor (months), segment, and currency
- Exports: Excel (multi-sheet) and a lightweight PDF summary
## Deploy
1) Create a new **Hugging Face Space** (SDK: **Python**).
2) Add the files from this repo: `app.py`, `requirements.txt`, `README.md`.
3) In the Space **Settings β Secrets**, add `MOTHERDUCK_TOKEN`.
4) Your source table: `my_db.main.masterdataset_v` with columns
- `as_of_date` (DATE like `2025-09-15`)
- `product`, `months`, `segments`, `currency`, `Portfolio_value`, `Interest_rate`, `days_to_maturity`
5) On first run, the app creates a normalized view `my_db.main.positions_v` (Assets vs SoF bucket).
## Usage
- Press **Refresh** to query latest `as_of_date` and render KPIs, charts, and tables.
- Use **Export Excel** / **Export PDF** to download artifacts for ALCO.
## Notes
- Sign convention: Assets=inflow (+), SoF=outflow (β). Net gap T+1 = Assets_T1 β SoF_T1.
- Duration/convexity/DV01 use transparent approximations with tenor T in years and yield y from `Interest_rate`. |