Update README.md
Browse files
README.md
CHANGED
|
@@ -6,5 +6,43 @@ colorTo: pink
|
|
| 6 |
sdk: docker
|
| 7 |
app_port: 7860
|
| 8 |
pinned: false
|
| 9 |
-
short_description: CAPM+CML portfolio advisor
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
sdk: docker
|
| 7 |
app_port: 7860
|
| 8 |
pinned: false
|
| 9 |
+
short_description: CAPM + CML portfolio advisor w/ embeddings
|
| 10 |
+
license: cc-by-4.0
|
| 11 |
+
models:
|
| 12 |
+
- FinLang/finance-embeddings-investopedia
|
| 13 |
+
datasets:
|
| 14 |
+
- your-username/LensIQ-Synthetic-Portfolio-1000
|
| 15 |
---
|
| 16 |
+
|
| 17 |
+
# LensIQ — CAPM + CML Portfolio Advisor
|
| 18 |
+
|
| 19 |
+
LensIQ is a Gradio app for portfolio analysis using CAPM and the Capital Market Line (CML), with embedding-aided suggestions.
|
| 20 |
+
|
| 21 |
+
- **Plot**
|
| 22 |
+
- **x-axis**: historical σ (annualized, from monthly covariance of your tickers)
|
| 23 |
+
- **y-axis**: CAPM E[r] = rf + β·ERP
|
| 24 |
+
- CML drawn from risk-free to market (**VOO**).
|
| 25 |
+
|
| 26 |
+
- **Efficient mixes** (market/bills only)
|
| 27 |
+
- **Same σ** as your portfolio → point on the CML at your σ
|
| 28 |
+
- **Same E[r]** as your portfolio → σ on the CML for that return
|
| 29 |
+
- Weights shown so you can replicate the mixes.
|
| 30 |
+
|
| 31 |
+
- **Suggestions**
|
| 32 |
+
- Exactly **one** candidate per band (**Low / Medium / High**).
|
| 33 |
+
- Built from **1,000** random long-only mixes using **your tickers** (+ `VOO` as market proxy).
|
| 34 |
+
- Ranking uses CAPM metrics + **FinLang/finance-embeddings-investopedia** with MMR for diversity.
|
| 35 |
+
|
| 36 |
+
- **Export**
|
| 37 |
+
- Each run saves a CSV with all candidate mixes (downloadable from the UI).
|
| 38 |
+
|
| 39 |
+
> **Note:** Include **VOO** in your portfolio (market proxy) before computing.
|
| 40 |
+
|
| 41 |
+
---
|
| 42 |
+
|
| 43 |
+
## Run Locally
|
| 44 |
+
|
| 45 |
+
```bash
|
| 46 |
+
docker build -t lensiq .
|
| 47 |
+
docker run -p 7860:7860 -e GRADIO_SERVER_NAME=0.0.0.0 lensiq
|
| 48 |
+
# Open http://localhost:7860
|