
polymarket-quant
by Th1nhNg0
SKILL.md
name: polymarket-quant description: Analyze Polymarket prediction markets for mispricing and alpha opportunities. Use when analyzing prediction markets, evaluating event probabilities, finding arbitrage, checking market prices, or researching Polymarket events. allowed-tools: Read, Bash, WebFetch, Grep, Glob
Polymarket Quant Analysis
A comprehensive skill for analyzing prediction markets on Polymarket to identify mispriced events and generate alpha.
Quick Start
When asked to analyze a Polymarket event:
- Extract market data using the Polymarket API
- Research fundamentals via web search
- Calculate fair probability based on evidence
- Compare to market price and assess edge
- Provide recommendation with thesis and risks
Core Workflow
Step 1: Market Data Collection
Gamma Structure
Gamma provides some organizational models. These include events, and markets. The most fundamental element is always markets and the other models simply provide additional organization.
Detail
-
Market
- Contains data related to a market that is traded on. Maps onto a pair of clob token ids, a market address, a question id and a condition id
-
Event
- Contains a set of markets
- Variants:
- Event with 1 market (i.e., resulting in an SMP)
- Event with 2 or more markets (i.e., resulting in an GMP)
Fetch market data using the Polymarket Gamma API:
# Get event by slug (extract from URL)
curl -s "https://gamma-api.polymarket.com/events?slug=EVENT_SLUG" | python3 -m json.tool
How to Extract the Slug
From any Polymarket URL, the slug is the path segment after /event/ or /market/:
https://polymarket.com/event/fed-decision-in-october?tid=1758818660485
↑
Slug: fed-decision-in-october
# Get market details by condition ID
curl -s "https://gamma-api.polymarket.com/markets?condition_id=CONDITION_ID" | python3 -m json.tool
# Get current prices
curl -s "https://clob.polymarket.com/price?token_id=TOKEN_ID&side=buy"
Key data points to extract:
- Current YES/NO prices (probability)
- 24h volume and total volume
- Open interest
- Resolution source and criteria
- End date and resolution deadline
Step 2: Resolution Rules Analysis
CRITICAL: Before any analysis, understand EXACTLY how the market resolves:
- Resolution Source: What official source determines outcome?
- Resolution Criteria: What specific conditions trigger YES vs NO?
- Edge Cases: How are ambiguous outcomes handled?
- Deadline: When must the event occur by?
Common resolution sources:
- Official government announcements
- Major news outlets (AP, Reuters)
- Sports league official results
- Specific tweets or statements
- On-chain data
Step 3: Fundamental Research
Perform deep research on the event:
- Recent News: Search for breaking developments
- Expert Analysis: Find domain expert opinions
- Historical Data: Check precedents and base rates
- Incentive Analysis: What do key players want?
- Information Asymmetry: What might the market be missing?
Research sources by category:
| Category | Primary Sources |
|---|---|
| Politics | FiveThirtyEight, RealClearPolitics, official polls |
| Sports | ESPN, team injury reports, historical matchups |
| Crypto | On-chain data, protocol announcements, developer activity |
| Economics | Fed statements, BLS data, central bank calendars |
| Legal | Court dockets, PACER, legal analysis sites |
Step 4: Probability Estimation
Calculate your independent probability estimate:
- Base Rate: What's the historical frequency?
- Adjustments: What factors shift probability up/down?
- Uncertainty: How confident are you in your estimate?
Kelly Criterion for position sizing:
f* = (bp - q) / b
where:
f* = fraction of bankroll to bet
b = odds received (1/price - 1)
p = your probability estimate
q = 1 - p
Step 5: Alpha Generation
Compare your estimate to market price:
Market Implied Odds: X%
Your Estimated Odds: Y%
Edge: Y - X (or X - Y for NO)
Edge thresholds:
- |Edge| < 5%: No trade (within noise)
- |Edge| 5-10%: Small position if high confidence
- |Edge| 10-20%: Standard position
- |Edge| > 20%: Large position or reassess (may be missing info)
Step 6: Final Recommendation
Provide structured output:
## Market Analysis: [Event Name]
**Market URL**: [link]
**Current Price**: YES @ X¢ / NO @ Y¢
**24h Volume**: $X
**Resolution Date**: [date]
### Resolution Criteria
[Exact conditions for YES/NO]
### Research Summary
[Key findings from fundamental research]
### Probability Assessment
- Market Implied: X%
- Estimated Fair Value: Y%
- Edge: Z%
- Confidence: High/Medium/Low
### Recommendation
**[BUY YES / BUY NO / PASS]**
**Thesis**: [1-2 sentence core argument]
**Risks (Steelman)**: [Best argument against position]
**Position Size**: [Suggested Kelly fraction]
API Reference
For detailed API documentation, see API_REFERENCE.md.
Analysis Patterns
For specific analysis workflows by market type, see ANALYSIS_PATTERNS.md.
Utility Scripts
Run market analysis script:
python3 scripts/fetch_market.py "https://polymarket.com/event/..."
Run probability comparison:
python3 scripts/calculate_edge.py --market-price 0.65 --fair-value 0.72
Common Pitfalls
- Ignoring resolution rules: The market may resolve differently than expected
- Recency bias: Overweighting recent news vs base rates
- Illiquidity: Large positions may move price significantly
- Time decay: Events near resolution have different dynamics
- Correlated positions: Multiple bets on same underlying event
Risk Management
- Never bet more than you can afford to lose
- Account for fees (taker fees, gas costs)
- Consider position limits and liquidity
- Diversify across uncorrelated events
- Set stop-losses for large positions
Score
Total Score
Based on repository quality metrics
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
3ヶ月以内に更新がある
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
Reviews
Reviews coming soon