Polymarket Valuation Divergence

v1.0.0

Trade Polymarket markets based on valuation divergence. When your probability model differs from Polymarket's price by >threshold, enter using Kelly sizing....

0· 136·0 current·0 all-time
byAD88@adlai88

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for adlai88/polymarket-valuation-divergence.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Polymarket Valuation Divergence" (adlai88/polymarket-valuation-divergence) from ClawHub.
Skill page: https://clawhub.ai/adlai88/polymarket-valuation-divergence
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Required env vars: SIMMER_API_KEY
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install polymarket-valuation-divergence

ClawHub CLI

Package manager switcher

npx clawhub@latest install polymarket-valuation-divergence
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
medium confidence
Purpose & Capability
Name/description claim to trade Polymarket using a probability model; code uses a SimmerClient (simmer_sdk) and requires SIMMER_API_KEY to fetch markets, portfolio, and place trades. The requested credential is appropriate for the stated trading purpose.
Instruction Scope
SKILL.md and the code confine actions to scanning markets, computing edges, sizing with Kelly, and executing trades. The skill exposes hooks to call arbitrary external forecast APIs (via fetch_json) and an option (--no-safeguards) that disables internal checks. Those extension points are intentional for model customization but expand the agent's ability to fetch external data and change trading behavior; review edits to get_model_probability and avoid enabling --no-safeguards for live runs unless you understand risks.
Install Mechanism
There is no automated install spec included (no package/install step). SKILL.md metadata references pip dependency 'simmer-sdk' but the registry metadata didn't include an install step — you must ensure simmer-sdk is installed in the runtime environment. No network downloads or obscure URLs are present in the bundle itself.
Credentials
Only SIMMER_API_KEY is declared as required; the code uses it to instantiate a trading client, which is proportionate for a trading skill. Some optional env vars (SIMMER_VALUATION_*, TRADING_VENUE) are used but not listed in the top-level registry requires block — this is operationally acceptable but worth noting.
Persistence & Privilege
always:false and user-invocable:true (standard). The agent is allowed to invoke the skill autonomously by default (disable-model-invocation:false), which is platform normal — but because this skill can place real trades, granting autonomous invocation increases blast radius. Prefer manual invocation or strict ACLs for live trading keys.
Assessment
This skill appears to do what it says: it uses the Simmer SDK and your SIMMER_API_KEY to scan markets and place Kelly-sized trades. Before using it live: 1) Install and inspect the simmer-sdk dependency and run the script in dry-run mode to confirm behavior. 2) Treat SIMMER_API_KEY like a trading credential — verify its permissions (prefer read-only or restricted keys for testing). 3) Do not enable --no-safeguards unless you understand consequences. 4) If you customize get_model_probability to call external APIs, review the calls so the skill doesn’t leak sensitive data to unknown endpoints. 5) Consider disabling autonomous invocation or restricting the agent from running live trades until you’ve tested thoroughly.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

💹 Clawdis
EnvSIMMER_API_KEY
latestvk971qdszy6n23x0atc26696fms83j3s0
136downloads
0stars
1versions
Updated 1mo ago
v1.0.0
MIT-0

Polymarket Valuation Divergence Trader

Trade markets where model probability diverges from Polymarket price.

This is a template. The default uses Simmer AI consensus as your probability model. Remix it with your own model, external APIs, or custom forecasting logic. The skill handles market scanning, Kelly sizing, and safe trade execution.

When to Use This Skill

Use this when:

  • You have a probability model (AI, statistical, fundamental analysis)
  • You want to trade when market prices diverge from your model
  • You need Kelly criterion sizing for risk management
  • You want to catch structural mispricings (mergers, earnings, regulatory events)

Quick Start

Setup

  1. Set your API key:

    export SIMMER_API_KEY=sk_live_...
    
  2. Check config:

    python valuation_trader.py --config
    
  3. Dry run (no trades):

    python valuation_trader.py
    
  4. Live trading:

    python valuation_trader.py --live
    

Configuration

SettingEnv VarDefaultDescription
edge_thresholdSIMMER_VALUATION_EDGE0.015Min edge to trade (1.5%)
kelly_fractionSIMMER_VALUATION_KELLY0.25Kelly criterion fraction (cap at 25%)
max_position_usdSIMMER_VALUATION_MAX_POSITION5.00Max per trade
max_trades_per_runSIMMER_VALUATION_MAX_TRADES5Max trades per cycle
probability_sourceSIMMER_VALUATION_SOURCEsimmer_ai"simmer_ai" or "user_model"

