Skip to main content
The autonomous execution layer sits between the LLM and Horizon’s trading tools. It adds fund management, risk controls, persistent memory, and decision governance on top of the existing 180+ MCP tools. Works across all asset classes: prediction markets, equities, options, and crypto.
Ultra Feature. Requires an Ultra subscription. Get started at api.mathematicalcompany.com

Why Not Just MCP + LLM?

An LLM with raw MCP access can submit orders, check positions, discover markets, and run backtests across prediction markets, stocks, and crypto. That covers individual actions. What it does not cover is running a fund.
CapabilityRaw MCPAutonomous Layer
Submit individual ordersYesStrategies handle it
Track fund NAV over timeNoContinuous, persisted
Prevent runaway deploy loopsNoRate limits, confidence gates
Remember what failed last monthNoSQLite memory, cross-session
Pause correlated strategiesNoCorrelation alerts with configurable thresholds
Auto-tune spread width from fill dataNoAdaptive execution loop
Human-in-the-loop for risky actionsNoSupervised mode, approve/reject
Tamper-evident audit trailNoSHA-256 hash-chained decisions
Detect and block LLM overfittingNoBiasGuard (5 bias types)
The core difference: raw MCP only acts when the LLM is prompted. The autonomous layer runs a background oversight loop that computes NAV, checks drawdowns, monitors correlations, detects settlements, accrues fees, and tunes execution parameters while the LLM is idle. The LLM proposes actions with reasoning and a confidence score. The Decision Framework evaluates each proposal against confidence thresholds, rate limits, and the current operating mode. It can execute, escalate to a human, or reject. The LLM cannot override a rejection.

Isolated MCP Servers

Fund tools are isolated from trading tools. You can wire them as separate MCP servers so the LLM cannot accidentally call submit_order when it should be calling deploy_strategy.
{
  "mcpServers": {
    "horizon": {
      "command": "python",
      "args": ["-m", "horizon.mcp"]
    }
  }
}
Even in the shared MCP server, fund tools are gated behind HORIZON_FUND_MODE=1. If it is not set, they return an error instead of executing.

The Fund Uses Everything

The separate MCP server controls what the LLM can call directly. Under the hood, the fund orchestrates all of Horizon’s capabilities:
  • Each strategy gets its own Engine with the 8-point risk pipeline, order management, and exchange connectivity.
  • Market universe refresh uses discover_markets() to find and score opportunities.
  • Autopilot runs backtest() and robustness_test() before deploying any strategy.
  • Every strategy gets a RiskConfig scaled to its capital allocation.
  • Strategies use any of the 17 feed types for real-time data.
  • Orders route through any of the 7 exchanges. Smart routing picks the best venue.

Architecture

LayerComponentsPurpose
Fund InfrastructureNAVEngine, CapitalAllocator, FundAccounting, FundLedgerTrack value, allocate capital, compute fees, double-entry accounting
Strategy LifecycleStrategyController, PromotionManager, RecoveryManagerDeploy, stop, pause, resume strategies; paper-to-live promotion; self-healing
Market IntelligenceMarketUniverse, MarketScorer, SettlementMonitorDiscover, score, and track markets; detect resolutions
Decision LoopResearchPipeline, Autopilot, StrategyMemory, BacktestRunnerScan, backtest, deploy, learn from outcomes; built-in backtester
Risk BudgetingFundRiskMonitor, VaRBudgetManager, CorrelationMonitor, FundStressTesterFund drawdown limits, VaR allocation, correlation alerts, stress scenarios
Execution IntelligenceExecutionQualityTracker, AdaptiveExecutionTuner, SmartRouterTrack fill quality, auto-tune parameters, route to best exchange
Bias PreventionBiasGuardBlock backtest overfitting, recency bias, confirmation bias, performance chasing, small-sample learning
Agent InterfaceAutonomousAgent, DecisionFramework, Explainer, AlertManagerLLM-facing API with guardrails, rich explanations, notifications
Self-TuningThresholdTuner, AdaptiveThresholdsLearn from decision outcomes, auto-adjust confidence gates
Multi-FundFundClusterRun multiple funds, aggregate views, cross-fund rebalancing

Operating Modes

  • Dry-run: The LLM proposes actions. A human approves or rejects each one before execution.
  • Supervised: Low-risk actions (paper deploys, research scans) execute automatically. High-risk actions (live deploys, kill switch, scale-up, strategy retirement) escalate for human approval.
  • Autonomous: All actions execute within guardrails. Rate limits, confidence thresholds, and bias checks still apply.

Bias Prevention

BiasGuard screens every deploy and scale-up decision for 5 types of LLM overfitting:
  1. Backtest overfitting: Blocks when probability of overfitting (PBO) exceeds 50%, deflated Sharpe is below 1.0, or out-of-sample Sharpe drops below 0.5.
  2. Recency bias: Decays memory confidence exponentially with a 90-day half-life. Old memories carry less weight automatically.
  3. Confirmation bias: Blocks deploying more than 3 strategies of the same type within a 24-hour window.
  4. Performance chasing: Blocks scale-up on strategies younger than 14 days or with 3-day returns above 10% (likely mean-reverting).
  5. Small-sample learning: Caps confidence proportionally when observations are below the minimum threshold (30 trades for strategy conclusions, 5 for general patterns).

What’s Built

Every component listed above is implemented, tested, and wired into the FundManager oversight loop:
  • 180+ MCP tools (trading + 32 fund management)
  • 36 fund subsystems integrated into a single orchestrator
  • 3 operating modes with decision governance
  • Confidence thresholds, rate limits, hash-chained audit trail
  • Self-tuning confidence thresholds that learn from decision outcomes
  • Persistent memory in SQLite, queryable by category, with confidence decay
  • 6 stress scenarios (10/20% drawdown, correlation spike, liquidity crisis, exchange outage, black swan)
  • Background oversight loop (NAV, risk, correlation, VaR, settlement, fees, adaptive tuning)
  • Fund MCP server isolated from raw trading tools
  • BiasGuard wired into Autopilot, Agent, and Memory
  • Quant flow: regime detection, 7-factor alpha model, hypothesis lifecycle, signal ensemble, portfolio optimizer, risk analytics, performance attribution, execution intelligence, alpha decay tracking
  • Fund operations: alerts with webhook delivery, double-entry ledger, paper-to-live promotion, self-healing recovery
  • Explainability: rich structured responses for MCP tools, adaptive thresholds, built-in backtester
  • Multi-fund orchestration: run multiple funds as a cluster with aggregate views and cross-fund rebalancing
For a complete step-by-step walkthrough of setting up and running a fund, see the Full Tutorial.