ALM_LLM / README.md
AshenH's picture
Update README.md
22cc556 verified
---
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`.