Spaces:
Running on Zero
Running on Zero
Upload community_contributions/chrys/README.md with huggingface_hub
Browse files
community_contributions/chrys/README.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ARIA — Automated Real-time Investment Alert Agent
|
| 2 |
+
|
| 3 |
+
Multi-agent pipeline that monitors commodities, stocks, indices, and crypto; runs technical and sentiment analysis; and sends Pushover alerts when opportunities meet the score threshold.
|
| 4 |
+
|
| 5 |
+
## Agents
|
| 6 |
+
|
| 7 |
+
1. **DATA_FETCHER** — Fetches prices and OHLCV from Alpha Vantage (stocks/indices), CommodityPriceAPI (gold/silver), CoinGecko (crypto).
|
| 8 |
+
2. **TECH_ANALYST** — RSI, MACD, Bollinger Bands, EMA cross; scores each asset and assigns a bias (STRONG BUY … STRONG SELL).
|
| 9 |
+
3. **SENTIMENT_AGENT** — NewsAPI headlines + LLM (via LiteLLM) for sentiment and a one-sentence narrative.
|
| 10 |
+
4. **DECISION_AGENT** — Combines tech and sentiment into a final score; applies alert threshold, cooldowns, and market-hours rules.
|
| 11 |
+
5. **NOTIFIER** — Sends formatted Pushover push notifications for assets that qualify.
|
| 12 |
+
|
| 13 |
+
## Setup
|
| 14 |
+
|
| 15 |
+
```bash
|
| 16 |
+
cd week8/community_contributions/chrys
|
| 17 |
+
pip install -r requirements.txt
|
| 18 |
+
cp .env.example .env
|
| 19 |
+
# Edit .env with your API keys (Pushover, Alpha Vantage, CommodityPriceAPI, NewsAPI, OpenRouter).
|
| 20 |
+
```
|
| 21 |
+
|
| 22 |
+
## Run
|
| 23 |
+
|
| 24 |
+
- **Gradio UI** (agent-colored log + results table):
|
| 25 |
+
```bash
|
| 26 |
+
python app.py
|
| 27 |
+
```
|
| 28 |
+
- **Notebook** (same Gradio app from Jupyter/VS Code):
|
| 29 |
+
```bash
|
| 30 |
+
cd week8/community_contributions/chrys
|
| 31 |
+
jupyter notebook ARIA_Gradio_App.ipynb
|
| 32 |
+
```
|
| 33 |
+
Or open `ARIA_Gradio_App.ipynb` in your editor and run all cells. The notebook sets the path and launches the Gradio UI; click **Run pipeline** to run all agents.
|
| 34 |
+
- **CLI one-off run:**
|
| 35 |
+
```bash
|
| 36 |
+
python main.py run-once
|
| 37 |
+
```
|
| 38 |
+
- **Background scheduler** (30 min interval):
|
| 39 |
+
```bash
|
| 40 |
+
python main.py schedule
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
+
## Config
|
| 44 |
+
|
| 45 |
+
- Watchlist: default list in `config.py`; override with `ARIA_WATCHLIST` (comma-separated).
|
| 46 |
+
- Alert threshold: 65+ final score; max 3 alerts/hour; 2-hour cooldown per asset.
|
| 47 |
+
- Outside US market hours (9am–5pm ET), only 24/7 assets (crypto, gold, silver, oil) can trigger alerts.
|
| 48 |
+
|
| 49 |
+
## Audit log
|
| 50 |
+
|
| 51 |
+
Runs are logged to `data/aria_audit.db` (SQLite). Optional: purge rows older than 90 days (see `db.purge_older_than_days()`).
|
| 52 |
+
|
| 53 |
+
---
|
| 54 |
+
|
| 55 |
+
## Screenshot / Preview
|
| 56 |
+
|
| 57 |
+

|