Arbitrage Detection

Automatically detect and execute arbitrage opportunities across Polymarket and Kalshi when price discrepancies exceed transaction costs.


Overview

Arbitrage trading exploits price differences for the same event across multiple platforms. When Polymarket shows 45% probability for an outcome and Kalshi shows 52%, a risk-free profit opportunity exists.

Key Concepts

Arbitrage Spread: Price difference between platforms

Spread = |Polymarket_Price - Kalshi_Price|

Profit Calculation:

Theoretical_Profit = Spread * Position_Size - Total_Fees

Execution Criteria:

if Spread > (Platform_Fees + Slippage + Minimum_Profit):
    execute_arbitrage()

Strategy Components

1. Market Discovery

Find equivalent markets across platforms:


2. Spread Calculation

Calculate arbitrage profitability:

Example Calculation:

Output:


3. Automated Execution

Implement continuous monitoring:


4. Running the Strategy

Expected output:


Risk Management

Position Sizing

Execution Risks

  1. Price Movement Risk

    • Market moves between detection and execution

    • Mitigation: Fast execution (<5 seconds), limit orders

  2. Partial Fill Risk

    • First trade executes, second fails

    • Mitigation: Check liquidity before execution, atomic swaps (future)

  3. Slippage Risk

    • Actual execution price worse than expected

    • Mitigation: Conservative profit threshold, slippage tolerance

  4. Platform Downtime

    • One platform unavailable during execution

    • Mitigation: Pre-check platform status, fallback to manual


Advanced Features

Multi-Market Arbitrage

Historical Backtesting


Performance Metrics

Based on production usage (March 2026):

Metric
Value

Average Spread

4.2%

Execution Success Rate

94.3%

Average Profit per Trade

$12.50

Trades per Day

3-7 (depends on market volatility)

Monthly ROI

2.5%-4.5%


Troubleshooting

Issue: No Arbitrage Opportunities Found

Causes:

  • Markets efficient (spreads < fees)

  • Insufficient liquidity

  • Price convergence

Solutions:

  • Lower min_spread threshold (test 3-4%)

  • Monitor more market categories

  • Increase check frequency

Issue: First Trade Executes, Second Fails

Causes:

  • Insufficient balance on second platform

  • Market moved unfavorably

  • Platform API error

Solutions:

  • Pre-fund both platforms equally

  • Use limit orders with tighter spreads

  • Implement rollback logic



Support

Questions about arbitrage strategies? [email protected]envelope

Last updated