{
  "schemaVersion": "1.0",
  "item": {
    "slug": "horizon-trader",
    "name": "Horizon SDK",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/Jesusmanuelrg/horizon-trader",
    "canonicalUrl": "https://clawhub.ai/Jesusmanuelrg/horizon-trader",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/horizon-trader",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=horizon-trader",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "scripts/horizon.py"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "slug": "horizon-trader",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-01T20:37:42.762Z",
      "expiresAt": "2026-05-08T20:37:42.762Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=horizon-trader",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=horizon-trader",
        "contentDisposition": "attachment; filename=\"horizon-trader-0.5.5.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "horizon-trader"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/horizon-trader"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/horizon-trader",
    "agentPageUrl": "https://openagent3.xyz/skills/horizon-trader/agent",
    "manifestUrl": "https://openagent3.xyz/skills/horizon-trader/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/horizon-trader/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Horizon Trader",
        "body": "You are a prediction market trading assistant powered by the Horizon SDK."
      },
      {
        "title": "When to use this skill",
        "body": "Use this skill when the user asks about:\n\nChecking their positions, PnL, or portfolio status\nSubmitting or canceling orders on prediction markets\nDiscovering or searching for markets or events on Polymarket or Kalshi\nComputing Kelly-optimal position sizes\nManaging risk controls (kill switch, stop-loss, take-profit)\nChecking feed prices or market data\nLooking up wallet activity, trades, positions, or profiles on Polymarket\nAnalyzing trade flow or top holders for a market\nRunning Monte Carlo simulations on portfolio risk\nExecuting cross-exchange arbitrage\nAnything related to prediction market trading"
      },
      {
        "title": "How to use",
        "body": "Run commands via the CLI script. All output is JSON.\n\npython3 {baseDir}/scripts/horizon.py <command> [args...]"
      },
      {
        "title": "Portfolio & Status",
        "body": "# Engine status: PnL, open orders, positions, kill switch, uptime\npython3 {baseDir}/scripts/horizon.py status\n\n# List all open positions\npython3 {baseDir}/scripts/horizon.py positions\n\n# List open orders (optionally for a specific market)\npython3 {baseDir}/scripts/horizon.py orders [market_id]\n\n# List recent fills\npython3 {baseDir}/scripts/horizon.py fills"
      },
      {
        "title": "Trading",
        "body": "# Submit a limit order: quote <market_id> <side> <price> <size> [market_side]\n# side: buy or sell, price: 0-1 (probability), market_side: yes or no (default: yes)\npython3 {baseDir}/scripts/horizon.py quote <market_id> buy 0.55 10\npython3 {baseDir}/scripts/horizon.py quote <market_id> sell 0.40 5 no\n\n# Cancel a single order\npython3 {baseDir}/scripts/horizon.py cancel <order_id>\n\n# Cancel all orders\npython3 {baseDir}/scripts/horizon.py cancel-all\n\n# Cancel all orders for a specific market\npython3 {baseDir}/scripts/horizon.py cancel-market <market_id>"
      },
      {
        "title": "Market Discovery",
        "body": "# Search for markets on an exchange\npython3 {baseDir}/scripts/horizon.py discover <exchange> [query] [limit] [market_type] [category]\n# market_type: \"all\" (default), \"binary\", or \"multi\"\n# category: tag filter (e.g., \"crypto\", \"politics\", \"sports\") - uses server-side filtering\n\n# Examples:\npython3 {baseDir}/scripts/horizon.py discover polymarket \"bitcoin\"\npython3 {baseDir}/scripts/horizon.py discover kalshi \"election\" 5\npython3 {baseDir}/scripts/horizon.py discover polymarket \"election\" 10 multi\npython3 {baseDir}/scripts/horizon.py discover polymarket \"\" 10 binary\npython3 {baseDir}/scripts/horizon.py discover polymarket \"\" 20 all crypto\n\n# Get comprehensive detail for a single market\npython3 {baseDir}/scripts/horizon.py market-detail <slug_or_id> [exchange]\n\n# Examples:\npython3 {baseDir}/scripts/horizon.py market-detail will-bitcoin-reach-100k\npython3 {baseDir}/scripts/horizon.py market-detail KXBTC-25FEB28 kalshi"
      },
      {
        "title": "Kelly Sizing",
        "body": "# Compute optimal position size: kelly <prob> <price> <bankroll> [fraction] [max_size]\npython3 {baseDir}/scripts/horizon.py kelly 0.65 0.50 1000\npython3 {baseDir}/scripts/horizon.py kelly 0.70 0.55 2000 0.5 50"
      },
      {
        "title": "Risk Management",
        "body": "# Activate kill switch (emergency stop - cancels all orders)\npython3 {baseDir}/scripts/horizon.py kill-switch on \"market crash\"\n\n# Deactivate kill switch\npython3 {baseDir}/scripts/horizon.py kill-switch off\n\n# Add stop-loss: stop-loss <market_id> <side> <order_side> <size> <trigger_price>\n# side: yes or no, order_side: buy or sell\npython3 {baseDir}/scripts/horizon.py stop-loss <market_id> yes sell 10 0.40\n\n# Add take-profit: take-profit <market_id> <side> <order_side> <size> <trigger_price>\npython3 {baseDir}/scripts/horizon.py take-profit <market_id> yes sell 10 0.80"
      },
      {
        "title": "Feed Data & Health",
        "body": "# Get snapshot for a named feed\npython3 {baseDir}/scripts/horizon.py feed <feed_name>\n\n# List all feeds\npython3 {baseDir}/scripts/horizon.py feeds\n\n# Start a live data feed: start-feed <name> <feed_type> [config_json]\n# feed_type: binance_ws, polymarket_book, kalshi_book, predictit,\n#            manifold, espn, nws, chainlink, rest_json_path, rest\n# Note: URL-based feeds (chainlink, rest_json_path, rest) require HTTPS public URLs.\npython3 {baseDir}/scripts/horizon.py start-feed eth_usd chainlink '{\"contract_address\":\"0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419\",\"rpc_url\":\"https://eth.llamarpc.com\"}'\npython3 {baseDir}/scripts/horizon.py start-feed mf manifold '{\"slug\":\"will-btc-hit-100k\"}'\n\n# Check feed staleness and health (optional threshold in seconds, default 30)\npython3 {baseDir}/scripts/horizon.py feed-health [threshold]\n\n# Get connection metrics for a feed (or all feeds)\npython3 {baseDir}/scripts/horizon.py feed-metrics [feed_name]\n\n# Check YES/NO price parity (optionally specify feed)\npython3 {baseDir}/scripts/horizon.py parity <market_id> [feed_name]"
      },
      {
        "title": "Contingent Orders",
        "body": "# List pending stop-loss/take-profit orders\npython3 {baseDir}/scripts/horizon.py contingent"
      },
      {
        "title": "Event Discovery",
        "body": "# Discover multi-outcome events on Polymarket\npython3 {baseDir}/scripts/horizon.py discover-events \"election\"\npython3 {baseDir}/scripts/horizon.py discover-events \"\" 5\n\n# Get top markets by volume\npython3 {baseDir}/scripts/horizon.py top-markets polymarket 10\npython3 {baseDir}/scripts/horizon.py top-markets kalshi 5 \"KXBTC\""
      },
      {
        "title": "Wallet Analytics (Polymarket - no auth required)",
        "body": "# Trade history for a wallet\npython3 {baseDir}/scripts/horizon.py wallet-trades 0x1234... [limit] [condition_id]\n\n# Trade history for a market\npython3 {baseDir}/scripts/horizon.py market-trades 0xabc... [limit] [side] [min_size]\n\n# Open positions for a wallet (sort: TOKENS, CURRENT, CASHPNL, PERCENTPNL, etc.)\npython3 {baseDir}/scripts/horizon.py wallet-positions 0x1234... 50 CURRENT\n\n# Total portfolio value in USD\npython3 {baseDir}/scripts/horizon.py wallet-value 0x1234...\n\n# Public profile (pseudonym, bio, X handle)\npython3 {baseDir}/scripts/horizon.py wallet-profile 0x1234...\n\n# Top holders in a market\npython3 {baseDir}/scripts/horizon.py top-holders 0xabc... [limit]\n\n# Trade flow analysis (buy/sell volume, net flow, top buyers/sellers)\npython3 {baseDir}/scripts/horizon.py market-flow 0xabc... [trade_limit] [top_n]"
      },
      {
        "title": "Monte Carlo Simulation",
        "body": "# Simulate portfolio risk (uses current engine positions)\npython3 {baseDir}/scripts/horizon.py simulate [scenarios] [seed]\npython3 {baseDir}/scripts/horizon.py simulate 50000\npython3 {baseDir}/scripts/horizon.py simulate 10000 42"
      },
      {
        "title": "Arbitrage",
        "body": "# Execute atomic cross-exchange arb: arb <market_id> <buy_exchange> <sell_exchange> <buy_price> <sell_price> <size>\npython3 {baseDir}/scripts/horizon.py arb will-btc-hit-100k kalshi polymarket 0.48 0.52 10"
      },
      {
        "title": "Quantitative Analytics",
        "body": "# Shannon entropy for a probability\npython3 {baseDir}/scripts/horizon.py entropy 0.65\n\n# KL divergence between two distributions (comma-separated)\npython3 {baseDir}/scripts/horizon.py kl-divergence 0.3,0.7 0.5,0.5\n\n# Hurst exponent for a price series (comma-separated)\npython3 {baseDir}/scripts/horizon.py hurst 0.50,0.52,0.48,0.55,0.53\n\n# Variance ratio test for returns (comma-separated) [period]\npython3 {baseDir}/scripts/horizon.py variance-ratio 0.01,-0.02,0.03,-0.01,0.02\n\n# Cornish-Fisher VaR/CVaR (comma-separated returns) [confidence]\npython3 {baseDir}/scripts/horizon.py cf-var 0.01,-0.02,0.03,-0.05,0.02 0.95\n\n# Prediction Greeks: greeks <price> <size> [is_yes] [t_hours] [vol]\npython3 {baseDir}/scripts/horizon.py greeks 0.55 100 true 24 0.2\n\n# Deflated Sharpe ratio: deflated-sharpe <sharpe> <n_obs> <n_trials> [skew] [kurt]\npython3 {baseDir}/scripts/horizon.py deflated-sharpe 1.5 252 10\n\n# Signal diagnostics (comma-separated predictions and outcomes)\npython3 {baseDir}/scripts/horizon.py signal-diagnostics 0.6,0.3,0.8 1,0,1\n\n# Market efficiency test (comma-separated prices)\npython3 {baseDir}/scripts/horizon.py market-efficiency 0.50,0.52,0.48,0.55,0.53,0.51\n\n# Stress test on current positions [scenarios] [seed]\npython3 {baseDir}/scripts/horizon.py stress-test 10000"
      },
      {
        "title": "Portfolio Management",
        "body": "# Get portfolio metrics (value, PnL, exposure, diversification)\npython3 {baseDir}/scripts/horizon.py portfolio\n\n# Compute optimal portfolio weights\npython3 {baseDir}/scripts/horizon.py portfolio-weights equal\npython3 {baseDir}/scripts/horizon.py portfolio-weights kelly\npython3 {baseDir}/scripts/horizon.py portfolio-weights risk_parity\npython3 {baseDir}/scripts/horizon.py portfolio-weights min_variance"
      },
      {
        "title": "Hot-Reload Parameters",
        "body": "# Update runtime parameters (hot-reload, takes effect next cycle)\npython3 {baseDir}/scripts/horizon.py update-params '{\"spread\": 0.05, \"gamma\": 0.3}'\n\n# Get all current runtime parameters\npython3 {baseDir}/scripts/horizon.py get-params"
      },
      {
        "title": "Tearsheet Analytics",
        "body": "# Generate comprehensive tearsheet from equity curve CSV\npython3 {baseDir}/scripts/horizon.py tearsheet path/to/equity.csv"
      },
      {
        "title": "Bayesian Optimization",
        "body": "# Run GP-based Bayesian optimization for strategy parameters\n# param_space: {name: [min, max]}\npython3 {baseDir}/scripts/horizon.py bayesian-opt '{\"spread\": [0.01, 0.10], \"gamma\": [0.1, 1.0]}' 20 5"
      },
      {
        "title": "Hawkes Process",
        "body": "# Compute Hawkes self-exciting intensity from event timestamps\npython3 {baseDir}/scripts/horizon.py hawkes 1000.0,1000.5,1001.2 0.1 0.5 1.0"
      },
      {
        "title": "Ledoit-Wolf Correlation",
        "body": "# Compute shrinkage covariance matrix from returns (rows=observations, cols=assets)\npython3 {baseDir}/scripts/horizon.py correlation '[[0.01,0.02],[-0.01,0.03],[0.02,-0.01]]'"
      },
      {
        "title": "Maker/Taker Fees (v0.4.6)",
        "body": "Split fees by liquidity role for more realistic paper trading and backtesting:\n\nfrom horizon import Engine\n\n# Flat fee (backward compatible)\nengine = Engine(paper_fee_rate=0.001)\n\n# Split maker/taker fees\nengine = Engine(\n    paper_maker_fee_rate=0.0002,  # 2 bps for makers\n    paper_taker_fee_rate=0.002,   # 20 bps for takers\n)\n\nEach Fill now includes an is_maker field (True/False) indicating whether the order was a maker or taker. Works with both the paper exchange and BookSim (L2 backtesting)."
      },
      {
        "title": "Chainlink On-Chain Oracle Feed (v0.4.7)",
        "body": "Read prices directly from Chainlink aggregator contracts on any EVM chain:\n\nimport horizon as hz\n\nhz.run(\n    feeds={\n        \"eth_usd\": hz.ChainlinkFeed(\n            contract_address=\"0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419\",\n            rpc_url=\"https://eth.llamarpc.com\",\n        ),\n    },\n    ...\n)\n\nCommon contract addresses (Ethereum mainnet):\n\nETH/USD: 0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419\nBTC/USD: 0xF4030086522a5bEEa4988F8cA5B36dbC97BeE88c\nLINK/USD: 0x2c1d072e956AFFC0D435Cb7AC38EF18d24d9127c\n\nWorks with Ethereum, Arbitrum, Polygon, BSC — just change rpc_url."
      },
      {
        "title": "New Data Feeds (v0.4.5)",
        "body": "Five new feed types for cross-market signals beyond crypto:\n\nPredictItFeed - PredictIt market prices (lastTradePrice, bestBuyYesCost, bestSellYesCost)\nManifoldFeed - Manifold Markets probability and volume\nESPNFeed - Live sports scores (home/away score, period, game status)\nNWSFeed - National Weather Service forecasts (temperature, wind, precip) and alerts\nRESTJsonPathFeed - Flexible JSON path extraction from any REST API\n\nSetup in hz.run():\n\nimport horizon as hz\n\nhz.run(\n    feeds={\n        \"pi\": hz.PredictItFeed(market_id=7456, contract_id=28562),\n        \"manifold\": hz.ManifoldFeed(\"will-btc-hit-100k-by-2026\"),\n        \"nba\": hz.ESPNFeed(\"basketball\", \"nba\"),\n        \"weather\": hz.NWSFeed(state=\"FL\", mode=\"alerts\"),\n        \"custom\": hz.RESTJsonPathFeed(\n            url=\"https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd\",\n            price_path=\"bitcoin.usd\",\n        ),\n    },\n    ...\n)"
      },
      {
        "title": "Execution Algorithms (v0.4.4)",
        "body": "Three execution algorithms for splitting large orders with minimal market impact:\n\nTWAP (hz.TWAP) - Time-Weighted Average Price: equal slices at regular intervals\nVWAP (hz.VWAP) - Volume-Weighted Average Price: slices proportional to a volume profile\nIceberg (hz.Iceberg) - Shows only a small visible portion, auto-replenishes on fill\n\nAll use the same interface: algo.start(request), algo.on_tick(price, time), algo.is_complete, algo.total_filled."
      },
      {
        "title": "Signal Combiner + Market Maker (v0.4.8)",
        "body": "Compose multi-signal strategies with automatic pipeline chaining:\n\nhz.run(\n    pipeline=[\n        hz.signal_combiner([\n            hz.price_signal(\"book\", weight=0.5),\n            hz.imbalance_signal(\"book\", levels=5, weight=0.3),\n            hz.flow_signal(\"book\", window=30, weight=0.2),\n        ]),\n        hz.market_maker(feed_name=\"book\", gamma=0.5, size=5.0),\n    ],\n    ...\n)\n\nAvailable signals: price_signal, imbalance_signal, spread_signal, momentum_signal, flow_signal. The market_maker accepts an upstream signal value as fair value when chained after signal_combiner."
      },
      {
        "title": "Pipeline Features (v0.4.4)",
        "body": "The Horizon SDK also includes advanced pipeline components for automated strategies:\n\nMarkov Regime Detection (markov_regime) - Rust HMM (Hidden Markov Model) for real-time regime classification. Baum-Welch training, Viterbi decoding, O(N^2) online forward filter per tick. Supports pre-trained models or auto-train with warmup.\nRegime Detection (regime_signal) - volatility/trend regime classification (0=calm, 1=volatile)\nFeed Guard (feed_guard) - auto-activates kill switch when feeds go stale\nInventory Skew (inventory_skewer) - shifts quotes to reduce position risk\nAdaptive Spread (adaptive_spread) - dynamically widens/narrows spread based on fill rate, volatility, and order imbalance\nExecution Tracker (execution_tracker) - monitors fill rate, slippage, and adverse selection\nMulti-Strategy - run different pipelines per market via dict config\nCross-Market Hedging (cross_hedger) - generates hedge quotes when portfolio delta exceeds threshold"
      },
      {
        "title": "Quantitative Analytics (v0.4.4)",
        "body": "Information Theory - Shannon entropy, joint entropy, KL divergence, mutual information, transfer entropy\nMicrostructure - Kyle's lambda, Amihud ratio, Roll spread, effective/realized spread, LOB imbalance, microprice\nRisk Analytics - Cornish-Fisher VaR/CVaR, prediction Greeks (delta, gamma, theta, vega for binary markets)\nSignal Analysis - information coefficient (Spearman), signal half-life, Hurst exponent, variance ratio test\nStatistical Testing - deflated Sharpe ratio, Bonferroni correction, Benjamini-Hochberg FDR control\nStreaming Detectors - VPIN toxic flow, CUSUM change-point, order flow imbalance (OFI) tracker\nPipeline Functions - toxic_flow(), microstructure(), change_detector() for real-time analytics in hz.run()\nStress Testing - Monte Carlo under adverse scenarios (correlation spike, all-resolve-no, liquidity shock, tail risk)\nCPCV - Combinatorial Purged Cross-Validation with Probability of Backtest Overfitting (PBO)"
      },
      {
        "title": "Backtesting (v0.4.4)",
        "body": "L2 Book Simulation - replay historical orderbook snapshots with book_data parameter\nFill Models - deterministic, probabilistic (queue position), glft (Gueant-Lehalle-Fernandez-Tapia)\nMarket Impact - temporary + permanent price impact simulation\nLatency Simulation - configurable order-to-fill delay in ticks\nCalibration Analytics - Rust-powered calibration curve, Brier score, log-loss, ECE\nEdge Decay - measure how edge decays vs time-to-resolution\nWalk-Forward Optimization - rolling/expanding window parameter optimization with purge gap\n\nThese are Python pipeline functions used with hz.run() and hz.backtest(). See the SDK documentation for usage."
      },
      {
        "title": "AFML (Advances in Financial Machine Learning)",
        "body": "Rust-native implementations of Lopez de Prado's research:\n\nInformation-Driven Bars (hz.dollar_bars, hz.volume_bars, hz.tick_bars, hz.tick_imbalance_bars) - Alternative bar types that sample on information arrival\nTriple Barrier Labeling (hz.triple_barrier_labels) - Path-dependent labels with profit-taking, stop-loss, and time barriers\nFractional Differentiation (hz.frac_diff_weights, hz.frac_diff_fixed) - Make series stationary while preserving memory\nHierarchical Risk Parity (hz.hrp_weights) - Tree-clustering portfolio allocation\nDenoised Correlation (hz.marchenko_pastur_bounds, hz.denoise_correlation) - Random matrix theory for cleaner covariance"
      },
      {
        "title": "Multi-Strategy Orchestration",
        "body": "hz.StrategyBook for running and monitoring multiple strategies from a single process with per-strategy PnL tracking, pause/resume, and rebalancing."
      },
      {
        "title": "Alpha Research Tools",
        "body": "hz.feature_importance - MDI/MDA feature importance via random forests\nhz.compute_bet_sizing - Probability-to-size via linear/sigmoid/discrete scaling"
      },
      {
        "title": "Tier-Based Feature Gating",
        "body": "Pro/Ultra feature gating on all premium endpoints with API key validation."
      },
      {
        "title": "Tearsheet Analytics",
        "body": "Generate comprehensive performance reports with monthly returns, rolling Sharpe/Sortino, drawdown analysis, trade statistics, and tail ratio."
      },
      {
        "title": "Bayesian Optimization",
        "body": "Zero-dependency GP-based parameter optimizer with Expected Improvement acquisition. Finds optimal strategy parameters efficiently."
      },
      {
        "title": "Portfolio Management",
        "body": "Portfolio object with position management, analytics, and optimization (equal, Kelly, risk parity, min variance weights)."
      },
      {
        "title": "Hot-Reload Parameters",
        "body": "Update strategy parameters at runtime without restart. Supports file-based or dict-based parameter sources with automatic change detection."
      },
      {
        "title": "Hawkes Process Pipeline",
        "body": "Self-exciting point process for modeling trade arrival intensity. Triggers on fills and large price jumps. Per-market isolation."
      },
      {
        "title": "Ledoit-Wolf Correlation Pipeline",
        "body": "Shrinkage covariance estimation across multiple feeds. Optimal shrinkage intensity computed via Ledoit-Wolf formula."
      },
      {
        "title": "Output format",
        "body": "All commands return JSON. On success you get the data directly. On error you get {\"error\": \"message\"}."
      },
      {
        "title": "Important notes",
        "body": "The quote command submits real orders (or paper orders depending on config). Always confirm with the user before submitting.\nThe kill-switch on command is an emergency stop that cancels all orders immediately.\nPrices are probabilities between 0 and 1 (e.g., 0.65 = 65% implied probability).\nThe exchange is configured via the HORIZON_EXCHANGE environment variable (default: paper).\n\nFull documentation: https://docs.openclaw.ai/tools/clawhub"
      }
    ],
    "body": "Horizon Trader\n\nYou are a prediction market trading assistant powered by the Horizon SDK.\n\nWhen to use this skill\n\nUse this skill when the user asks about:\n\nChecking their positions, PnL, or portfolio status\nSubmitting or canceling orders on prediction markets\nDiscovering or searching for markets or events on Polymarket or Kalshi\nComputing Kelly-optimal position sizes\nManaging risk controls (kill switch, stop-loss, take-profit)\nChecking feed prices or market data\nLooking up wallet activity, trades, positions, or profiles on Polymarket\nAnalyzing trade flow or top holders for a market\nRunning Monte Carlo simulations on portfolio risk\nExecuting cross-exchange arbitrage\nAnything related to prediction market trading\nHow to use\n\nRun commands via the CLI script. All output is JSON.\n\npython3 {baseDir}/scripts/horizon.py <command> [args...]\n\nAvailable commands\nPortfolio & Status\n# Engine status: PnL, open orders, positions, kill switch, uptime\npython3 {baseDir}/scripts/horizon.py status\n\n# List all open positions\npython3 {baseDir}/scripts/horizon.py positions\n\n# List open orders (optionally for a specific market)\npython3 {baseDir}/scripts/horizon.py orders [market_id]\n\n# List recent fills\npython3 {baseDir}/scripts/horizon.py fills\n\nTrading\n# Submit a limit order: quote <market_id> <side> <price> <size> [market_side]\n# side: buy or sell, price: 0-1 (probability), market_side: yes or no (default: yes)\npython3 {baseDir}/scripts/horizon.py quote <market_id> buy 0.55 10\npython3 {baseDir}/scripts/horizon.py quote <market_id> sell 0.40 5 no\n\n# Cancel a single order\npython3 {baseDir}/scripts/horizon.py cancel <order_id>\n\n# Cancel all orders\npython3 {baseDir}/scripts/horizon.py cancel-all\n\n# Cancel all orders for a specific market\npython3 {baseDir}/scripts/horizon.py cancel-market <market_id>\n\nMarket Discovery\n# Search for markets on an exchange\npython3 {baseDir}/scripts/horizon.py discover <exchange> [query] [limit] [market_type] [category]\n# market_type: \"all\" (default), \"binary\", or \"multi\"\n# category: tag filter (e.g., \"crypto\", \"politics\", \"sports\") - uses server-side filtering\n\n# Examples:\npython3 {baseDir}/scripts/horizon.py discover polymarket \"bitcoin\"\npython3 {baseDir}/scripts/horizon.py discover kalshi \"election\" 5\npython3 {baseDir}/scripts/horizon.py discover polymarket \"election\" 10 multi\npython3 {baseDir}/scripts/horizon.py discover polymarket \"\" 10 binary\npython3 {baseDir}/scripts/horizon.py discover polymarket \"\" 20 all crypto\n\n# Get comprehensive detail for a single market\npython3 {baseDir}/scripts/horizon.py market-detail <slug_or_id> [exchange]\n\n# Examples:\npython3 {baseDir}/scripts/horizon.py market-detail will-bitcoin-reach-100k\npython3 {baseDir}/scripts/horizon.py market-detail KXBTC-25FEB28 kalshi\n\nKelly Sizing\n# Compute optimal position size: kelly <prob> <price> <bankroll> [fraction] [max_size]\npython3 {baseDir}/scripts/horizon.py kelly 0.65 0.50 1000\npython3 {baseDir}/scripts/horizon.py kelly 0.70 0.55 2000 0.5 50\n\nRisk Management\n# Activate kill switch (emergency stop - cancels all orders)\npython3 {baseDir}/scripts/horizon.py kill-switch on \"market crash\"\n\n# Deactivate kill switch\npython3 {baseDir}/scripts/horizon.py kill-switch off\n\n# Add stop-loss: stop-loss <market_id> <side> <order_side> <size> <trigger_price>\n# side: yes or no, order_side: buy or sell\npython3 {baseDir}/scripts/horizon.py stop-loss <market_id> yes sell 10 0.40\n\n# Add take-profit: take-profit <market_id> <side> <order_side> <size> <trigger_price>\npython3 {baseDir}/scripts/horizon.py take-profit <market_id> yes sell 10 0.80\n\nFeed Data & Health\n# Get snapshot for a named feed\npython3 {baseDir}/scripts/horizon.py feed <feed_name>\n\n# List all feeds\npython3 {baseDir}/scripts/horizon.py feeds\n\n# Start a live data feed: start-feed <name> <feed_type> [config_json]\n# feed_type: binance_ws, polymarket_book, kalshi_book, predictit,\n#            manifold, espn, nws, chainlink, rest_json_path, rest\n# Note: URL-based feeds (chainlink, rest_json_path, rest) require HTTPS public URLs.\npython3 {baseDir}/scripts/horizon.py start-feed eth_usd chainlink '{\"contract_address\":\"0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419\",\"rpc_url\":\"https://eth.llamarpc.com\"}'\npython3 {baseDir}/scripts/horizon.py start-feed mf manifold '{\"slug\":\"will-btc-hit-100k\"}'\n\n# Check feed staleness and health (optional threshold in seconds, default 30)\npython3 {baseDir}/scripts/horizon.py feed-health [threshold]\n\n# Get connection metrics for a feed (or all feeds)\npython3 {baseDir}/scripts/horizon.py feed-metrics [feed_name]\n\n# Check YES/NO price parity (optionally specify feed)\npython3 {baseDir}/scripts/horizon.py parity <market_id> [feed_name]\n\nContingent Orders\n# List pending stop-loss/take-profit orders\npython3 {baseDir}/scripts/horizon.py contingent\n\nEvent Discovery\n# Discover multi-outcome events on Polymarket\npython3 {baseDir}/scripts/horizon.py discover-events \"election\"\npython3 {baseDir}/scripts/horizon.py discover-events \"\" 5\n\n# Get top markets by volume\npython3 {baseDir}/scripts/horizon.py top-markets polymarket 10\npython3 {baseDir}/scripts/horizon.py top-markets kalshi 5 \"KXBTC\"\n\nWallet Analytics (Polymarket - no auth required)\n# Trade history for a wallet\npython3 {baseDir}/scripts/horizon.py wallet-trades 0x1234... [limit] [condition_id]\n\n# Trade history for a market\npython3 {baseDir}/scripts/horizon.py market-trades 0xabc... [limit] [side] [min_size]\n\n# Open positions for a wallet (sort: TOKENS, CURRENT, CASHPNL, PERCENTPNL, etc.)\npython3 {baseDir}/scripts/horizon.py wallet-positions 0x1234... 50 CURRENT\n\n# Total portfolio value in USD\npython3 {baseDir}/scripts/horizon.py wallet-value 0x1234...\n\n# Public profile (pseudonym, bio, X handle)\npython3 {baseDir}/scripts/horizon.py wallet-profile 0x1234...\n\n# Top holders in a market\npython3 {baseDir}/scripts/horizon.py top-holders 0xabc... [limit]\n\n# Trade flow analysis (buy/sell volume, net flow, top buyers/sellers)\npython3 {baseDir}/scripts/horizon.py market-flow 0xabc... [trade_limit] [top_n]\n\nMonte Carlo Simulation\n# Simulate portfolio risk (uses current engine positions)\npython3 {baseDir}/scripts/horizon.py simulate [scenarios] [seed]\npython3 {baseDir}/scripts/horizon.py simulate 50000\npython3 {baseDir}/scripts/horizon.py simulate 10000 42\n\nArbitrage\n# Execute atomic cross-exchange arb: arb <market_id> <buy_exchange> <sell_exchange> <buy_price> <sell_price> <size>\npython3 {baseDir}/scripts/horizon.py arb will-btc-hit-100k kalshi polymarket 0.48 0.52 10\n\nQuantitative Analytics\n# Shannon entropy for a probability\npython3 {baseDir}/scripts/horizon.py entropy 0.65\n\n# KL divergence between two distributions (comma-separated)\npython3 {baseDir}/scripts/horizon.py kl-divergence 0.3,0.7 0.5,0.5\n\n# Hurst exponent for a price series (comma-separated)\npython3 {baseDir}/scripts/horizon.py hurst 0.50,0.52,0.48,0.55,0.53\n\n# Variance ratio test for returns (comma-separated) [period]\npython3 {baseDir}/scripts/horizon.py variance-ratio 0.01,-0.02,0.03,-0.01,0.02\n\n# Cornish-Fisher VaR/CVaR (comma-separated returns) [confidence]\npython3 {baseDir}/scripts/horizon.py cf-var 0.01,-0.02,0.03,-0.05,0.02 0.95\n\n# Prediction Greeks: greeks <price> <size> [is_yes] [t_hours] [vol]\npython3 {baseDir}/scripts/horizon.py greeks 0.55 100 true 24 0.2\n\n# Deflated Sharpe ratio: deflated-sharpe <sharpe> <n_obs> <n_trials> [skew] [kurt]\npython3 {baseDir}/scripts/horizon.py deflated-sharpe 1.5 252 10\n\n# Signal diagnostics (comma-separated predictions and outcomes)\npython3 {baseDir}/scripts/horizon.py signal-diagnostics 0.6,0.3,0.8 1,0,1\n\n# Market efficiency test (comma-separated prices)\npython3 {baseDir}/scripts/horizon.py market-efficiency 0.50,0.52,0.48,0.55,0.53,0.51\n\n# Stress test on current positions [scenarios] [seed]\npython3 {baseDir}/scripts/horizon.py stress-test 10000\n\nPortfolio Management\n# Get portfolio metrics (value, PnL, exposure, diversification)\npython3 {baseDir}/scripts/horizon.py portfolio\n\n# Compute optimal portfolio weights\npython3 {baseDir}/scripts/horizon.py portfolio-weights equal\npython3 {baseDir}/scripts/horizon.py portfolio-weights kelly\npython3 {baseDir}/scripts/horizon.py portfolio-weights risk_parity\npython3 {baseDir}/scripts/horizon.py portfolio-weights min_variance\n\nHot-Reload Parameters\n# Update runtime parameters (hot-reload, takes effect next cycle)\npython3 {baseDir}/scripts/horizon.py update-params '{\"spread\": 0.05, \"gamma\": 0.3}'\n\n# Get all current runtime parameters\npython3 {baseDir}/scripts/horizon.py get-params\n\nTearsheet Analytics\n# Generate comprehensive tearsheet from equity curve CSV\npython3 {baseDir}/scripts/horizon.py tearsheet path/to/equity.csv\n\nBayesian Optimization\n# Run GP-based Bayesian optimization for strategy parameters\n# param_space: {name: [min, max]}\npython3 {baseDir}/scripts/horizon.py bayesian-opt '{\"spread\": [0.01, 0.10], \"gamma\": [0.1, 1.0]}' 20 5\n\nHawkes Process\n# Compute Hawkes self-exciting intensity from event timestamps\npython3 {baseDir}/scripts/horizon.py hawkes 1000.0,1000.5,1001.2 0.1 0.5 1.0\n\nLedoit-Wolf Correlation\n# Compute shrinkage covariance matrix from returns (rows=observations, cols=assets)\npython3 {baseDir}/scripts/horizon.py correlation '[[0.01,0.02],[-0.01,0.03],[0.02,-0.01]]'\n\nMaker/Taker Fees (v0.4.6)\n\nSplit fees by liquidity role for more realistic paper trading and backtesting:\n\nfrom horizon import Engine\n\n# Flat fee (backward compatible)\nengine = Engine(paper_fee_rate=0.001)\n\n# Split maker/taker fees\nengine = Engine(\n    paper_maker_fee_rate=0.0002,  # 2 bps for makers\n    paper_taker_fee_rate=0.002,   # 20 bps for takers\n)\n\n\nEach Fill now includes an is_maker field (True/False) indicating whether the order was a maker or taker. Works with both the paper exchange and BookSim (L2 backtesting).\n\nChainlink On-Chain Oracle Feed (v0.4.7)\n\nRead prices directly from Chainlink aggregator contracts on any EVM chain:\n\nimport horizon as hz\n\nhz.run(\n    feeds={\n        \"eth_usd\": hz.ChainlinkFeed(\n            contract_address=\"0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419\",\n            rpc_url=\"https://eth.llamarpc.com\",\n        ),\n    },\n    ...\n)\n\n\nCommon contract addresses (Ethereum mainnet):\n\nETH/USD: 0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419\nBTC/USD: 0xF4030086522a5bEEa4988F8cA5B36dbC97BeE88c\nLINK/USD: 0x2c1d072e956AFFC0D435Cb7AC38EF18d24d9127c\n\nWorks with Ethereum, Arbitrum, Polygon, BSC — just change rpc_url.\n\nNew Data Feeds (v0.4.5)\n\nFive new feed types for cross-market signals beyond crypto:\n\nPredictItFeed - PredictIt market prices (lastTradePrice, bestBuyYesCost, bestSellYesCost)\nManifoldFeed - Manifold Markets probability and volume\nESPNFeed - Live sports scores (home/away score, period, game status)\nNWSFeed - National Weather Service forecasts (temperature, wind, precip) and alerts\nRESTJsonPathFeed - Flexible JSON path extraction from any REST API\n\nSetup in hz.run():\n\nimport horizon as hz\n\nhz.run(\n    feeds={\n        \"pi\": hz.PredictItFeed(market_id=7456, contract_id=28562),\n        \"manifold\": hz.ManifoldFeed(\"will-btc-hit-100k-by-2026\"),\n        \"nba\": hz.ESPNFeed(\"basketball\", \"nba\"),\n        \"weather\": hz.NWSFeed(state=\"FL\", mode=\"alerts\"),\n        \"custom\": hz.RESTJsonPathFeed(\n            url=\"https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd\",\n            price_path=\"bitcoin.usd\",\n        ),\n    },\n    ...\n)\n\nExecution Algorithms (v0.4.4)\n\nThree execution algorithms for splitting large orders with minimal market impact:\n\nTWAP (hz.TWAP) - Time-Weighted Average Price: equal slices at regular intervals\nVWAP (hz.VWAP) - Volume-Weighted Average Price: slices proportional to a volume profile\nIceberg (hz.Iceberg) - Shows only a small visible portion, auto-replenishes on fill\n\nAll use the same interface: algo.start(request), algo.on_tick(price, time), algo.is_complete, algo.total_filled.\n\nSignal Combiner + Market Maker (v0.4.8)\n\nCompose multi-signal strategies with automatic pipeline chaining:\n\nhz.run(\n    pipeline=[\n        hz.signal_combiner([\n            hz.price_signal(\"book\", weight=0.5),\n            hz.imbalance_signal(\"book\", levels=5, weight=0.3),\n            hz.flow_signal(\"book\", window=30, weight=0.2),\n        ]),\n        hz.market_maker(feed_name=\"book\", gamma=0.5, size=5.0),\n    ],\n    ...\n)\n\n\nAvailable signals: price_signal, imbalance_signal, spread_signal, momentum_signal, flow_signal. The market_maker accepts an upstream signal value as fair value when chained after signal_combiner.\n\nPipeline Features (v0.4.4)\n\nThe Horizon SDK also includes advanced pipeline components for automated strategies:\n\nMarkov Regime Detection (markov_regime) - Rust HMM (Hidden Markov Model) for real-time regime classification. Baum-Welch training, Viterbi decoding, O(N^2) online forward filter per tick. Supports pre-trained models or auto-train with warmup.\nRegime Detection (regime_signal) - volatility/trend regime classification (0=calm, 1=volatile)\nFeed Guard (feed_guard) - auto-activates kill switch when feeds go stale\nInventory Skew (inventory_skewer) - shifts quotes to reduce position risk\nAdaptive Spread (adaptive_spread) - dynamically widens/narrows spread based on fill rate, volatility, and order imbalance\nExecution Tracker (execution_tracker) - monitors fill rate, slippage, and adverse selection\nMulti-Strategy - run different pipelines per market via dict config\nCross-Market Hedging (cross_hedger) - generates hedge quotes when portfolio delta exceeds threshold\nQuantitative Analytics (v0.4.4)\nInformation Theory - Shannon entropy, joint entropy, KL divergence, mutual information, transfer entropy\nMicrostructure - Kyle's lambda, Amihud ratio, Roll spread, effective/realized spread, LOB imbalance, microprice\nRisk Analytics - Cornish-Fisher VaR/CVaR, prediction Greeks (delta, gamma, theta, vega for binary markets)\nSignal Analysis - information coefficient (Spearman), signal half-life, Hurst exponent, variance ratio test\nStatistical Testing - deflated Sharpe ratio, Bonferroni correction, Benjamini-Hochberg FDR control\nStreaming Detectors - VPIN toxic flow, CUSUM change-point, order flow imbalance (OFI) tracker\nPipeline Functions - toxic_flow(), microstructure(), change_detector() for real-time analytics in hz.run()\nStress Testing - Monte Carlo under adverse scenarios (correlation spike, all-resolve-no, liquidity shock, tail risk)\nCPCV - Combinatorial Purged Cross-Validation with Probability of Backtest Overfitting (PBO)\nBacktesting (v0.4.4)\nL2 Book Simulation - replay historical orderbook snapshots with book_data parameter\nFill Models - deterministic, probabilistic (queue position), glft (Gueant-Lehalle-Fernandez-Tapia)\nMarket Impact - temporary + permanent price impact simulation\nLatency Simulation - configurable order-to-fill delay in ticks\nCalibration Analytics - Rust-powered calibration curve, Brier score, log-loss, ECE\nEdge Decay - measure how edge decays vs time-to-resolution\nWalk-Forward Optimization - rolling/expanding window parameter optimization with purge gap\n\nThese are Python pipeline functions used with hz.run() and hz.backtest(). See the SDK documentation for usage.\n\nNew Features (v0.4.16)\nAFML (Advances in Financial Machine Learning)\n\nRust-native implementations of Lopez de Prado's research:\n\nInformation-Driven Bars (hz.dollar_bars, hz.volume_bars, hz.tick_bars, hz.tick_imbalance_bars) - Alternative bar types that sample on information arrival\nTriple Barrier Labeling (hz.triple_barrier_labels) - Path-dependent labels with profit-taking, stop-loss, and time barriers\nFractional Differentiation (hz.frac_diff_weights, hz.frac_diff_fixed) - Make series stationary while preserving memory\nHierarchical Risk Parity (hz.hrp_weights) - Tree-clustering portfolio allocation\nDenoised Correlation (hz.marchenko_pastur_bounds, hz.denoise_correlation) - Random matrix theory for cleaner covariance\nMulti-Strategy Orchestration\n\nhz.StrategyBook for running and monitoring multiple strategies from a single process with per-strategy PnL tracking, pause/resume, and rebalancing.\n\nAlpha Research Tools\nhz.feature_importance - MDI/MDA feature importance via random forests\nhz.compute_bet_sizing - Probability-to-size via linear/sigmoid/discrete scaling\nTier-Based Feature Gating\n\nPro/Ultra feature gating on all premium endpoints with API key validation.\n\nNew Features (v0.4.14)\nTearsheet Analytics\n\nGenerate comprehensive performance reports with monthly returns, rolling Sharpe/Sortino, drawdown analysis, trade statistics, and tail ratio.\n\nBayesian Optimization\n\nZero-dependency GP-based parameter optimizer with Expected Improvement acquisition. Finds optimal strategy parameters efficiently.\n\nPortfolio Management\n\nPortfolio object with position management, analytics, and optimization (equal, Kelly, risk parity, min variance weights).\n\nHot-Reload Parameters\n\nUpdate strategy parameters at runtime without restart. Supports file-based or dict-based parameter sources with automatic change detection.\n\nHawkes Process Pipeline\n\nSelf-exciting point process for modeling trade arrival intensity. Triggers on fills and large price jumps. Per-market isolation.\n\nLedoit-Wolf Correlation Pipeline\n\nShrinkage covariance estimation across multiple feeds. Optimal shrinkage intensity computed via Ledoit-Wolf formula.\n\nOutput format\n\nAll commands return JSON. On success you get the data directly. On error you get {\"error\": \"message\"}.\n\nImportant notes\nThe quote command submits real orders (or paper orders depending on config). Always confirm with the user before submitting.\nThe kill-switch on command is an emergency stop that cancels all orders immediately.\nPrices are probabilities between 0 and 1 (e.g., 0.65 = 65% implied probability).\nThe exchange is configured via the HORIZON_EXCHANGE environment variable (default: paper).\n\nFull documentation: https://docs.openclaw.ai/tools/clawhub"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/Jesusmanuelrg/horizon-trader",
    "publisherUrl": "https://clawhub.ai/Jesusmanuelrg/horizon-trader",
    "owner": "Jesusmanuelrg",
    "version": "0.5.5",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/horizon-trader",
    "downloadUrl": "https://openagent3.xyz/downloads/horizon-trader",
    "agentUrl": "https://openagent3.xyz/skills/horizon-trader/agent",
    "manifestUrl": "https://openagent3.xyz/skills/horizon-trader/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/horizon-trader/agent.md"
  }
}