Update settings:

python valuation_trader.py --set edge_threshold=0.02

How It Works

1. Scan Markets

Fetches active markets from Simmer. For each:

2. Get Model Probability

Default: Simmer AI consensus from /api/sdk/context/{market_id}

To use your own model: Edit get_model_probability() function.

3. Calculate Edge

edge = model_probability - market_price

If edge > threshold: trade signal ✓

4. Kelly Sizing

kelly_fraction = edge / (1 - market_price)
kelly_fraction = min(kelly_fraction, MAX_KELLY)
position_size = kelly_fraction * bankroll
position_size = min(position_size, max_position_usd)

5. Execute Trade

  • If edge > 0: Buy YES (model thinks it's underpriced)
  • If edge < 0: Buy NO (model thinks it's overpriced)
  • Include reasoning for transparency
  • Execute with safeguards (flip-flop detection, slippage warnings)

6. Hold to Resolution

Positions held until market resolves. Check --positions to see current holdings.

Interpreting the Output

🎯 Valuation Trader Scan
   Markets scanned: 50
   Signals found: 3
   Executed: 2

📰 BTC hits $100k by EOY?
   Model: 65% | Market: 52% | Edge: +13%
   💰 BUY YES $4.50 (Kelly: 2.25 shares)

📰 Will Trump win in 2028?
   Model: 58% | Market: 71% | Edge: -13%
   💰 BUY NO $3.75 (Kelly: 2.05 shares)

Customizing Your Model

Edit get_model_probability() to use any source:

Option 1: User-provided probabilities (config)

def get_model_probability(market_id, market_question):
    # Return fixed probability from config
    return USER_PROBABILITIES.get(market_id)

Option 2: External API (e.g., Synth, Metaculus)

def get_model_probability(market_id, market_question):
    # Fetch forecast from external API
    resp = fetch_json(f"{EXTERNAL_API}/forecast?q={market_question}")
    return resp["probability"]

Option 3: Rules-based model

def get_model_probability(market_id, market_question):
    if "crypto" in market_question.lower():
        return 0.55  # Crypto has historical upside
    elif "election" in market_question.lower():
        return 0.50  # No strong signal on elections
    return None  # Skip if no model

Commands

# Dry run (simulate trades, no real execution)
python valuation_trader.py

# Live trading
python valuation_trader.py --live

# Show current positions
python valuation_trader.py --positions

# Show config
python valuation_trader.py --config

# Update config
python valuation_trader.py --set edge_threshold=0.02

# Quiet mode (cron-friendly)
python valuation_trader.py --live --quiet

Risk Management

  • Position size cap: max_position_usd limits each trade
  • Kelly fraction cap: Limited to 25% of bankroll (never bet >25% on one trade)
  • Trade limit: max_trades_per_run prevents over-trading
  • Safeguards: Simmer SDK checks for flip-flop warnings, slippage, expiring positions
  • --no-safeguards: Skip checks (use only if you know what you're doing)

Troubleshooting

"No signals found"

  • Model probabilities and market prices are close
  • Increase edge_threshold in config if too conservative
  • Check your model source — is it generating probabilities?

"Markets scanned: 0"

  • No active markets available
  • Try during peak market hours

"Edge is negative but we're buying YES"

  • This is correct! Edge < 0 means market is overpriced. Buy NO instead (which we do).

"Flip-flop warning: CAUTION"

  • You recently changed direction on this market
  • Discipline tracking prevents over-trading. Wait or use --no-safeguards.

Performance Metrics

Check your performance:

python valuation_trader.py --positions

Shows: realized P&L, win rate, average edge per trade, largest positions.

When This Works Best

  1. Structural mispricings: Merger arb, earnings surprises, regulatory news
  2. Consensus divergence: Market hasn't caught up to known information
  3. Model > crowd: Your probability model is better than crowd estimates
  4. Short-dated markets: Errors correct faster

When This Doesn't Work

  1. Crowd is right: Market prices reflect true probabilities
  2. Model is calibrated wrong: Your probability estimates are worse than market
  3. Latency: By the time you execute, price moved against you
  4. Liquidity: Slippage eats the edge on illiquid markets

Start small. Test with dry-run first. Verify your model against historical outcomes. Then go live with small position sizes.

Comments

Loading comments...