初步完成项目,可以监控给出入场信号
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
# Polymarket Copy Trader (Project B)
|
||||
|
||||
**Quantitative copy-trading bot for Polymarket** — follows the top 1% of profitable wallets using Bayesian credibility updates + Kelly position sizing + Favorite-Longshot bias correction.
|
||||
|
||||
## What's Different from Project A (Whale Watcher)
|
||||
|
||||
| Aspect | Project A (whale-watcher) | Project B (copy-trader) |
|
||||
|---|---|---|
|
||||
| Goal | Detect "insider" trades via LLM | Mirror statistically profitable wallets |
|
||||
| LLM cost | $0.5-2 per signal | $0 (all math, no LLM) |
|
||||
| Win rate evidence | 63.5% on 250 signals | Expected ≥55% from top-1% PnL data |
|
||||
| Latency | Asynchronous | Real-time WebSocket |
|
||||
|
||||
## Phase Plan
|
||||
|
||||
- ✅ **Phase 0** (current): foundation, pool builder, Telegram notifier
|
||||
- ⏳ **Phase 1**: User WebSocket subscriber (one per wallet, get every trade in real-time)
|
||||
- ⏳ **Phase 2**: Signal aggregator (Softmax + Bayesian update + Kelly sizer)
|
||||
- ⏳ **Phase 3**: CLOB trader (optional, off by default — manual first)
|
||||
- ⏳ **Phase 4**: Dashboard (FastAPI for P&L tracking)
|
||||
|
||||
## Architecture (target)
|
||||
|
||||
```
|
||||
Data API ──┐
|
||||
├─→ Wallet Pool Builder ──→ SQLite (top 100 wallets)
|
||||
│
|
||||
└─→ Health score = f(PnL, trades, category diversity)
|
||||
↓
|
||||
User WebSocket (User channel) per wallet
|
||||
↓
|
||||
On each trade → check eligibility (size, price)
|
||||
↓
|
||||
Bayesian credibility update
|
||||
↓
|
||||
Softmax aggregation across wallets
|
||||
↓
|
||||
Kelly sizing + Favorite-Longshot correction
|
||||
↓
|
||||
Telegram notification + optional CLOB execution
|
||||
```
|
||||
|
||||
## Running
|
||||
|
||||
```bash
|
||||
# Local
|
||||
python -m src.main run
|
||||
|
||||
# Docker (cloud)
|
||||
docker compose build --no-cache && docker compose up -d
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
Copy `.env.example` to `.env` and fill in:
|
||||
- Polymarket Gamma + Data API (no auth needed for reads)
|
||||
- Telegram bot token + chat ID for notifications
|
||||
- CLOB credentials (only if enabling live execution)
|
||||
- Wallet pool criteria (PnL minimum, trade count, etc.)
|
||||
|
||||
## Why this will (probably) make money
|
||||
|
||||
- Polymarket data: **top 1% users capture 84% of all profits**
|
||||
- Their edge = identifying mispriced contracts, NOT insider info
|
||||
- Following their trades = systematic exposure to that edge
|
||||
- Bayesian updating = self-correcting when a wallet's skill degrades
|
||||
- Favorite-Longshot correction = avoid 70.8% user loss pattern
|
||||
|
||||
## Disclaimer
|
||||
|
||||
Backtesting not yet performed. Start with `ENABLE_EXECUTION=false` and observe signals via Telegram for 2-4 weeks before any live trading.
|
||||
Reference in New Issue
Block a user