Analyzing Markets with PolyOracle AI
Learn how to use PolyOracle AI to perform comprehensive market analysis on Polymarket prediction markets.
Overview
PolyOracle AI's market analysis combines:
- Deep Research: Web-based research using Exa search
- Technical Analysis: Orderbook, volume, and price analysis
- Sentiment Analysis: News and social sentiment evaluation
- Risk Assessment: Liquidity and market efficiency evaluation
Starting Your First Analysis
Using the Web Interface
-
Access the Interface
cd frontend
pnpm devVisit
http://localhost:3000
-
Connect Your Wallet
- Click "Connect Wallet"
- Select your Web3 wallet (MetaMask, etc.)
- Switch to Polygon network if prompted
-
Select a Market
- Browse available markets or search by keyword
- Click on a market you want to analyze
- The market question and current odds will display
-
Start Analysis
- Click "Analyze Market" to begin the AI analysis
- The agent will run through its research and analysis workflow
- View real-time progress in the interface
Using the Backend API
You can also analyze markets directly through the LangGraph API:
curl -X POST http://localhost:2024/analyze \
-H "Content-Type: application/json" \
-d '{
"market_id": "0x123...",
"research_depth": 3
}'
Understanding the Analysis Process
Phase 1: Market Data Collection
The agent first collects comprehensive market data:
Market Information:
- Question and description
- Current YES/NO prices
- Trading volume and liquidity
- Market expiration date
- Historical price trends
Orderbook Analysis:
- Bid/ask spreads
- Market depth at different price levels
- Order size distribution
- Execution price estimates
Example Output:
Market: "Will Bitcoin reach $100K by December 2024?"
Current YES Price: $0.65 (65% implied probability)
24h Volume: $45,230
Total Liquidity: $234,500
Bid-Ask Spread: 2.3%
Phase 2: Deep Research
The agent performs recursive web research using Exa search:
Research Areas:
- Recent news and developments
- Expert opinions and analysis
- Historical precedents
- Market-moving events
- Social sentiment indicators
Research Depth: Configurable (1-5 levels)
- Level 1: Basic keyword search
- Level 2: Follow-up questions based on initial findings
- Level 3: Deep dive into specific aspects
- Level 4: Contrarian research and risk factors
- Level 5: Comprehensive multi-angle analysis
Example Research Output:
Research Summary:
- 15 sources analyzed across 3 research iterations
- Key finding: Recent institutional adoption increasing
- Risk factor: Regulatory uncertainty in key markets
- Sentiment: 70% positive, 20% neutral, 10% negative
- Confidence: High (based on source quality and consensus)
Phase 3: Technical Analysis
Quantitative analysis of market conditions:
Price Analysis:
- Price momentum and trends
- Support and resistance levels
- Volume-weighted average price (VWAP)
- Price volatility metrics
Liquidity Analysis:
- Available liquidity at different price points
- Market impact estimation
- Slippage calculations
- Best execution estimates
Market Microstructure:
- Order flow patterns
- Time-weighted spreads
- Market maker presence
- Trading frequency analysis
Phase 4: Synthesis and Decision
The agent combines all analysis into a trading decision:
Decision Framework:
- Fundamental Assessment: Based on research findings
- Technical Assessment: Based on market data analysis
- Risk Assessment: Considering all risk factors
- Confidence Scoring: 0-1 confidence in the decision
- Final Decision: BUY/SELL/NO_TRADE with rationale
Interpreting Analysis Results
Research Quality Indicators
Source Quality:
- ✅ High: Major news outlets, expert analysis, official sources
- ⚠️ Medium: Industry publications, blog posts, social media
- ❌ Low: Unverified sources, outdated information
Research Confidence:
- High (0.8-1.0): Strong consensus across quality sources
- Medium (0.5-0.7): Mixed signals or limited information
- Low (0.0-0.4): Conflicting information or poor source quality
Market Health Indicators
Liquidity Assessment:
- Excellent: Over $100K total liquidity, under 1% spread
- Good: $50K-100K liquidity, 1-3% spread
- Fair: $10K-50K liquidity, 3-5% spread
- Poor: Under $10K liquidity, over 5% spread
Market Efficiency:
- Efficient: Prices reflect available information well
- Inefficient: Potential arbitrage or mispricing opportunities
- Distorted: Unusual patterns suggesting manipulation
Trading Recommendations
BUY Signal Criteria:
- Research supports higher probability than market price
- Sufficient liquidity for position size
- Acceptable risk/reward ratio
- High confidence in analysis (over 0.7)
SELL Signal Criteria (if holding position):
- Research suggests lower probability than market price
- Position sizing or risk management triggers
- Market conditions have changed significantly
NO_TRADE Criteria:
- Insufficient information or low confidence
- Poor liquidity or excessive spreads
- Market fairly priced based on available information
Advanced Analysis Features
Custom Research Parameters
Configure research depth and focus:
research_config = {
"max_depth": 3,
"sources_per_query": 10,
"focus_areas": ["technical_analysis", "sentiment", "fundamentals"],
"exclude_sources": ["reddit", "twitter"], # Optional
"time_filter": "1w" # Last week only
}
Market Comparison
Compare similar markets for relative value:
comparative_analysis = {
"base_market": "0x123...",
"comparison_markets": ["0x456...", "0x789..."],
"comparison_metrics": ["implied_probability", "volume", "liquidity"]
}
Historical Backtesting
Test analysis accuracy on historical markets:
backtest_config = {
"start_date": "2024-01-01",
"end_date": "2024-06-01",
"market_categories": ["politics", "economics"],
"min_liquidity": 10000
}
Best Practices
Research Optimization
-
Balance Depth vs Speed
- Use deeper research for larger positions
- Quick analysis for time-sensitive opportunities
- Consider market volatility in timing
-
Source Diversification
- Include multiple perspectives
- Verify information across sources
- Consider potential biases
-
Regular Updates
- Re-analyze before major trades
- Monitor for new information
- Update analysis for position management
Risk Management
-
Position Sizing
- Start small with new markets
- Scale based on confidence and liquidity
- Consider correlation across positions
-
Market Selection
- Focus on liquid markets (over $10K)
- Avoid markets close to expiration
- Prefer clear, objective questions
-
Information Quality
- Prioritize recent, relevant information
- Cross-reference claims across sources
- Be skeptical of outlier predictions
Troubleshooting Analysis Issues
Common Problems
"Insufficient research data"
- Market topic may be too niche
- Try broader search terms
- Increase research depth setting
"Analysis taking too long"
- Reduce research depth temporarily
- Check internet connection
- Verify API rate limits
"Conflicting signals"
- Normal for complex markets
- Focus on source quality
- Consider waiting for more information
Performance Optimization
Speed Improvements:
- Use parallel research queries
- Cache frequently accessed data
- Optimize search query specificity
Quality Improvements:
- Adjust source filtering
- Tune confidence thresholds
- Validate against known outcomes
Next Steps
After mastering market analysis:
- Trading Guide - Learn how to execute trades
- API Reference - Explore advanced API usage for portfolio management
- FAQ - Find answers to common questions about performance
Ready to start trading? Check out the Trading Guide to learn how to act on your market analysis.