trade-prediction-markets by aaaaqwq/claude-code-skills
npx skills add https://github.com/aaaaqwq/claude-code-skills --skill trade-prediction-markets此技能支持在 Polymarket 预测市场(YES/NO 代币)上对现实世界事件进行交易。
首先加载工具:
Use MCPSearch to select: mcp__workbench__get_all_prediction_events
Use MCPSearch to select: mcp__workbench__get_prediction_market_data
Use MCPSearch to select: mcp__workbench__create_prediction_market_strategy
基本工作流程:
1. 浏览市场:
get_all_prediction_events(market_category="crypto_rolling")
→ 查看 BTC/ETH 价格预测市场
2. 分析市场数据:
get_prediction_market_data(condition_id="0x123...")
→ 研究 YES/NO 代币价格历史
3. 创建策略:
create_prediction_market_strategy(
strategy_name="PolymarketArb_M",
description="当价格 <40% 时买入 YES,在 55% 时卖出"
)
4. 测试策略:
run_prediction_market_backtest(
strategy_name="PolymarketArb_M",
...
)
何时使用此技能:
:浏览可用的 Polymarket 预测市场
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
参数:
active_only (可选, 布尔值):仅显示活跃事件 (默认: true)market_category (可选, 字符串):按类别筛选类别:
crypto_rolling:加密货币价格预测(BTC 下一小时会超过 10 万美元吗?)politics:选举、政策决策economics:GDP、通胀、美联储决策sports:比赛结果、锦标赛entertainment:奖项、票房结果返回:包含名称、类别、市场、条件 ID、解决状态的事件列表
定价:$0.001
使用时机:发现交易机会,浏览可用市场
目的:分析特定市场的 YES/NO 代币价格历史
参数:
condition_id (必需):Polymarket 条件 IDstart_date (可选):筛选起始日期 (YYYY-MM-DD)end_date (可选):筛选结束日期 (YYYY-MM-DD)timeframe (可选):K线时间周期 (1m, 5m, 15m, 30m, 1h, 4h, 默认: 1m)limit (可选, 1-10000):每个代币的最大 K 线数 (默认: 1000)返回:市场元数据、YES 代币价格时间序列、NO 代币价格时间序列
定价:$0.001
使用时机:分析市场价格历史、研究代币行为、验证策略概念
目的:生成包含 YES/NO 交易逻辑的 Polymarket 策略代码
参数:
strategy_name (必需):策略名称(遵循模式:Name_RiskLevel)description (必需):YES/NO 逻辑、退出标准、头寸规模的详细要求返回:完整的 Python PolymarketStrategy 代码
定价:实际 LLM 成本 + 利润 (最高 $4.50)
执行时间:约 30-60 秒
使用时机:构建新的 Polymarket 策略
目的:在历史数据上测试预测市场策略
参数:
strategy_name (必需):要测试的 PolymarketStrategystart_date (必需):开始日期 (YYYY-MM-DD)end_date (必需):结束日期 (YYYY-MM-DD)condition_id (针对单一市场):特定条件 IDasset (针对滚动市场):资产符号 ("BTC", "ETH")interval (针对滚动市场):市场间隔 ("15m", "1h")initial_balance (可选):起始 USDC 金额 (默认: 10000)timeframe (可选):执行时间周期 (默认: 1m)返回:回测指标(盈亏、胜率、头寸历史)
定价:$0.001
执行时间:约 20-60 秒
使用时机:验证预测市场策略
目的:检查 Polymarket 市场的可用数据范围
参数:
data_type:"polymarket" 或 "all"asset (可选):按资产筛选include_resolved (可选):包含已解决的市场返回:包含日期范围的数据可用性信息
定价:$0.001
使用时机:回测前(验证数据是否充足)
目的:查看最近的预测市场回测结果
参数:
strategy_name (可选):按策略筛选limit (可选):结果数量返回:最近的回测记录
定价:免费
使用时机:检查现有回测结果
YES/NO 代币结构:
Event: "Will BTC exceed $100,000 by end of hour?"
YES Token:
- 如果事件发生,支付 $1.00
- 如果事件未发生,支付 $0.00
- 当前价格 = 市场的隐含概率
- 示例:YES 代币价格为 $0.65 = 65% 隐含概率
NO Token:
- 如果事件未发生,支付 $1.00
- 如果事件发生,支付 $0.00
- 当前价格 = 1 - YES 价格
- 示例:NO 代币价格为 $0.35 = 35% 隐含概率
Total: YES price + NO price ≈ $1.00 (如果不等则存在套利机会)
交易如何运作:
Scenario: YES token at $0.40
Buy YES token:
- 现在支付 $0.40
- 如果事件发生:收到 $1.00 (利润 $0.60 = 150% 回报)
- 如果事件未发生:损失 $0.40 (-100% 回报)
Risk/Reward:
- 冒着 $0.40 的风险赚取 $0.60
- 1.5:1 的回报风险比
- 需要 >40% 的胜率才能盈亏平衡
加密货币滚动市场 (高频):
Type: Continuous prediction markets
Frequency: Every 15m, 1h, 4h, etc.
Question: "Will BTC price increase next [interval]?"
Example:
- 1h BTC rolling market
- New market every hour
- Predict if BTC closes higher than current price
Use case: Short-term price speculation
Trading style: Active, high frequency
政治 (事件驱动):
Type: One-time events
Frequency: Varies (elections, policy decisions)
Timeline: Days to months until resolution
Examples:
- "Will candidate X win election?"
- "Will bill Y pass Congress by date Z?"
- "Will Fed cut rates in next meeting?"
Use case: Event speculation
Trading style: Position trading, hold until resolution
经济 (数据发布):
Type: Scheduled data releases
Frequency: Monthly, quarterly
Timeline: Fixed resolution dates
Examples:
- "Will CPI exceed 3.5% next month?"
- "Will GDP growth exceed 2% this quarter?"
- "Will unemployment rate decrease?"
Use case: Economic data predictions
Trading style: Position before release, exit at resolution
体育 (预定事件):
Type: Game outcomes, championships
Frequency: Varies by sport
Timeline: Hours to months
Examples:
- "Will Team X win game tonight?"
- "Will Player Y score >25 points?"
- "Will Team Z win championship?"
Use case: Sports betting alternative
Trading style: Event-based positions
概率套利 (均值回归):
Concept: Buy underpriced probabilities, sell when corrected
Example:
- Event has ~60% true probability
- YES token priced at $0.45 (implies 45%)
- Buy YES (underpriced)
- Sell when price reaches $0.60 (fair value)
Advantages: Mathematical edge if probability estimation accurate
Disadvantages: Requires good probability estimation
趋势跟踪 (动量):
Concept: Follow YES/NO token price momentum
Example:
- YES token price rising from $0.30 → $0.45
- Buy YES (momentum continuing)
- Exit when momentum fades
Advantages: Captures strong moves
Disadvantages: Late entries, whipsaws
均值回归 (区间交易):
Concept: Fade extreme probability movements
Example:
- YES token spikes to $0.85 (85% implied)
- Seems too high, buy NO token ($0.15)
- Exit when reverts toward mean
Advantages: Profits from overreactions
Disadvantages: Catching falling knives (sometimes market is right)
事件驱动 (催化剂交易):
Concept: Trade based on news/catalysts
Example:
- Positive news for candidate X
- Buy YES token before market fully reacts
- Exit after market prices in news
Advantages: Early mover advantage
Disadvantages: Requires fast news reaction
滚动市场如何运作:
BTC 1h Rolling Market:
Hour 1 (12:00-13:00):
- Market created at 12:00
- Question: "Will BTC close higher at 13:00 than 12:00?"
- YES/NO tokens trade 12:00-13:00
- Resolves at 13:00 based on price change
Hour 2 (13:00-14:00):
- New market created at 13:00
- Previous market resolved
- Profits/losses settled
- Process repeats
Strategy rolls from market to market automatically
滚动市场的优势:
劣势:
必需方法:
class MyPolymarketStrategy(PolymarketStrategy):
def should_buy_yes(self) -> bool:
"""检查是否符合购买 YES 代币的条件"""
# Return True to buy YES token
def should_buy_no(self) -> bool:
"""检查是否符合购买 NO 代币的条件"""
# Return True to buy NO token
def go_yes(self):
"""使用头寸规模执行 YES 代币购买"""
# Calculate position size
# Buy YES token
def go_no(self):
"""使用头寸规模执行 NO 代币购买"""
# Calculate position size
# Buy NO token
可选方法:
def should_sell_yes(self) -> bool:
"""退出 YES 头寸"""
# Return True to sell YES tokens
def should_sell_no(self) -> bool:
"""退出 NO 头寸"""
# Return True to sell NO tokens
def on_market_resolution(self):
"""处理市场结算"""
# Called when market resolves
# Settle P&L
选择流动性高的市场:
High liquidity: >$50k volume
- 点差小
- 易于入场/出场
- 定价可靠
Low liquidity: <$10k volume
- 点差大
- 出场困难
- 滑点风险
Recommendation: Start with high-volume markets
偏好解决标准明确的市场:
GOOD: "Will BTC close above $100k at 5pm EST on Jan 1, 2025?"
- 客观的解决来源(价格数据)
- 具体的日期和时间
- 无歧义
BAD: "Will crypto have a good year in 2025?"
- 主观("好" 未定义)
- 解决标准模糊
- 争议风险
避免结果模糊的市场:
Check resolution source:
- 数据驱动(价格、分数、投票)→ 好
- 主观判断 → 差
- "社区决定" → 高争议风险
Research past market resolutions:
- 解决是否公平?
- 有任何争议结果吗?
- 做市商信誉
定义明确的概率阈值:
Example: Probability arbitrage strategy
Entry logic:
- Buy YES if price <40% (undervalued)
- Buy NO if price <40% (YES >60%, overvalued)
Exit logic:
- Sell YES at 55% (15% profit target)
- Sell NO at 55% (symmetric)
- Stop loss at 25% (37.5% loss, preserve capital)
包含头寸规模:
Fixed percentage:
- 5% of capital per market
- Max 10 simultaneous positions = 50% deployed
- Conservative, predictable
Kelly Criterion:
- Size based on edge and odds
- More aggressive, optimal growth
- Requires accurate probability estimation
设置退出标准:
Profit targets:
- Sell at X% gain (e.g., 15% above entry)
Time-based exits:
- Close position Y hours before resolution
- Avoid last-minute volatility
Stop losses:
- Sell if price drops below Z% (e.g., 60% of entry)
- Preserve capital on wrong predictions
头寸限制:
Per market: 5-10% of capital
- 限制单一市场敞口
- 分散风险
Total exposure: 50-70% of capital
- 保留现金缓冲
- 允许新机会
- 防止过度交易
市场分散化:
Don't concentrate in one category:
- 3 crypto markets
- 2 politics markets
- 2 sports markets
→ Diversified across event types
Avoid:
- 10 BTC rolling markets
→ All correlated, high concentration risk
流动性监控:
Check before entry:
- 当前交易量
- 买卖点差
- 订单簿深度
If liquidity drops:
- 可能无法退出
- 接受按市价计算的损失
- 或持有至解决
目标:寻找 BTC 滚动市场交易机会
1. 浏览加密货币滚动市场:
get_all_prediction_events(market_category="crypto_rolling")
→ 列出具有间隔的 BTC、ETH 滚动市场
2. 检查数据可用性:
get_data_availability(data_type="polymarket", asset="BTC")
→ 验证回测是否有足够的历史数据
3. 分析特定市场:
get_prediction_market_data(
condition_id="0x123...",
timeframe="1m",
limit=5000
)
→ 研究 YES/NO 代币价格模式
4. 识别策略:
- YES 代币经常超调 (>60%)
- 均值回归机会
- 当 YES >65% 时买入 NO,在 55% 时退出
5. 创建策略:
create_prediction_market_strategy(
strategy_name="BTCRollingMeanRev_M",
description="Buy NO token when YES >65%, exit at 55%..."
)
6. 回测策略:
run_prediction_market_backtest(
strategy_name="BTCRollingMeanRev_M",
asset="BTC",
interval="1h",
start_date="2024-01-01",
end_date="2024-12-31"
)
成本:约 $2.50 ($0.003 数据 + $2.50 策略创建)
目标:在选举预测市场上交易
1. 浏览政治市场:
get_all_prediction_events(market_category="politics")
→ 寻找选举市场
2. 分析候选人 X 市场:
get_prediction_market_data(condition_id="election_123")
→ 研究选举前 YES 代币价格
3. 识别模式:
- YES 代币波动性很大
- 好消息时飙升,坏消息时下跌
- 买入低点、卖出高点的机会
4. 创建策略:
create_prediction_market_strategy(
strategy_name="ElectionDipBuy_M",
description="Buy YES when price drops >15% in 24h,
sell when recovers to pre-drop level..."
)
5. 回测(一次性事件数据有限):
- 可能没有足够数据进行彻底回测
- 手动分析或使用类似的过去事件
6. 谨慎交易:
- 事件市场数据较少
- 不确定性更高
- 从较小的头寸规模开始
成本:约 $2.50
目标:构建分散化的预测市场投资组合
1. 识别多个机会:
- BTC 1h 滚动(加密货币)
- 美联储决策(经济)
- 锦标赛(体育)
2. 为每个创建策略:
- 策略 1:BTC 滚动均值回归
- 策略 2:美联储决策概率套利
- 策略 3:体育赛事弱队价值
3. 回测所有策略:
为每个策略运行 run_prediction_market_backtest(...)
4. 分配资金:
- BTC 滚动:15%(更多数据,更高信心)
- 美联储决策:10%(一次性事件,中等信心)
- 体育:5%(数据较少,较低信心)
总计:30% 已部署,70% 现金
5. 监控表现:
- 独立跟踪每个策略
- 根据结果重新平衡
- 停止表现不佳的策略
成本:约 $7.50 (3 个策略)
问题:get_all_prediction_events 返回空结果
解决方案:
active_only=False 查看已解决的市场问题:回测历史数据不足
解决方案:
问题:回测显示亏损
解决方案:
创建预测市场策略后:
彻底测试:
test-trading-strategies 进行回测优化策略:
improve-trading-strategies 进行优化实时部署(当支持时):
deploy-live-trading此技能提供 Polymarket 预测市场交易:
核心原则:预测市场对现实世界事件的 YES/NO 代币进行交易。成功需要准确的概率估计和严格的风险管理。
最佳实践:选择流动性高、解决标准明确的市场,在不同事件类型间分散投资,使用适当的头寸规模(每个市场 5-10%),设置盈利目标和止损。
当前限制:尚不支持实时部署。用于回测和策略开发。实时交易将在未来更新中提供。
注意:预测市场是有效的。持续击败它们很困难。从模拟开始,在冒险资本之前(当实时部署可用时)彻底验证优势。
每周安装数
1
仓库
GitHub 星标数
11
首次出现
1 天前
安全审计
安装于
zencoder1
amp1
cline1
openclaw1
opencode1
cursor1
This skill enables trading on Polymarket prediction markets (YES/NO tokens) for real-world events.
Load the tools first :
Use MCPSearch to select: mcp__workbench__get_all_prediction_events
Use MCPSearch to select: mcp__workbench__get_prediction_market_data
Use MCPSearch to select: mcp__workbench__create_prediction_market_strategy
Basic workflow :
1. Browse markets:
get_all_prediction_events(market_category="crypto_rolling")
→ See BTC/ETH price prediction markets
2. Analyze market data:
get_prediction_market_data(condition_id="0x123...")
→ Study YES/NO token price history
3. Create strategy:
create_prediction_market_strategy(
strategy_name="PolymarketArb_M",
description="Buy YES when price <40%, sell at 55%"
)
4. Test strategy:
run_prediction_market_backtest(
strategy_name="PolymarketArb_M",
...
)
When to use this skill :
Purpose : Browse available Polymarket prediction markets
Parameters :
active_only (optional, boolean): Only active events (default: true)market_category (optional, string): Filter by categoryCategories :
crypto_rolling: Crypto price predictions (BTC >$100k in next hour?)politics: Elections, policy decisionseconomics: GDP, inflation, Fed decisionssports: Game outcomes, championshipsentertainment: Awards, box office resultsReturns : List of events with names, categories, markets, condition IDs, resolution status
Pricing : $0.001
Use when : Discovering trading opportunities, browsing available markets
Purpose : Analyze YES/NO token price history for specific market
Parameters :
condition_id (required): Polymarket condition IDstart_date (optional): Filter from date (YYYY-MM-DD)end_date (optional): Filter to date (YYYY-MM-DD)timeframe (optional): Candle timeframe (1m, 5m, 15m, 30m, 1h, 4h, default: 1m)limit (optional, 1-10000): Max candles per token (default: 1000)Returns : Market metadata, YES token price timeseries, NO token price timeseries
Pricing : $0.001
Use when : Analyzing market price history, researching token behavior, validating strategy concepts
Purpose : Generate Polymarket strategy code with YES/NO trading logic
Parameters :
strategy_name (required): Strategy name (follow pattern: Name_RiskLevel)description (required): Detailed requirements for YES/NO logic, exit criteria, position sizingReturns : Complete Python PolymarketStrategy code
Pricing : Real LLM cost + margin (max $4.50)
Execution Time : ~30-60 seconds
Use when : Building new Polymarket strategies
Purpose : Test prediction market strategy on historical data
Parameters :
strategy_name (required): PolymarketStrategy to teststart_date (required): Start date (YYYY-MM-DD)end_date (required): End date (YYYY-MM-DD)condition_id (for single market): Specific condition IDasset (for rolling markets): Asset symbol ("BTC", "ETH")interval (for rolling markets): Market interval ("15m", "1h")initial_balance (optional): Starting USDC (default: 10000)timeframe (optional): Execution timeframe (default: 1m)Returns : Backtest metrics (profit/loss, win rate, position history)
Pricing : $0.001
Execution Time : ~20-60 seconds
Use when : Validating prediction market strategies
Purpose : Check available data ranges for Polymarket markets
Parameters :
data_type: "polymarket" or "all"asset (optional): Filter by assetinclude_resolved (optional): Include resolved marketsReturns : Data availability with date ranges
Pricing : $0.001
Use when : Before backtesting (verify sufficient data)
Purpose : View recent prediction market backtest results
Parameters :
strategy_name (optional): Filter by strategylimit (optional): Number of resultsReturns : Recent backtest records
Pricing : Free
Use when : Checking existing backtest results
YES/NO Token Structure :
Event: "Will BTC exceed $100,000 by end of hour?"
YES Token:
- Pays $1.00 if event occurs
- Pays $0.00 if event doesn't occur
- Current price = Market's implied probability
- Example: YES token at $0.65 = 65% implied probability
NO Token:
- Pays $1.00 if event DOESN'T occur
- Pays $0.00 if event occurs
- Current price = 1 - YES price
- Example: NO token at $0.35 = 35% implied probability
Total: YES price + NO price ≈ $1.00 (arbitrage if not)
How trading works :
Scenario: YES token at $0.40
Buy YES token:
- Pay $0.40 now
- If event occurs: Receive $1.00 (profit $0.60 = 150% return)
- If event doesn't occur: Lose $0.40 (-100% return)
Risk/Reward:
- Risking $0.40 to make $0.60
- 1.5:1 reward:risk ratio
- Need >40% win rate to break even
Crypto Rolling Markets (high frequency):
Type: Continuous prediction markets
Frequency: Every 15m, 1h, 4h, etc.
Question: "Will BTC price increase next [interval]?"
Example:
- 1h BTC rolling market
- New market every hour
- Predict if BTC closes higher than current price
Use case: Short-term price speculation
Trading style: Active, high frequency
Politics (event-driven):
Type: One-time events
Frequency: Varies (elections, policy decisions)
Timeline: Days to months until resolution
Examples:
- "Will candidate X win election?"
- "Will bill Y pass Congress by date Z?"
- "Will Fed cut rates in next meeting?"
Use case: Event speculation
Trading style: Position trading, hold until resolution
Economics (data release):
Type: Scheduled data releases
Frequency: Monthly, quarterly
Timeline: Fixed resolution dates
Examples:
- "Will CPI exceed 3.5% next month?"
- "Will GDP growth exceed 2% this quarter?"
- "Will unemployment rate decrease?"
Use case: Economic data predictions
Trading style: Position before release, exit at resolution
Sports (scheduled events):
Type: Game outcomes, championships
Frequency: Varies by sport
Timeline: Hours to months
Examples:
- "Will Team X win game tonight?"
- "Will Player Y score >25 points?"
- "Will Team Z win championship?"
Use case: Sports betting alternative
Trading style: Event-based positions
Probability Arbitrage (mean reversion):
Concept: Buy underpriced probabilities, sell when corrected
Example:
- Event has ~60% true probability
- YES token priced at $0.45 (implies 45%)
- Buy YES (underpriced)
- Sell when price reaches $0.60 (fair value)
Advantages: Mathematical edge if probability estimation accurate
Disadvantages: Requires good probability estimation
Trend Following (momentum):
Concept: Follow YES/NO token price momentum
Example:
- YES token price rising from $0.30 → $0.45
- Buy YES (momentum continuing)
- Exit when momentum fades
Advantages: Captures strong moves
Disadvantages: Late entries, whipsaws
Mean Reversion (range trading):
Concept: Fade extreme probability movements
Example:
- YES token spikes to $0.85 (85% implied)
- Seems too high, buy NO token ($0.15)
- Exit when reverts toward mean
Advantages: Profits from overreactions
Disadvantages: Catching falling knives (sometimes market is right)
Event-Driven (catalyst trading):
Concept: Trade based on news/catalysts
Example:
- Positive news for candidate X
- Buy YES token before market fully reacts
- Exit after market prices in news
Advantages: Early mover advantage
Disadvantages: Requires fast news reaction
How rolling markets work :
BTC 1h Rolling Market:
Hour 1 (12:00-13:00):
- Market created at 12:00
- Question: "Will BTC close higher at 13:00 than 12:00?"
- YES/NO tokens trade 12:00-13:00
- Resolves at 13:00 based on price change
Hour 2 (13:00-14:00):
- New market created at 13:00
- Previous market resolved
- Profits/losses settled
- Process repeats
Strategy rolls from market to market automatically
Advantages of rolling markets :
Disadvantages :
Required methods :
class MyPolymarketStrategy(PolymarketStrategy):
def should_buy_yes(self) -> bool:
"""Check if conditions met for YES token purchase"""
# Return True to buy YES token
def should_buy_no(self) -> bool:
"""Check if conditions met for NO token purchase"""
# Return True to buy NO token
def go_yes(self):
"""Execute YES token purchase with position sizing"""
# Calculate position size
# Buy YES token
def go_no(self):
"""Execute NO token purchase with position sizing"""
# Calculate position size
# Buy NO token
Optional methods :
def should_sell_yes(self) -> bool:
"""Exit YES position"""
# Return True to sell YES tokens
def should_sell_no(self) -> bool:
"""Exit NO position"""
# Return True to sell NO tokens
def on_market_resolution(self):
"""Handle market settlement"""
# Called when market resolves
# Settle P&L
Choose liquid markets :
High liquidity: >$50k volume
- Tight spreads
- Easy entry/exit
- Reliable pricing
Low liquidity: <$10k volume
- Wide spreads
- Difficult exits
- Slippage risk
Recommendation: Start with high-volume markets
Prefer clear resolution criteria :
GOOD: "Will BTC close above $100k at 5pm EST on Jan 1, 2025?"
- Objective resolution source (price data)
- Specific date and time
- No ambiguity
BAD: "Will crypto have a good year in 2025?"
- Subjective ("good" is undefined)
- Ambiguous resolution criteria
- Dispute risk
Avoid ambiguous outcomes :
Check resolution source:
- Data-driven (prices, scores, votes) → Good
- Subjective judgment → Bad
- "Community decides" → High dispute risk
Research past market resolutions:
- Were resolutions fair?
- Any disputed outcomes?
- Market maker credibility
Define clear probability thresholds :
Example: Probability arbitrage strategy
Entry logic:
- Buy YES if price <40% (undervalued)
- Buy NO if price <40% (YES >60%, overvalued)
Exit logic:
- Sell YES at 55% (15% profit target)
- Sell NO at 55% (symmetric)
- Stop loss at 25% (37.5% loss, preserve capital)
Include position sizing :
Fixed percentage:
- 5% of capital per market
- Max 10 simultaneous positions = 50% deployed
- Conservative, predictable
Kelly Criterion:
- Size based on edge and odds
- More aggressive, optimal growth
- Requires accurate probability estimation
Set exit criteria :
Profit targets:
- Sell at X% gain (e.g., 15% above entry)
Time-based exits:
- Close position Y hours before resolution
- Avoid last-minute volatility
Stop losses:
- Sell if price drops below Z% (e.g., 60% of entry)
- Preserve capital on wrong predictions
Position limits :
Per market: 5-10% of capital
- Limits single-market exposure
- Diversifies risk
Total exposure: 50-70% of capital
- Leaves cash buffer
- Allows for new opportunities
- Prevents overtrading
Market diversification :
Don't concentrate in one category:
- 3 crypto markets
- 2 politics markets
- 2 sports markets
→ Diversified across event types
Avoid:
- 10 BTC rolling markets
→ All correlated, high concentration risk
Liquidity monitoring :
Check before entry:
- Current volume
- Bid/ask spread
- Order book depth
If liquidity drops:
- May be unable to exit
- Accept mark-to-market loss
- Or hold until resolution
Goal : Find BTC rolling market trading opportunities
1. Browse crypto rolling markets:
get_all_prediction_events(market_category="crypto_rolling")
→ Lists BTC, ETH rolling markets with intervals
2. Check data availability:
get_data_availability(data_type="polymarket", asset="BTC")
→ Verify sufficient history for backtesting
3. Analyze specific market:
get_prediction_market_data(
condition_id="0x123...",
timeframe="1m",
limit=5000
)
→ Study YES/NO token price patterns
4. Identify strategy:
- YES token often overshoots (>60%)
- Mean reversion opportunity
- Buy NO when YES >65%, exit at 55%
5. Create strategy:
create_prediction_market_strategy(
strategy_name="BTCRollingMeanRev_M",
description="Buy NO token when YES >65%, exit at 55%..."
)
6. Backtest strategy:
run_prediction_market_backtest(
strategy_name="BTCRollingMeanRev_M",
asset="BTC",
interval="1h",
start_date="2024-01-01",
end_date="2024-12-31"
)
Cost : ~$2.50 ($0.003 data + $2.50 strategy creation)
Goal : Trade on election prediction market
1. Browse politics markets:
get_all_prediction_events(market_category="politics")
→ Find election markets
2. Analyze candidate X market:
get_prediction_market_data(condition_id="election_123")
→ Study YES token price leading up to election
3. Identify pattern:
- YES token very volatile
- Spikes on good news, drops on bad news
- Opportunities to buy dips, sell spikes
4. Create strategy:
create_prediction_market_strategy(
strategy_name="ElectionDipBuy_M",
description="Buy YES when price drops >15% in 24h,
sell when recovers to pre-drop level..."
)
5. Backtest (limited data for one-time events):
- May have insufficient data for thorough backtest
- Analyze manually or use similar past events
6. Trade carefully:
- Event markets have less data
- Higher uncertainty
- Start with smaller position sizes
Cost : ~$2.50
Goal : Build diversified prediction market portfolio
1. Identify multiple opportunities:
- BTC 1h rolling (crypto)
- Fed decision (economics)
- Championship game (sports)
2. Create strategies for each:
- Strategy 1: BTC rolling mean reversion
- Strategy 2: Fed decision probability arbitrage
- Strategy 3: Sports underdog value
3. Backtest all strategies:
run_prediction_market_backtest(...) for each
4. Allocate capital:
- BTC rolling: 15% (more data, higher confidence)
- Fed decision: 10% (one-time event, moderate confidence)
- Sports: 5% (less data, lower confidence)
Total: 30% deployed, 70% cash
5. Monitor performance:
- Track each strategy independently
- Rebalance based on results
- Stop underperformers
Cost : ~$7.50 (3 strategies)
Issue : get_all_prediction_events returns empty
Solutions :
active_only=False to see resolved marketsIssue : Not enough history for backtesting
Solutions :
Issue : Backtest shows losses
Solutions :
After creating prediction market strategies :
Test thoroughly :
test-trading-strategies for backtestingRefine strategies :
improve-trading-strategies to refineLive deployment (when supported):
deploy-live-trading when availableThis skill provides Polymarket prediction market trading :
Core principle : Prediction markets trade YES/NO tokens on real-world events. Success requires accurate probability estimation and disciplined risk management.
Best practices : Choose liquid markets with clear resolution criteria, diversify across event types, use proper position sizing (5-10% per market), set profit targets and stop losses.
Current limitation : Live deployment not yet supported. Use for backtesting and strategy development. Live trading will be available in future updates.
Note : Prediction markets are efficient. Beating them consistently is difficult. Start with simulation, validate edge thoroughly before risking capital (when live deployment available).
Weekly Installs
1
Repository
GitHub Stars
11
First Seen
1 day ago
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
zencoder1
amp1
cline1
openclaw1
opencode1
cursor1
通过 LiteLLM 代理让 Claude Code 对接 GitHub Copilot 运行 | 高级变通方案指南
29,800 周安装