AshenH commited on
Commit
ff521d6
·
verified ·
1 Parent(s): ff87e87

Update README_SPACE.md

Browse files
Files changed (1) hide show
  1. README_SPACE.md +28 -12
README_SPACE.md CHANGED
@@ -1,12 +1,28 @@
1
- # Deploying as a Hugging Face Space
2
-
3
- 1. Create a new **Gradio** Space.
4
- 2. Upload the **contents of `space/`** to the Space root.
5
- 3. Add Space Secrets:
6
- - `HF_TOKEN`
7
- - For BigQuery: `GCP_SERVICE_ACCOUNT_JSON`, `GCP_PROJECT`
8
- - For MotherDuck: `MOTHERDUCK_TOKEN`, `MOTHERDUCK_DB`
9
- - Optional tracing: `LANGFUSE_PUBLIC_KEY`, `LANGFUSE_SECRET_KEY`, `LANGFUSE_HOST`
10
- 4. Set `SQL_BACKEND` to `bigquery` or `motherduck`.
11
- 5. Set `HF_MODEL_REPO` to your private model repo id.
12
- 6. (Optional) Set `ORCHESTRATOR_MODEL` for the tiny CPU LLM.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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`.