Skip to main content
Pro Feature. Requires a Pro or Ultra subscription. Get started at api.mathematicalcompany.com

Multi-Outcome Arbitrage

When an event has N outcomes (e.g., 4 candidates in an election), the sum of all YES prices should equal $1.00. If it doesn’t, there’s an arbitrage opportunity.

How It Works

  • Sum < $1.00 - fees: Buy all outcomes. One will resolve to $1.00, so you profit the difference.
  • Sum > $1.00 + fees: Sell all outcomes (buy all NOs). You collect more than $1.00 upfront.

Engine Methods

scan_event_arb

execute_event_arb

N-leg atomic execution. If any leg fails, all prior legs are canceled. When proportional=True: cheaper outcomes get more contracts so cost is balanced across legs.

Pipeline: event_arb_scanner

Stores EventArbitrageOpportunity in ctx.params["last_event_arb"].

One-Shot: event_arb_sweep

Returns EventArbResult or None.

EventArbResult

Register events with engine.register_event(event_id, market_ids) before scanning. Each market needs a corresponding feed for price data.

Logical Arb Scanners

Beyond price-sum arbitrage, Horizon detects logical relationship violations between related markets.

hz.implication_arb_scanner

For markets where A implies B (e.g., “Biden wins” implies “Democrat wins”), the price of A must be less than or equal to the price of B. Violations are arbs.

hz.contradiction_arb_scanner

For mutually exclusive markets (e.g., “Trump wins” and “Biden wins”), the sum of prices must be at most 1.0. If P(A) + P(B) > 1, sell both.