PredictEdge

PredictEdge is an intelligent real-time scanner I built for prediction markets. It identifies profitable trading opportunities across Kalshi and Polymarket using advanced detection algorithms, AI-powered analysis with live web search, and a comprehensive backtesting system for validation.

9 opportunity detection types

  1. Cross-Platform Arbitrage — Exploit price differences between Kalshi and Polymarket for the same event
  2. Event Arbitrage — Group multiple related arbitrage opportunities by event for easier execution
  3. Intra-Market Arbitrage — Risk-free profits when YES ask + NO ask < 100¢ on the same market
  4. Multi-Outcome Analysis — Comprehensive 14-strategy analysis for events with multiple outcomes
  5. Thin Market Detection — Find illiquid markets with wide spreads and market-making opportunities
  6. Mispricing Detection — Identify markets with extreme prices relative to fair value
  7. Volume Spike Detection — Flag unusual trading activity that may indicate informed trading
  8. Time Decay Opportunities — Markets approaching expiration with prices far from expected resolution
  9. Pricing Curve Errors — Detect inverted pricing in cumulative threshold markets

AI-powered analysis

Each opportunity gets analyzed by Claude with real-time web search. The AI searches for recent news relevant to each market, then provides actionable trade setups with entry price, position size, exit targets, profit math, and risk assessment — complete with source citations. Every analysis is framed around a swing trading mindset with $50–200 position sizes.

For multi-outcome events, the system evaluates 14 different strategies: single NO underdog, single YES favorite, multi-leg baskets, pairs trades, longshot portfolios, cumulative threshold spreads, and more.

Quality scoring

Every opportunity gets a 0–100 quality score. Boost factors include catalyst potential (elections, Fed meetings, earnings), asymmetric pricing sweet spots, liquidity, and profit potential. Penalties hit coin-flip markets, wide spreads, low volume, and backward-looking data.

Backtesting & validation

The system runs a three-track validation approach:

  • Historical backtest — Test detection and scoring algorithms on historical market snapshots collected every 4 hours
  • Prospective AI tracking — Log predictions before resolution for honest accuracy metrics (Brier scores, calibration by probability bucket)
  • Performance analytics — Win rate, returns, and Sharpe ratio by opportunity type

Tech stack

  • Backend: Node.js, TypeScript, Express, better-sqlite3, Zod, Pino logging
  • Frontend: Next.js 14, React 18, TypeScript, Tailwind CSS
  • AI: Anthropic Claude with web search capability
  • Data: Kalshi API (authenticated, RSA-SHA256), Polymarket Gamma/CLOB API
  • Performance: Multi-level caching (2-min market, 5-min AI), progressive loading, inverted word index for cross-platform matching