# Horizon SDK ## Docs - [ACD Duration Models](https://mathematicalcompany.mintlify.app/acd-durations.md): Autoregressive Conditional Duration models for inter-event timing analysis in prediction markets. - [Advanced Orders](https://mathematicalcompany.mintlify.app/advanced-orders.md): Stop-loss, take-profit, bracket orders, OCO linking, and order amendment. - [Adversarial Simulation](https://mathematicalcompany.mintlify.app/adversarial-simulation.md): Test strategy robustness against adversarial agents. Whale attacks, front-running, spoofing, and liquidity draining. Vulnerability scoring and anti-fragile optimization. - [Alpha Research](https://mathematicalcompany.mintlify.app/alpha-research.md): Meta-labeling, feature importance, alpha decay tracking, and PnL attribution for systematic strategy research. - [Horizon Engine API](https://mathematicalcompany.mintlify.app/api-reference/engine.md): Complete Engine API reference: construction, multi-exchange, orders, fills, feeds, persistence. - [Horizon Types Reference](https://mathematicalcompany.mintlify.app/api-reference/types.md): All Rust types exposed to Python via PyO3: enums, Quote, Market, Order, Position, Fill, and more. - [Arbitrage](https://mathematicalcompany.mintlify.app/arbitrage.md): 8 arbitrage methods from basic parity to expert composite scanning, organized in tier progression. - [Composite Scanner](https://mathematicalcompany.mintlify.app/arbitrage/composite.md): Meta-scanner that scores all arbitrage methods and routes capital to the best opportunities. - [Cross-Exchange Arb](https://mathematicalcompany.mintlify.app/arbitrage/cross-exchange.md): Atomic cross-exchange arbitrage with auto-rollback, pipeline scanner, and one-shot sweep. - [Latency Arb](https://mathematicalcompany.mintlify.app/arbitrage/latency.md): Front-run slow prediction market book updates using fast external feeds. - [MM Arb](https://mathematicalcompany.mintlify.app/arbitrage/mm-arb.md): Quote on one exchange and hedge on another for delta-neutral spread capture. - [Multi-Outcome Arb](https://mathematicalcompany.mintlify.app/arbitrage/multi-outcome.md): Event-level arbitrage when N outcome prices don't sum to $1.00. - [Parity Arb](https://mathematicalcompany.mintlify.app/arbitrage/parity.md): Same-exchange YES + NO arbitrage when combined asks cost less than $1.00. - [Spread Convergence](https://mathematicalcompany.mintlify.app/arbitrage/spread-convergence.md): Mean-reversion trading between two correlated prediction markets. - [Statistical Arb](https://mathematicalcompany.mintlify.app/arbitrage/stat-arb.md): Cointegration-based pairs trading with OLS hedge ratio, ADF test, and half-life filtering. - [Horizon Architecture](https://mathematicalcompany.mintlify.app/architecture.md): System design, component overview, and design principles behind the Horizon SDK. - [ASCII Plotting](https://mathematicalcompany.mintlify.app/ascii-plotting.md): Terminal-native chart rendering for CLI tools, Claude Code, and headless environments - [Authentication](https://mathematicalcompany.mintlify.app/authentication.md): Set up your Horizon API key to use the SDK. - [Agent Framework](https://mathematicalcompany.mintlify.app/autonomous/agent-framework.md): MCP tools, decision framework, and natural language interface for autonomous LLM operation. - [Autonomous Decision Loop](https://mathematicalcompany.mintlify.app/autonomous/decision-loop.md): The meta-loop: research, hypothesize, backtest, deploy, monitor, improve. - [Execution Intelligence](https://mathematicalcompany.mintlify.app/autonomous/execution-intelligence.md): Feedback loops that measure and improve execution quality over time. - [Explainability and Self-Tuning](https://mathematicalcompany.mintlify.app/autonomous/explainability.md): Rich structured explanations for MCP tools, adaptive confidence thresholds, and built-in backtesting. - [Fund Operations](https://mathematicalcompany.mintlify.app/autonomous/fund-operations.md): Alerts, double-entry ledger, paper-to-live promotion, and self-healing recovery. - [Fund Portfolio Manager](https://mathematicalcompany.mintlify.app/autonomous/fund-portfolio.md): Fund-level NAV tracking, capital allocation, drawdown management, and accounting. - [Knowledge Graph](https://mathematicalcompany.mintlify.app/autonomous/knowledge-graph.md): SQLite graph store for markets, events, and their relationships. - [Market Intelligence](https://mathematicalcompany.mintlify.app/autonomous/market-intelligence.md): Market fitness scoring, resolution settlement, event calendar, and universe management. - [Multi-Fund Orchestration](https://mathematicalcompany.mintlify.app/autonomous/multi-fund.md): Run multiple funds as a cluster with cross-fund risk monitoring and capital rebalancing. - [Overview](https://mathematicalcompany.mintlify.app/autonomous/overview.md): Infrastructure that lets an LLM operate a trading fund end-to-end. Prediction markets, equities, options, crypto. - [Quant Flow](https://mathematicalcompany.mintlify.app/autonomous/quant-flow.md): Institutional-grade decision loop: regime detection, alpha modeling, hypothesis testing, signal ensemble, portfolio optimization, and performance attribution. - [Research Agent](https://mathematicalcompany.mintlify.app/autonomous/react-agent.md): Queries fund subsystems and the knowledge graph, produces structured reports. - [Risk Budgeting](https://mathematicalcompany.mintlify.app/autonomous/risk-budgeting.md): Fund-level VaR budgets, cross-strategy correlation, and dynamic risk allocation. - [Graph Memory](https://mathematicalcompany.mintlify.app/autonomous/sim-graph.md): Records backtest and live events to the knowledge graph for persistent strategy memory. - [Strategy Lifecycle](https://mathematicalcompany.mintlify.app/autonomous/strategy-lifecycle.md): Programmatic deployment, monitoring, scaling, A/B testing, and retirement of strategies. - [Swarm](https://mathematicalcompany.mintlify.app/autonomous/swarm.md): Autonomous quant agent swarm. A Hive orchestrates agent workflows, a circuit breaker enforces hard limits. Works with any LLM via OpenRouter. - [Full Tutorial](https://mathematicalcompany.mintlify.app/autonomous/tutorial.md): Step-by-step guide to running an autonomous prediction market fund with Horizon. - [Backtesting](https://mathematicalcompany.mintlify.app/backtesting.md): Backtest strategies with hz.backtest() - L2 orderbook simulation, fill models, market impact, calibration, walk-forward optimization, and tearsheet analytics. - [Bars & Labeling](https://mathematicalcompany.mintlify.app/bars-labeling.md): Information-driven bars, triple barrier labeling, CUSUM filter, and meta-labels from Advances in Financial Machine Learning. - [Belief-Volatility Surface](https://mathematicalcompany.mintlify.app/belief-volatility.md): Streaming belief-volatility estimation with online EM decomposition into diffusion and jump components. The prediction market analog of implied vol. - [Bootstrap Methods](https://mathematicalcompany.mintlify.app/bootstrap-methods.md): Non-parametric confidence intervals and hypothesis testing for prediction market edge estimation. 11 bootstrap variants + jackknife bias correction. - [Breeden-Litzenberger](https://mathematicalcompany.mintlify.app/breeden-litzenberger.md): Extract risk-neutral probability densities from options chains and compute cross-asset edge signals for prediction markets. - [Calendar Events](https://mathematicalcompany.mintlify.app/calendar-events.md): Integrate economic calendar events (FOMC, CPI) into trading pipelines. Time-decay sizing, event countdown, and pre-event risk reduction. - [Change Point Detection](https://mathematicalcompany.mintlify.app/change-point-detection.md): Bayesian Online Change Point Detection (BOCPD) for real-time regime shifts, structural breaks, and probability resets in prediction markets. - [Characteristic Function Pricing](https://mathematicalcompany.mintlify.app/char-function-pricing.md): Heston, Merton Jump-Diffusion, and Variance Gamma models for binary option pricing via characteristic function inversion. Rust-native with Python pipeline integration. - [CLI](https://mathematicalcompany.mintlify.app/cli.md): Run strategies, query positions, and manage the engine from the command line. - [Cloud Deploy](https://mathematicalcompany.mintlify.app/cloud-deploy.md): Deploy, monitor, and manage strategies on the Horizon Cloud platform directly from the SDK. Full lifecycle from code to live trading. - [Data Collector](https://mathematicalcompany.mintlify.app/collector.md): Persistent point-in-time market data archiving - [Compliance](https://mathematicalcompany.mintlify.app/compliance.md): Regulatory compliance module for prediction market trading - audit trails, surveillance, RBAC, approval workflows, and reporting. - [Configuration](https://mathematicalcompany.mintlify.app/configuration.md): Environment variables, exchange credentials, hot-reload parameters, and logging configuration. - [Copula Dependence](https://mathematicalcompany.mintlify.app/copula-dependence.md): Bivariate copula fitting, selection, and sampling for modeling prediction market dependence structures. - [Copy-Trading](https://mathematicalcompany.mintlify.app/copy-trading.md): Automatically copy trades from Polymarket whale wallets with size scaling, position limits, and inverse (fade) mode. - [Horizon Context](https://mathematicalcompany.mintlify.app/core-concepts/context.md): The Context object injected into every Horizon pipeline function with live data. - [Horizon hz.run()](https://mathematicalcompany.mintlify.app/core-concepts/hz-run.md): The single entry point for running a Horizon strategy. - [Horizon Pipeline Composition](https://mathematicalcompany.mintlify.app/core-concepts/pipeline.md): Build Horizon strategies by chaining pipeline functions with automatic signature introspection. - [Horizon Risk Pipeline](https://mathematicalcompany.mintlify.app/core-concepts/risk.md): The 8-point risk pipeline that guards every Horizon order before it reaches the exchange. - [Correlation Regime](https://mathematicalcompany.mintlify.app/correlation-regime.md): Live correlation matrices, regime shift detection, contagion scoring, and decorrelation analysis across prediction markets. - [Cross-Impact Matrix](https://mathematicalcompany.mintlify.app/cross-impact.md): Estimate how trading in one market moves prices in correlated markets. Rust-native cross-impact estimation for multi-market strategies. - [Cross-Venue Liquidity](https://mathematicalcompany.mintlify.app/cross-venue-liquidity.md): Aggregate orderbooks across exchanges. Smart order routing, best venue selection, and cross-venue market making. - [Dashboard](https://mathematicalcompany.mintlify.app/dashboard.md): Real-time TUI dashboard for monitoring strategies with Textual. Live feeds, positions, orders, and PnL. - [Market Discovery](https://mathematicalcompany.mintlify.app/discovery.md): Search and discover markets on Polymarket, Kalshi, Limitless, Alpaca, and IBKR. Find markets by keyword, category, volume, and more. Returns Market objects ready for hz.run(). - [Elastic Net Selection](https://mathematicalcompany.mintlify.app/elastic-net-selection.md): Elastic net, lasso, and ridge regression for feature selection and signal construction in prediction market trading pipelines. - [Entropy Pooling](https://mathematicalcompany.mintlify.app/entropy-pooling.md): Meucci's entropy pooling for blending subjective views with market-implied probabilities. Rust-native convex optimization with Python pipeline integration. - [Equity Trading](https://mathematicalcompany.mintlify.app/equities.md): Trade stocks and ETFs with the same engine, pipeline, and risk system used for prediction markets. - [Evolutionary Optimizer](https://mathematicalcompany.mintlify.app/evolutionary-optimizer.md): Production-grade genetic algorithm engine with 6 selection methods, NSGA-II multi-objective optimization, island model parallelism, and adaptive mutation. Inspired by the Darwin SDK and the ProFiT framework. - [Advanced Backtesting](https://mathematicalcompany.mintlify.app/examples/advanced-backtest.md): L2 book simulation with probabilistic fills, market impact, latency, regime detection, calibration analytics, and walk-forward optimization. - [Alpha Research Pipeline](https://mathematicalcompany.mintlify.app/examples/alpha-research-pipeline.md): Triple-barrier labeling, feature importance, alpha decay tracking, and PnL attribution. - [Horizon Backtesting Example](https://mathematicalcompany.mintlify.app/examples/backtesting.md): Backtest a market-making strategy on historical data with full analytics. - [Horizon Bracket Orders](https://mathematicalcompany.mintlify.app/examples/bracket-orders.md): Protect positions with stop-loss, take-profit, and bracket orders using OCO linking. - [Horizon Cross-Exchange Arbitrage](https://mathematicalcompany.mintlify.app/examples/cross-exchange-arb.md): Monitor the same event on Polymarket and Kalshi, exploiting price divergence. - [Galaxy Whale Discovery](https://mathematicalcompany.mintlify.app/examples/galaxy-whale-hunter.md): Discover, cluster, and hunt profitable wallets across the Polymarket galaxy. - [Horizon GLFT Market Maker](https://mathematicalcompany.mintlify.app/examples/glft-mm.md): Full pipeline: Black-Scholes binary pricing, spread-based toxicity, GLFT adverse selection spread. - [Full Hedge Fund Workflow](https://mathematicalcompany.mintlify.app/examples/hedge-fund-workflow.md): End-to-end prediction market strategy: discovery, research, backtesting, calibration, risk tuning, live deployment with monitoring. - [Horizon Kalshi Market Maker](https://mathematicalcompany.mintlify.app/examples/kalshi-mm.md): Black-Scholes binary pricing on a short-dated Kalshi contract. - [Horizon Kelly Criterion](https://mathematicalcompany.mintlify.app/examples/kelly-sizing.md): Optimal position sizing with Kelly criterion functions. - [Maker/Taker Fee Comparison](https://mathematicalcompany.mintlify.app/examples/maker-taker-fees.md): Compare flat fees vs split maker/taker fees and see how fee structure affects backtest P&L. - [MCP Portfolio Assistant](https://mathematicalcompany.mintlify.app/examples/mcp-portfolio-assistant.md): Use the Horizon MCP server to build an AI-powered portfolio management workflow in Claude Code. - [Microstructure-Aware Market Maker](https://mathematicalcompany.mintlify.app/examples/microstructure-mm.md): Use VPIN, order flow imbalance, and structural break detection to make smarter quotes. - [Multi-Outcome Arbitrage](https://mathematicalcompany.mintlify.app/examples/multi-outcome-arb.md): Exploit mispriced multi-outcome events where outcome prices don't sum to $1.00. - [OpenClaw Telegram Trading Bot](https://mathematicalcompany.mintlify.app/examples/openclaw-telegram-bot.md): Trade prediction markets from Telegram using the Horizon OpenClaw skill. - [Oracle Edge Scanner](https://mathematicalcompany.mintlify.app/examples/oracle-edge-scanner.md): Multi-signal forecasting and edge detection across prediction markets. - [Parity Arbitrage Scanner](https://mathematicalcompany.mintlify.app/examples/parity-arb-scanner.md): Scan for YES + NO < $1.00 on the same exchange for guaranteed profit. - [Quant Swarm](https://mathematicalcompany.mintlify.app/examples/quant-swarm.md): Deploy multiple autonomous agents that research, discover alpha, backtest, deploy capital, trade, and self-manage, coordinated by a central fund cluster. - [Regime-Adaptive Market Maker](https://mathematicalcompany.mintlify.app/examples/regime-adaptive-strategy.md): HMM-based regime detection that adjusts quoting behavior for calm, volatile, and crisis markets. - [Sentinel Portfolio Risk Monitor](https://mathematicalcompany.mintlify.app/examples/sentinel-risk-monitor.md): Real-time portfolio risk monitoring with graduated drawdown response and hedge suggestions. - [Signal-Driven Market Maker](https://mathematicalcompany.mintlify.app/examples/signal-driven-mm.md): Combine multiple signals with adaptive spread and Kelly sizing. - [Horizon Simple Market Maker](https://mathematicalcompany.mintlify.app/examples/simple-mm.md): The simplest possible Horizon strategy: fixed fair value with a fixed spread. - [Sports & Weather Feeds](https://mathematicalcompany.mintlify.app/examples/sports-weather-feeds.md): Trade sports and weather prediction markets using ESPN, NWS, and Chainlink feeds. - [Statistical Arb Pairs Trading](https://mathematicalcompany.mintlify.app/examples/stat-arb-pairs.md): Cointegration-based pairs trading between correlated prediction markets. - [Stealth Large Order Execution](https://mathematicalcompany.mintlify.app/examples/stealth-large-order.md): Execute large orders with minimal market impact using adaptive algorithms. - [Stock Hedge Strategy](https://mathematicalcompany.mintlify.app/examples/stock-hedge-strategy.md): Complete example: hedging a Fed rate prediction with TLT bond ETF. - [Portfolio Stress Testing](https://mathematicalcompany.mintlify.app/examples/stress-test-portfolio.md): Monte Carlo stress testing with built-in and custom scenarios. - [Horizon Execution Algorithms](https://mathematicalcompany.mintlify.app/examples/twap-execution.md): Execute large orders with TWAP, VWAP, and Iceberg algorithms. - [Wallet Intelligence Scout](https://mathematicalcompany.mintlify.app/examples/wallet-scout.md): Full wallet analysis: scoring, pattern detection, profiling, and bot scanning. - [Whale Copy-Trading Bot](https://mathematicalcompany.mintlify.app/examples/whale-copy-trader.md): Score wallets, pick the best, and copy their trades at configurable scale. - [Horizon + Alpaca](https://mathematicalcompany.mintlify.app/exchanges/alpaca.md): Trade stocks and ETFs on Alpaca Markets. Commission-free equities with paper and live modes. - [Horizon + Coinbase](https://mathematicalcompany.mintlify.app/exchanges/coinbase.md): Trade crypto on Coinbase Advanced Trade for spot and cross-asset strategies. - [Horizon + Hyperliquid](https://mathematicalcompany.mintlify.app/exchanges/hyperliquid.md): Trade perpetual futures and spot on Hyperliquid's L1 chain with wallet-based auth. - [Horizon + Interactive Brokers](https://mathematicalcompany.mintlify.app/exchanges/interactive-brokers.md): Trade stocks, options, futures, and ForecastEx event contracts on Interactive Brokers. - [Horizon + Kalshi](https://mathematicalcompany.mintlify.app/exchanges/kalshi.md): Trade on Kalshi with Horizon, a US-regulated (CFTC) prediction market. - [Horizon + Limitless](https://mathematicalcompany.mintlify.app/exchanges/limitless.md): Trade on Limitless, a prediction market on Base (chain ID 8453). - [Horizon Exchanges](https://mathematicalcompany.mintlify.app/exchanges/overview.md): Horizon's exchange model: prediction markets, crypto, stocks, and multi-exchange support. - [Horizon Paper Exchange](https://mathematicalcompany.mintlify.app/exchanges/paper.md): Local simulated exchange with tick-based order matching for Horizon strategy development. - [Horizon + Polymarket](https://mathematicalcompany.mintlify.app/exchanges/polymarket.md): Trade on Polymarket with Horizon, the largest prediction market on Polygon. - [Horizon + Robinhood](https://mathematicalcompany.mintlify.app/exchanges/robinhood.md): Trade crypto on Robinhood for commission-free execution alongside prediction markets. - [Execution Algorithms](https://mathematicalcompany.mintlify.app/execution-algos.md): TWAP, VWAP, and Iceberg algorithms for intelligent order splitting with minimal market impact. - [Data Feeds](https://mathematicalcompany.mintlify.app/feeds.md): Live price data from Binance, Polymarket, Kalshi, Chainlink, Alpaca, Coinbase, Robinhood, IBKR, PredictIt, Manifold, ESPN, NWS, Treasury, Calendar, and custom REST APIs. - [Fractional Differentiation](https://mathematicalcompany.mintlify.app/fracdiff.md): Make price series stationary while preserving memory, from Advances in Financial Machine Learning Ch. 5. - [Graph Analysis](https://mathematicalcompany.mintlify.app/graph-analysis.md): Correlation graphs, minimum spanning trees, community detection, and contagion risk analysis for prediction market networks. - [HJB Market Making](https://mathematicalcompany.mintlify.app/hjb-market-making.md): Avellaneda-Stoikov and Gueant-Lehalle-Fernandez-Tapia HJB-based optimal market making with inventory control. Rust-native finite-difference solver with Python pipeline integration. - [HRP & Denoising](https://mathematicalcompany.mintlify.app/hrp-denoising.md): Hierarchical Risk Parity allocation and Marcenko-Pastur covariance denoising from Machine Learning for Asset Managers. - [Horizon + Cala](https://mathematicalcompany.mintlify.app/integrations/cala.md): Use Cala's AI research platform for deep market research and analysis alongside Horizon strategies. - [Claude Code](https://mathematicalcompany.mintlify.app/integrations/claude-code.md): Add Horizon to Claude Code and trade prediction markets, equities, and options from your terminal. - [Claude Desktop](https://mathematicalcompany.mintlify.app/integrations/claude-desktop.md): Add Horizon to Claude Desktop for conversational trading across prediction markets, equities, and options. - [CLI](https://mathematicalcompany.mintlify.app/integrations/cli.md): Trade prediction markets, equities, options, and crypto. Discover opportunities and manage funds from the command line. - [Cursor / Windsurf / VS Code](https://mathematicalcompany.mintlify.app/integrations/cursor.md): Add Horizon as an MCP server in Cursor, Windsurf, or VS Code for AI-assisted trading. - [MCP Server](https://mathematicalcompany.mintlify.app/integrations/mcp-server.md): Run Horizon as an MCP server for Claude Code, Cursor, Windsurf, VS Code, and Claude Desktop. - [OpenClaw Skill](https://mathematicalcompany.mintlify.app/integrations/openclaw.md): Trade prediction markets from WhatsApp, Telegram, Discord, and Slack through the OpenClaw bot framework. - [AI Agent Integrations](https://mathematicalcompany.mintlify.app/integrations/overview.md): Connect Horizon to AI agents - trade prediction markets, equities, options, and crypto through natural language in Claude Code, Cursor, Claude Desktop, WhatsApp, Telegram, and more. - [Horizon SDK](https://mathematicalcompany.mintlify.app/introduction.md): Trading SDK. Rust core, Python interface. Prediction markets, equities, options, crypto. - [Microstructure Invariance](https://mathematicalcompany.mintlify.app/invariance.md): Kyle-Obizhaeva market microstructure invariance: bet sizing, trading activity, and informed trade detection. - [Kalman Filters](https://mathematicalcompany.mintlify.app/kalman-filters.md): Linear and nonlinear state estimation for real-time tracking, hedge ratio estimation, and spread trading in prediction markets. - [Kelly Criterion](https://mathematicalcompany.mintlify.app/kelly.md): Optimal position sizing for prediction markets, equities, options, and crypto with Rust-native Kelly criterion functions. Single, fractional, multi-asset, and liquidity-adjusted Kelly. - [Lead-Lag Networks](https://mathematicalcompany.mintlify.app/lead-lag-networks.md): Detect lead-lag relationships between prediction markets using Hayashi-Yoshida correlation, cross-correlation analysis, Granger causality, and network construction. - [LLM Signal Engine](https://mathematicalcompany.mintlify.app/llm.md): LLM-powered probability forecasting with news integration for prediction markets. - [Logit-Space Pricing](https://mathematicalcompany.mintlify.app/logit-pricing.md): Black-Scholes for prediction markets: logit-space reservation price, optimal spread, Greeks, and PnL decomposition. Based on Dalen 2025. - [Automated Market Making](https://mathematicalcompany.mintlify.app/market-making.md): Avellaneda-Stoikov market making with inventory skew, competitive spread blending, and multi-level quoting. Rust-native for maximum performance. - [Marketplace](https://mathematicalcompany.mintlify.app/marketplace.md): Sell strategies, subscribe to signals, and purchase strategy packages - [Regime Detection](https://mathematicalcompany.mintlify.app/markov.md): Real-time market regime classification using a Rust Hidden Markov Model (HMM). Baum-Welch training, Viterbi decoding, and O(N^2) online forward filter. - [Monitoring & Alerts](https://mathematicalcompany.mintlify.app/monitoring.md): Metrics collection, alerting, and calibration tracking for production strategies. - [Multi-Exchange](https://mathematicalcompany.mintlify.app/multi-exchange.md): Trade on multiple exchanges simultaneously with cross-exchange netting and unified position tracking. - [Multi-Leg Execution](https://mathematicalcompany.mintlify.app/multi-leg-execution.md): Atomic multi-leg order execution with fill policies. All-or-none, best-effort, and delta-neutral modes for complex trade structures. - [Multi-Outcome Events](https://mathematicalcompany.mintlify.app/multi-outcome.md): Trade multi-outcome prediction markets with event grouping, parity checks, and event-level risk limits. - [Multi-Strategy Operations](https://mathematicalcompany.mintlify.app/multi-strategy-ops.md): Run multiple strategies with isolated risk budgets, position reconciliation, and capital rebalancing. - [Optimal Execution](https://mathematicalcompany.mintlify.app/optimal-execution.md): Garleanu-Pedersen and Almgren-Chriss optimal execution models for prediction market trading. - [Optimal Stopping](https://mathematicalcompany.mintlify.app/optimal-stopping.md): Longstaff-Schwartz regression-based optimal stopping for American-style exit decisions in prediction markets. - [Options Overlay](https://mathematicalcompany.mintlify.app/options-overlay.md): Synthetic options from prediction market prices. Implied volatility, Greeks, vol surfaces, and spread strategies (butterfly, straddle, calendar spread). - [Options Trading](https://mathematicalcompany.mintlify.app/options-trading.md): Trade listed options via Interactive Brokers. Greeks, chains, and multi-leg strategies through the same engine. - [Oracle](https://mathematicalcompany.mintlify.app/oracle.md): Ensemble probability forecasting from 6 signal sources. Surface markets where your model sees edge vs market price. - [Particle Filter](https://mathematicalcompany.mintlify.app/particle-filter.md): Sequential Monte Carlo state estimation for nonlinear, non-Gaussian dynamics in prediction market tracking and jump detection. - [Persistence](https://mathematicalcompany.mintlify.app/persistence.md): SQLite persistence for crash recovery, position snapshots, and audit trail. - [Plot Data](https://mathematicalcompany.mintlify.app/plotting.md): Extract chart-ready data from backtest results for any visualization library - [Portable Alpha](https://mathematicalcompany.mintlify.app/portable-alpha.md): Factor decomposition, beta-neutral adjustments, and portable alpha strategies. Separate alpha from market exposure using OLS regression and EWMA tracking. - [Portfolio Management](https://mathematicalcompany.mintlify.app/portfolio.md): Portfolio construction, optimization (Kelly, risk parity, min variance), rebalancing, and Monte Carlo risk metrics. - [Massive (Polygon.io)](https://mathematicalcompany.mintlify.app/providers/massive.md): Real-time market data, OHLCV bars, options chains with Greeks, technical indicators, news, and reference data via the Massive API. - [Third-Party Providers](https://mathematicalcompany.mintlify.app/providers/overview.md): Access external data sources — options flow, dark pool, market data, and more — through Horizon's unified interface. - [Unusual Whales](https://mathematicalcompany.mintlify.app/providers/unusual-whales.md): Options flow, dark pool, Congress trades, insider activity, Greek exposure, IV analytics, and market sentiment via the Unusual Whales API. - [Quantitative Analytics](https://mathematicalcompany.mintlify.app/quant.md): Information theory, microstructure, risk analytics, Hawkes process, Ledoit-Wolf shrinkage, and streaming detectors. - [Queue Position Modeling](https://mathematicalcompany.mintlify.app/queue-position.md): Limit order queue position estimation, fill probability, and expected fill time for prediction market order books. - [Horizon Quickstart](https://mathematicalcompany.mintlify.app/quickstart.md): Install the Horizon SDK and run your first strategy in under 2 minutes. Works with prediction markets, equities, options, and crypto. - [Strategy Registry](https://mathematicalcompany.mintlify.app/registry.md): Browse, pull, and run your Horizon Cloud strategies locally. - [Resolution Analysis](https://mathematicalcompany.mintlify.app/resolution.md): LLM-powered resolution condition analysis, ambiguity scoring, and risk assessment for prediction markets. - [Rewards Tracker](https://mathematicalcompany.mintlify.app/rewards.md): Track Polymarket liquidity rewards: fetch eligible markets, check order scoring, and estimate rebate earnings. - [Robust Portfolio](https://mathematicalcompany.mintlify.app/robust-portfolio.md): Uncertainty-set portfolio optimization: worst-case returns, robust efficient frontier, and ellipsoidal ambiguity sets for prediction market allocation. - [Robustness Testing](https://mathematicalcompany.mintlify.app/robustness-testing.md): Statistical tests for whether your backtest edge is real or luck. Event permutation, outcome randomization, and PnL path simulation. - [Sentinel](https://mathematicalcompany.mintlify.app/sentinel.md): Always-on portfolio risk monitoring: correlation alerts, graduated drawdown response, tail risk hedging, regime-aware risk budgets. - [Signal Combiner](https://mathematicalcompany.mintlify.app/signals.md): Combine multiple alpha signals with weighted averaging, rank, and z-score methods. Built-in extractors for price, spread, momentum, flow, and orderbook imbalance. - [Simulation & Optimization](https://mathematicalcompany.mintlify.app/simulation.md): Monte Carlo portfolio simulation, Bayesian parameter optimization, and stress testing. Rust-native PRNG and GP surrogate. - [Resolution Sniping](https://mathematicalcompany.mintlify.app/sniper.md): Detect resolution events in real-time and capture payout with aggressive positioning. - [Stealth Execution](https://mathematicalcompany.mintlify.app/stealth-execution.md): Impact-aware execution algorithms: adaptive TWAP, randomized iceberg, sniper mode, and smart cross-exchange routing. - [Stock Market Hedging](https://mathematicalcompany.mintlify.app/stock-hedging.md): Hedge prediction market exposure with correlated stock positions using Alpaca Markets. OLS hedge ratio, effectiveness metrics, multi-ticker optimization, and scenario analysis. - [Agent Pipeline](https://mathematicalcompany.mintlify.app/swarm/agent-pipeline.md): Agent lifecycle from spawning to retirement. 9 archetype templates, paper-to-shadow-to-live promotion, fitness-based selection pressure. - [Circuit Breaker](https://mathematicalcompany.mintlify.app/swarm/circuit-breaker.md): Three layers of automated safety: Rust CriticalityMonitor (15 indicators), Rust KillChain (6-phase incident response), and a Python daemon thread for portfolio-wide emergency stop. - [Event Bus](https://mathematicalcompany.mintlify.app/swarm/event-bus.md): WebSocket pub/sub server. 6 channels, ring buffers, thread-safe publishing. - [Hive](https://mathematicalcompany.mintlify.app/swarm/hive.md): 13 compiled Rust subsystems coordinate a self-evolving fleet of trading agents. - [Overview](https://mathematicalcompany.mintlify.app/swarm/overview.md): Autonomous agent swarms with compiled Rust intelligence. 13 subsystems coordinate a self-evolving fleet of trading agents. - [Synthetic Index](https://mathematicalcompany.mintlify.app/synthetic-index.md): Construct custom indices from prediction market prices. Equal, inverse-vol, and liquidity weighting. Rebalancing signals and index arbitrage detection. - [Testing](https://mathematicalcompany.mintlify.app/testing.md): Test structure, running the test suite, and writing strategy tests. - [Treasury Yield Curve](https://mathematicalcompany.mintlify.app/treasury-yield-curve.md): Integrate Treasury yield data via FRED API. Yield-adjusted Kelly sizing, opportunity cost filtering, and collateral optimization based on the yield curve shape. - [Triggers](https://mathematicalcompany.mintlify.app/triggers.md): IFTTT-style trigger system for automated actions. Price thresholds, percent changes, crossovers, webhooks, and a built-in oracle HTTP server. - [Vine Copulas](https://mathematicalcompany.mintlify.app/vine-copulas.md): High-dimensional dependence modeling with C-vine and D-vine copulas for multi-market tail risk analysis. - [Volatility Signature](https://mathematicalcompany.mintlify.app/vol-signature.md): Volatility signature plots, two-scale realized volatility, noise variance estimation, and optimal sampling frequency for microstructure noise analysis. - [Volatility Suite](https://mathematicalcompany.mintlify.app/volatility.md): Multiple volatility estimators for prediction markets: close-to-close, Parkinson, Garman-Klass, Yang-Zhang, EWMA, and rolling. Rust-native with Python pipeline integration. - [Wallet Analytics](https://mathematicalcompany.mintlify.app/wallet-analytics.md): Public wallet analytics for Polymarket: trade history, positions, portfolio value, top holders, profiles, and flow analysis. No authentication required. - [Wallet Intelligence](https://mathematicalcompany.mintlify.app/wallet-intelligence.md): Score wallets, detect exploitable patterns, identify bots, and auto-fade bad traders. - [Wallet Profiler](https://mathematicalcompany.mintlify.app/wallet-profiler.md): Deep behavioral profiling and auto-profit strategies for Polymarket wallets. Analyze timing, market selection, order flow, and edge, then auto-execute. - [Wallet Signals](https://mathematicalcompany.mintlify.app/wallet-signals.md): Per-wallet directional signals, multi-wallet consensus, and auto-discovery with 4-component signal decomposition. - [Whale Galaxy](https://mathematicalcompany.mintlify.app/whale-galaxy.md): Auto-discover, rank, and track best/worst wallets across Polymarket. Detect coordinated trading clusters and whale movements. ## OpenAPI Specs - [openapi](https://mathematicalcompany.mintlify.app/api-reference/openapi.json)