Skip to main content
Multiple autonomous agents, each independently searching for opportunities across exchanges and asset classes. No predefined strategies. Each agent searches from scratch, forms hypotheses, backtests them, deploys capital, trades, monitors positions, retires underperformers, and scales up what works. A central cluster coordinates capital allocation, risk budgets, and aggregate monitoring.
Ultra Feature. Requires an Ultra subscription. Get started at api.mathematicalcompany.com

The Idea

Instead of writing strategies by hand, you launch agents and let them do the work. Each agent:
  1. Scans its assigned universe for mispriced markets
  2. Forms hypotheses (“Market X is mispriced because Y”)
  3. Constructs a pipeline from composable building blocks
  4. Backtests with robustness checks (BiasGuard blocks overfitting)
  5. Deploys in paper, auto-promotes to shadow, then live
  6. Trades on live exchanges (submit, cancel, amend)
  7. Monitors P&L, drawdown, alpha decay, execution quality
  8. Retires dead strategies, frees capital, loops back to step 1
A FundCluster sits above all agents, aggregating NAV, enforcing cross-agent risk limits, and rebalancing capital.

Architecture

FundCluster

Central coordinator. Aggregates NAV across all agents, monitors cross-fund risk, rebalances capital, and routes alerts.

Per-Agent FundManager

Each agent is a full FundManager with all 36 subsystems: research, alpha model, hypothesis lifecycle, backtest, bias guard, promotion, execution, decay tracking, adaptive thresholds, recovery.

Agent Domains

Crypto

Polymarket + Coinbase feeds. BTC, ETH, SOL prediction markets.

Politics

Polymarket + Kalshi. Election and policy event markets.

Sports

Kalshi. Game outcomes, championships, season props.

Macro/Rates

Kalshi + IBKR ForecastEx. Fed rates, CPI, treasury yields.

Cross-Exchange

Polymarket + Kalshi. Same-market arbitrage across venues.

Tail Risk

Polymarket. Low-probability, high-payoff event bets.

High Frequency

Polymarket. Short-lived mispricings, fast rebalance cycle (15s).
Each agent connects to its own exchanges and runs independently. The cluster only aggregates and rebalances.

Step 1: Define Pipeline Building Blocks

Instead of hardcoding strategies, define composable building blocks that agents can assemble into pipelines. Each block is a standard pipeline function.

Step 2: Create an Agent Factory

Each agent is a FundManager configured for a specific domain. The factory creates agents with all autonomous features enabled.

Step 3: Launch the Swarm

Create specialized agents for different market domains and wire them into a central cluster.

What Each Agent Does Autonomously

After cluster.start_all(), each agent runs this loop on every rebalance cycle:

Research to Deploy Cycle

Each agent’s ResearchIntelligence watches for 6 trigger types:
  1. Regime change: HMM detects shift from calm to volatile
  2. Cross-market divergence: two correlated markets diverge >5%
  3. Volume spike: 2x+ median volume
  4. New market: fresh market appears on exchange
  5. Edge refresh: edge increases on existing market
  6. Settlement cascade: resolution frees capital for new positions
When a trigger fires, the agent:

Deployment Gates (all must pass)

Step 4: LLM Control via MCP

Expose each agent as an MCP server so an LLM can check status, intervene, and rebalance.

One MCP Server Per Agent

What the LLM Can Do

The LLM gets 32 fund tools per agent. Example interactions:

Step 5: Scaling the Swarm

Add More Agents Dynamically

Remove Underperforming Agents

Per-Agent Explainability

Query any agent for explanations:

Operating Modes

Control how much autonomy each agent gets:
Even in autonomous mode, every agent still enforces:
  • Rate limits (max 3 deploys/hour, max 10 capital changes/day)
  • Confidence thresholds (0.5 for paper, 0.7 for live, 0.8 for scale-up)
  • BiasGuard (5 overfitting checks)
  • Promotion gates (14 days paper, 7 days shadow)
  • Fund drawdown kill switch
  • SHA-256 hash-chained audit trail on every decision

Summary

Running python quant_swarm.py gives you:
  • 7 agents each running the full research-to-retirement loop
  • Central cluster with aggregate NAV, risk, and rebalancing
  • Cross-agent correlation monitoring: the cluster flags correlated bets across agents
  • Persistent memory: each agent remembers outcomes across restarts (SQLite)
  • Recovery: if a strategy crashes, RecoveryManager restarts it with a circuit breaker
  • Adaptive execution: each agent tunes spreads, sizes, and timing from fill quality data
  • Alpha decay tracking: agents retire strategies when edge erodes
  • Audit trail: every decision logged with reasoning, confidence, and outcome
  • MCP interface: an LLM can observe and steer the swarm via 32 tools per agent
No predefined strategies. No manual intervention. The agents search, test, deploy, trade, monitor, learn, and repeat.