Update README_SPACE.md
Browse files- README_SPACE.md +28 -12
README_SPACE.md
CHANGED
|
@@ -1,12 +1,28 @@
|
|
| 1 |
-
#
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ALCO Liquidity & IR Dashboard (MotherDuck) — Hugging Face Space
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
This Space provides an offline-first dashboard for bank ALCO/ALM:
|
| 5 |
+
- Liquidity: T+1 gap and maturity ladder
|
| 6 |
+
- Interest-Rate Risk: duration (modified), DV01, and ±100bp parallel shock
|
| 7 |
+
- Explainability: top T+1 contributors by tenor (months), segment, and currency
|
| 8 |
+
- Exports: Excel (multi-sheet) and a lightweight PDF summary
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
## Deploy
|
| 12 |
+
1) Create a new **Hugging Face Space** (SDK: **Python**).
|
| 13 |
+
2) Add the files from this repo: `app.py`, `requirements.txt`, `README.md`.
|
| 14 |
+
3) In the Space **Settings → Secrets**, add `MOTHERDUCK_TOKEN`.
|
| 15 |
+
4) Your source table: `my_db.main.masterdataset_v` with columns
|
| 16 |
+
- `as_of_date` (DATE like `2025-09-15`)
|
| 17 |
+
- `product`, `months`, `segments`, `currency`, `Portfolio_value`, `Interest_rate`, `days_to_maturity`
|
| 18 |
+
5) On first run, the app creates a normalized view `my_db.main.positions_v` (Assets vs SoF bucket).
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
## Usage
|
| 22 |
+
- Press **Refresh** to query latest `as_of_date` and render KPIs, charts, and tables.
|
| 23 |
+
- Use **Export Excel** / **Export PDF** to download artifacts for ALCO.
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
## Notes
|
| 27 |
+
- Sign convention: Assets=inflow (+), SoF=outflow (–). Net gap T+1 = Assets_T1 − SoF_T1.
|
| 28 |
+
- Duration/convexity/DV01 use transparent approximations with tenor T in years and yield y from `Interest_rate`.
|