Skip to content

Commit b5b4bf6

Browse files
committed
Enhance README presentation
1 parent ec4e43c commit b5b4bf6

1 file changed

Lines changed: 81 additions & 18 deletions

File tree

README.md

Lines changed: 81 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,50 +2,113 @@
22

33
[![CI](https://github.com/WW-shan/poly_strategy/actions/workflows/ci.yml/badge.svg)](https://github.com/WW-shan/poly_strategy/actions/workflows/ci.yml)
44
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
5+
[![Release](https://img.shields.io/github/v/release/WW-shan/poly_strategy?sort=semver)](https://github.com/WW-shan/poly_strategy/releases)
6+
[![Python](https://img.shields.io/badge/python-3.11%2B-blue)](pyproject.toml)
7+
[![Tests](https://img.shields.io/badge/tests-pytest-2ea44f)](tests)
8+
[![Mode](https://img.shields.io/badge/default-dry--run%20first-0b7285)](docs/security.md)
9+
[![Live](https://img.shields.io/badge/live%20trading-opt--in-orange)](docs/security.md)
510

6-
Prediction-market research toolkit for collecting market data, replaying snapshots, and validating dry-run opportunities.
11+
<p align="center">
12+
<a href="docs/command-reference.md"><img src="https://img.shields.io/badge/Command%20Reference-111827?style=for-the-badge&logo=readthedocs&logoColor=white" alt="Command Reference"></a>
13+
<a href="docs/pipeline.md"><img src="https://img.shields.io/badge/Pipeline-0f766e?style=for-the-badge&logo=mermaid&logoColor=white" alt="Pipeline"></a>
14+
<a href="docs/operations.md"><img src="https://img.shields.io/badge/Ops%20Runbook-7c2d12?style=for-the-badge&logo=gnubash&logoColor=white" alt="Operations"></a>
15+
<a href="https://github.com/WW-shan/poly_strategy/releases/tag/v0.1.0"><img src="https://img.shields.io/badge/Release-v0.1.0-1d4ed8?style=for-the-badge&logo=github&logoColor=white" alt="Release"></a>
16+
</p>
717

8-
The repository is organized for research, paper trading, and guarded execution planning. Live execution stays behind explicit keys and risk checks.
18+
<p align="center">
19+
<img src="https://img.shields.io/badge/Polymarket-CLOB%20%2B%20Gamma-111827?style=flat-square" alt="Polymarket">
20+
<img src="https://img.shields.io/badge/Kalshi-cross--venue%20research-111827?style=flat-square" alt="Kalshi">
21+
<img src="https://img.shields.io/badge/LLM-rule%20verification-111827?style=flat-square" alt="LLM verification">
22+
<img src="https://img.shields.io/badge/Risk-pretrade%20checks-111827?style=flat-square" alt="Risk checks">
23+
</p>
924

10-
## Layout
25+
Prediction-market research and execution-planning toolkit for collecting books, discovering conservative relations, replaying snapshots, and validating dry-run opportunities before anything touches a live account.
1126

12-
- `poly_strategy/`: core package
13-
- `scripts/`: recurring jobs and operational helpers
14-
- `tests/`: unit tests
15-
- `docs/`: architecture, operations, and command reference
16-
- `rules/`: cached semantic rules
17-
- `ops/launchd/`: macOS LaunchAgent templates
18-
- `data/` and `var/`: local runtime state, ignored by git
27+
Live execution is opt-in and stays behind explicit environment variables, pretrade checks, and risk limits.
28+
29+
## What it covers
30+
31+
| Area | Capability |
32+
| --- | --- |
33+
| Collection | Polymarket Gamma/CLOB, Kalshi, and external signal ingestion |
34+
| Discovery | deterministic relation mining, LLM verification, rule caching |
35+
| Realtime | watchlist building, live book streaming, stable-opportunity monitoring |
36+
| Paper and risk | backtest, paper selection, execution plan checks, risk ledger updates |
37+
| Operations | background manager, LaunchAgents, rotation and pruning helpers |
38+
39+
## Architecture
40+
41+
```mermaid
42+
flowchart LR
43+
A[Market discovery] --> B[Rule cache]
44+
B --> C[Watchlist]
45+
C --> D[Realtime monitor]
46+
D --> E[Paper trades]
47+
E --> F[Pretrade checks]
48+
F --> G[Alerts and status]
49+
```
50+
51+
The detailed pipeline is documented in [docs/pipeline.md](docs/pipeline.md).
1952

2053
## Quick start
2154

2255
```bash
2356
python3.11 -m venv .venv
2457
.venv/bin/python -m pip install -e ".[dev,live]"
2558
cp .env.example .env.local
26-
pytest
59+
.venv/bin/python -m pytest
2760
```
2861

29-
## Common entry points
62+
Then inspect the CLI:
63+
64+
```bash
65+
.venv/bin/poly-strategy --help
66+
```
67+
68+
## Common workflows
3069

3170
```bash
3271
python -m poly_strategy.cli sample --out data/sample.ndjson
3372
python -m poly_strategy.cli backtest data/sample.ndjson
3473
python -m poly_strategy.cli collect-polymarket --out data/polymarket-gamma.ndjson --limit 20 --timeout 10
74+
python -m poly_strategy.cli discover-rules --raw data/polymarket-gamma.ndjson --out rules/candidate-implications.json
75+
python -m poly_strategy.cli build-watchlist --gamma data/polymarket-gamma.ndjson --rules rules/candidate-implications.json --out data/watchlist.json
76+
python -m poly_strategy.cli realtime-monitor-watchlist --watchlist data/watchlist.json --rules rules/candidate-implications.json --gamma data/polymarket-gamma.ndjson --report-out data/realtime-monitor.jsonl
3577
```
3678

3779
## Docs
3880

81+
- [Command reference](docs/command-reference.md)
3982
- [Pipeline](docs/pipeline.md)
4083
- [Operations](docs/operations.md)
4184
- [Repository layout](docs/repository-layout.md)
4285
- [Security](docs/security.md)
43-
- [Command reference](docs/command-reference.md)
4486
- [Changelog](CHANGELOG.md)
87+
- [Contributing](CONTRIBUTING.md)
88+
89+
## Configuration
90+
91+
| Variable group | Purpose |
92+
| --- | --- |
93+
| `OPENAI_*` | LLM discovery and verifier providers |
94+
| `PROXY` / `OPENAI_PROXY` | local proxy for unstable network paths |
95+
| `ODDPOOL_*` | external signal ingestion and quota control |
96+
| `POLYMARKET_*` | live execution / CLOB integration, guarded by `POLY_STRATEGY_ALLOW_LIVE=1` |
97+
| `ALERT_*`, `TELEGRAM_*`, `DISCORD_*` | notification delivery |
98+
99+
Start from [.env.example](.env.example) and keep `.env.local` untracked.
100+
101+
## Repository layout
102+
103+
- `poly_strategy/`: core package
104+
- `scripts/`: recurring jobs and operational helpers
105+
- `tests/`: unit tests
106+
- `docs/`: architecture, operations, and command reference
107+
- `rules/`: cached semantic rules
108+
- `ops/launchd/`: macOS LaunchAgent templates
109+
- `data/` and `var/`: local runtime state, ignored by git
45110

46-
## Notes
111+
## Release and license
47112

48-
- Keep `.env.local`, generated snapshots, logs, and other runtime artifacts out of git.
49-
- The repo ships with dry-run workflows and optional live integrations, but no secrets.
50-
- Licensed under MIT. See [LICENSE](LICENSE).
51-
- Current release: `v0.1.0`.
113+
- Current release: `v0.1.0`
114+
- Licensed under MIT, see [LICENSE](LICENSE)

0 commit comments

Comments
 (0)