← 返回
未分类 Key 中文

Threshold Trader

Automatically trades prediction markets when prices deviate beyond your configured probability threshold with Kelly Criterion sizing and safety checks.
当价格偏离您设定的概率阈值时,自动交易预测市场,结合凯利准则确定仓位大小并实施安全检查。
skybinjf skybinjf 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 305
下载
💾 0
安装
1
版本
#latest

概述

Threshold Trader

A simple probability-threshold trading skill for prediction markets. Trades when market prices diverge from your configured probability threshold by a minimum edge amount.

> This is a template. The default signal is a fixed probability threshold — remix it with your own model predictions, external data feeds, or custom signals. The skill handles all the plumbing (market discovery, trade execution, safeguards). Your agent provides the alpha.

How It Works

  1. Monitor Markets: Scans active markets on your configured venue (Polymarket or sim)
  2. Check Threshold: Compares current market price against your configured probability
  3. Calculate Edge: Only trades when edge exceeds minimum threshold (default 3%)
  4. Position Sizing: Uses Kelly Criterion-based sizing for optimal stake amounts
  5. Safety Checks: Reviews flip-flop warnings, slippage estimates, and edge analysis before executing
  6. Auto-Redeem: Automatically collects payouts from resolved markets

Configuration

Configure via environment variables:

  • THRESHOLD_PROBABILITY: Your probability estimate (0.0-1.0). Default: 0.70
  • TRADE_SIDE: Which side to trade ("YES" or "NO"). Default: "YES"
  • SIMMER_VENUE: Trading venue ("sim" for paper, "polymarket" for real). Default: "sim"
  • SIMMER_MIN_EV: Minimum edge to trade (0.0-1.0). Default: 0.03 (3%)
  • SIMMER_KELLY_MULTIPLIER: Kelly fraction (0.0-1.0). Default: 0.25
  • MAX_POSITION_SIZE: Maximum position size in USD. Default: 100.0

Usage

Install the skill:

npx clawhub@latest install threshold-trader

Set your credentials and configuration:

export SIMMER_API_KEY="your-api-key-here"
export THRESHOLD_PROBABILITY="0.65"
export TRADE_SIDE="YES"
export SIMMER_VENUE="sim"  # or "polymarket" for real money

Run manually:

python threshold_trader.py

Or let the automaton run it every 15 minutes (configured in clawhub.json).

Remixing

The core logic is in should_trade() — swap the fixed threshold for:

  • Your ML model: Replace THRESHOLD_PROBABILITY with model predictions
  • External APIs: Fetch signals from news feeds, social sentiment, or market data
  • Multi-market strategies: Scan correlations across related markets
  • Event-driven: React to external triggers (sports scores, election results)

The skill handles position sizing, safety checks, execution, and redemption. You focus on the signal.

Safety Features

  • Flip-flop detection: Skips trades if you've been reversing positions too frequently
  • Slippage protection: Avoids illiquid markets with high slippage
  • Edge validation: Only trades when expected value exceeds threshold
  • Dry-run default: Paper trades unless you explicitly pass --live

Examples

Paper trade YES when probability is above 70%:

export THRESHOLD_PROBABILITY="0.70"
export TRADE_SIDE="YES"
python threshold_trader.py

Real money trade NO when probability is below 30%:

export THRESHOLD_PROBABILITY="0.30"
export TRADE_SIDE="NO"
export SIMMER_VENUE="polymarket"
python threshold_trader.py --live

Requirements


name: threshold-trader

description: Simple probability-threshold trading skill. Trades when market prices diverge from your configured threshold. Remixable template for custom signals.

metadata:

author: "Simmer Community"

version: "1.0.0"

displayName: "Threshold Trader"

difficulty: "beginner"


版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-08 01:18 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

professional

A股量化 AkShare

mbpz
A股量化数据分析工具,基于AkShare库获取A股行情、财务数据、板块信息等。用于回答关于A股股票查询、行情数据、财务分析、选股等问题。
★ 194 📥 63,094
professional

Stock Analysis

udiedrichsen
{"answer":"基于雅虎财经数据,分析股票与加密货币。支持投资组合管理、自选股预警、股息分析、8维评分、热门趋势扫描及传闻/早期信号探测。适用于股票分析、持仓追踪、财报异动、加密监控、热门股追踪或提前发掘非主流传闻。"}
★ 278 📥 57,733
ai-agent

Kalshi Politics Random Buyer Publish

skybinjf
干运行Kalshi技能,查找政治相关市场,随机抽取有效候选人,执行Simmer上下文检查,并提出不实际下单的交易计划。
★ 0 📥 398