Update README.md
Browse files
README.md
CHANGED
|
@@ -26,7 +26,7 @@ LensIQ is a Gradio app for portfolio analysis using CAPM and the Capital Market
|
|
| 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**).
|
|
@@ -42,7 +42,56 @@ LensIQ is a Gradio app for portfolio analysis using CAPM and the Capital Market
|
|
| 42 |
|
| 43 |
## Run Locally
|
| 44 |
|
| 45 |
-
|
| 46 |
-
docker
|
| 47 |
-
|
| 48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 are shown so you can replicate the mixes.
|
| 30 |
|
| 31 |
- **Suggestions**
|
| 32 |
- Exactly **one** candidate per band (**Low / Medium / High**).
|
|
|
|
| 42 |
|
| 43 |
## Run Locally
|
| 44 |
|
| 45 |
+
docker build -t lensiq .
|
| 46 |
+
docker run -p 7860:7860 -e GRADIO_SERVER_NAME=0.0.0.0 lensiq
|
| 47 |
+
# Open http://localhost:7860
|
| 48 |
+
|
| 49 |
+
---
|
| 50 |
+
|
| 51 |
+
## Using the App
|
| 52 |
+
|
| 53 |
+
1. Add tickers and include **VOO**.
|
| 54 |
+
2. Enter **$ amounts** for each ticker.
|
| 55 |
+
3. Set **Horizon** and **Lookback** (years).
|
| 56 |
+
4. Click **Compute**.
|
| 57 |
+
5. Review your portfolio, the two efficient mixes (with weights), and the **one** Low/Medium/High suggestion (with % and $).
|
| 58 |
+
6. Download the generated CSV.
|
| 59 |
+
|
| 60 |
+
---
|
| 61 |
+
|
| 62 |
+
## Method
|
| 63 |
+
|
| 64 |
+
- Prices: Yahoo Finance monthly (`yfinance`)
|
| 65 |
+
- Risk-free: FRED tenor by horizon (1β30y)
|
| 66 |
+
- Market: `VOO`
|
| 67 |
+
- ERP: market CAPM E[r] β rf
|
| 68 |
+
- Ξ²: covariance vs. market (excess returns)
|
| 69 |
+
- Ο (hist): annualized from monthly covariance
|
| 70 |
+
- Suggestions: 1,000 long-only mixes; embedding-aided ranking + MMR
|
| 71 |
+
|
| 72 |
+
---
|
| 73 |
+
|
| 74 |
+
## Synthetic Dataset
|
| 75 |
+
|
| 76 |
+
A CSV is written under `data/`, e.g. `data/investor_profiles_<timestamp>.csv`.
|
| 77 |
+
|
| 78 |
+
**Columns:** `tickers`, `weights`, `beta`, `mu_capm`, `sigma_hist`, `sigma_capm`
|
| 79 |
+
|
| 80 |
+
If you publish the dataset to Hugging Face, set the repo to:
|
| 81 |
+
`your-username/LensIQ-Synthetic-Portfolio-1000` and include this README.
|
| 82 |
+
|
| 83 |
+
---
|
| 84 |
+
|
| 85 |
+
## Project Structure
|
| 86 |
+
|
| 87 |
+
.
|
| 88 |
+
ββ app.py
|
| 89 |
+
ββ Dockerfile
|
| 90 |
+
ββ requirements.txt
|
| 91 |
+
ββ data/ # generated CSVs
|
| 92 |
+
ββ README.md
|
| 93 |
+
|
| 94 |
+
## License
|
| 95 |
+
|
| 96 |
+
- Code: MIT (or your choice)
|
| 97 |
+
- Dataset: CC BY 4.0
|