Skip to main content
Pro Feature. Requires a Pro or Ultra subscription. Latency Arb and Composite Scanner require Ultra. Get started at api.mathematicalcompany.com

Arbitrage Methods

Horizon provides 8 arbitrage methods covering every exploitable inefficiency in prediction markets. Methods are organized in tiers from basic same-exchange parity to expert composite meta-scanning.

Tier Progression

TierMethodWhat It DoesTier Required
1Parity ArbYES + NO on same exchange < $1.00Pro
1Cross-Exchange ArbBuy low on exchange A, sell high on BPro
2Multi-Outcome ArbN outcomes sum != $1.00Pro
2Spread ConvergenceMean-reversion between correlated marketsPro
3Statistical ArbCointegration-based pairs tradingPro
3MM ArbQuote on one exchange, hedge on anotherPro
4Latency ArbFast feed detects moves before book updatesUltra
4Composite ScannerMeta-scanner scoring all methodsUltra

Which Method to Use

Same-exchange mispricing?

Use Parity Arb - guaranteed profit when YES + NO asks sum to less than $1.00.

Price differs across exchanges?

Use Cross-Exchange Arb - buy on the cheap exchange, sell on the expensive one.

Multi-outcome event mispriced?

Use Multi-Outcome Arb - buy or sell all outcomes when they don’t sum to $1.00.

Two markets move together?

Use Spread Convergence (simple) or Stat Arb (rigorous) to trade mean-reversion.

Want to earn spread + hedge?

Use MM Arb - market-make on one exchange, hedge delta on another.

Want speed edge?

Use Latency Arb - front-run slow book updates with fast external feeds.

Run everything at once?

Use Composite Scanner - scores all methods and routes capital to the best.

Quick Start

import horizon as hz

# Tier 1: Parity arb - guaranteed profit
parity = hz.parity_arb_scanner(
    "election-winner",
    exchange="polymarket",
    feed_name="polymarket",
    auto_execute=True,
)

# Tier 1: Cross-exchange arb
cross = hz.arb_scanner(
    "election-winner",
    exchanges=["polymarket", "kalshi"],
    feed_map={"polymarket": "polymarket", "kalshi": "kalshi"},
    auto_execute=True,
)

# Tier 2: Spread convergence
spread = hz.spread_convergence(
    "gop-senate", "gop-house",
    "gop_senate_feed", "gop_house_feed",
    entry_zscore=2.0, auto_execute=True,
)

# Run all together
hz.run(
    name="arb_suite",
    exchanges=[
        hz.Polymarket(private_key="0x..."),
        hz.Kalshi(api_key="..."),
    ],
    markets=["election-winner"],
    feeds={
        "polymarket": hz.PolymarketBook("election-winner"),
        "kalshi": hz.KalshiBook("KXELECTION-25"),
        "gop_senate_feed": hz.PolymarketBook("gop-senate"),
        "gop_house_feed": hz.PolymarketBook("gop-house"),
    },
    pipeline=[parity, cross, spread],
    interval=0.5,
)

Architecture

All arbitrage methods share:
  • Rust core for detection (src/parity.rs) - branchless hot-path computation
  • Engine methods for scanning and execution with atomic rollback
  • Python pipeline functions compatible with hz.run()
  • Cooldown timers to prevent over-trading
  • Result storage in ctx.params for downstream inspection
The module is structured as a Python package (horizon.arb) with backward-compatible re-exports:
# All of these work:
from horizon import arb_scanner, parity_arb_scanner, stat_arb
from horizon.arb import arb_scanner, parity_arb_scanner
from horizon.arb._parity import parity_arb_scanner  # internal
Arbitrage in live prediction markets involves real financial risk. Paper-test all strategies thoroughly before deploying with real capital. Atomic rollback cannot guarantee cancel success on live exchanges if orders were already filled.