Skip to main content
A complete walkthrough from installation to a running autonomous fund. By the end you will have a multi-strategy fund with risk controls, automated research, and monitoring.
Ultra Feature. Requires an Ultra subscription. Get started at api.mathematicalcompany.com

Step 1: Install

Step 2: Write Your Strategy

A strategy is a list of pipeline functions. Each function receives a Context with market data, positions, and parameters, and returns values that flow into the next function.

Step 3: Configure the Fund

FundConfig sets fund-level capital, risk limits, fees, and timing.

Step 4: Add Strategies

Each strategy gets its own engine with independent risk limits, feeds, and exchange connectivity.
To deploy on a live exchange, pass an exchange config and feeds:

Step 5: Start the Fund

This deploys all queued strategies and starts the background oversight loop. The loop runs every 60 seconds (configurable) and automatically handles:
  • NAV computation and high-water mark tracking
  • Fund-level drawdown checks and kill switch
  • Strategy pause/resume on risk breaches
  • Market settlement detection and cleanup
  • Fee accrual
  • Cross-strategy correlation alerts
  • Adaptive execution tuning
  • Research scanning for new opportunities

Step 6: Check Fund Status

For a detailed report:

Step 7: Risk Dashboard

Get a consolidated risk view.

Step 8: Stress Testing

Run predefined or custom stress scenarios against your current portfolio.

Step 9: Manage Strategy Lifecycle

Step 10: P&L Attribution

Step 11: Query Fund Memory

The fund remembers outcomes across restarts via SQLite.

Step 12: NAV History

Step 13: Shut Down

Step 14: LLM Integration via MCP

Run the fund as an MCP server so an LLM can manage it through tool calls.
The LLM can call tools like deploy_strategy, fund_status, research_scan, stress_test, and retire_strategy. All actions go through the Decision Framework which enforces confidence thresholds, rate limits, and operating mode restrictions. For more on operating modes (dry-run, supervised, autonomous) see the Overview.

Complete Script

Everything above in a single runnable file:
The oversight loop handles everything in the background: NAV tracking, risk monitoring, correlation alerts, settlement detection, fee accrual, research scanning, and adaptive execution tuning all run automatically while your strategies trade.