File size: 1,564 Bytes
180f1d8
 
 
 
 
 
 
 
 
 
 
abd065f
 
 
 
 
 
 
 
 
 
7b8151d
 
 
 
 
 
 
 
 
abd065f
 
 
a71dd82
 
 
 
 
 
 
abd065f
 
 
 
 
 
 
 
 
 
7b8151d
 
abd065f
 
 
 
 
 
 
7b8151d
 
 
abd065f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
title: Market Analyzing Platform
emoji: 💻
colorFrom: red
colorTo: blue
sdk: docker
pinned: false
license: apache-2.0
short_description: Market Analyzing Platform - Notifications, Tracking, etc
---

## POC Overview
This POC implements a market-wide risk radar using:
- Universe loader for tickers (unofficial lists supported)
- Price ingestion via `yfinance`
- Price Delta Calculator (drop by default)
- Adaptive thresholds, event detection, and alerting
- In-memory pub/sub topics
- Process pool for price loading

## Topics
Defined in `configs/topics.yaml`:
- `market.universe.snapshot`
- `market.universe.updated`
- `market.prices.snapshot`
- `market.price.delta`
- `risk.event.detected`
- `risk.envelope.updated`
- `data.gap.detected`
- `system.alert.ready`

## Run
```bash
uv sync
uv run python -m src.core.main
```

## App Entrypoint
```bash
uv run python app.py
```

## Notes
- `yfinance` is an unofficial data source and can break or rate-limit.
- Process pool parallelizes price fetching to speed up ingestion.
- Universe loader pulls:
  - US equities from `rreichel3/US-Stock-Symbols` (unofficial)
  - EU equities from Wikipedia index constituents (FTSE 100, DAX, CAC 40)
  - Crypto from Binance `exchangeInfo`
  - Commodities from a curated Yahoo Finance futures list
- Universe schema lives in `src/core/schemas.py`
- Topic taxonomy is loaded from `configs/topics.yaml`

## Telegram Bot
Set environment variables:
```bash
export TELEGRAM_BOT_TOKEN=...
export TELEGRAM_CHAT_ID=...
```

## Detailed Architecture Doc
- `docs/CURRENT_VERSION.md`
```