Agencio Predict - Autonomous Multi-Strategy Trading System
5 Brokers | 6 Asset Classes | 6 Regime Strategies | 3 Trading Modes | Full NAV Tracking
System Statistics
5
Market Regimes
6
Regime Strategies
6
Asset Classes
5
Brokers
3
Trading Modes
17
API Endpoints
1. System Overview
The AI Fund Manager is an autonomous multi-strategy trading system that manages capital across multiple algorithms, asset classes, and brokers with real-time NAV tracking and automatic regime-based strategy adjustment.
Automatic Strategy Adjustment
Detects market regimes (BULL/BEAR/SIDEWAYS/CRISIS/RECOVERY) using PINN and Markov HMM, automatically switching to optimal strategies.
Multi-Asset Trading
Trades across Equities, Crypto, Forex, Futures, Options, and CFDs with unified position management.
Multiple Trading Modes
Supports Mock (simulated), Paper (realistic simulation), and Live (real broker execution) trading modes.
Multi-Broker Integration
Integrates with Alpaca, Binance, IBKR, Pepperstone, and Schwab for cross-market execution.
Multi-Symbol Execution
Executes trades across multiple symbols simultaneously with shared cash pool and correlation monitoring.
Real-Time NAV Tracking
Calculates and tracks NAV per share, total equity, daily/cumulative returns, and drawdown metrics.
2. Key Capabilities Summary
Production Ready: All 5 key capabilities are fully implemented and operational as of May 2026.
Capability
Description
Status
Auto-Adjust Strategies
Automatically switches between 6 regime-specific strategies based on PINN + Markov HMM regime detection (BULL/BEAR/SIDEWAYS/CRISIS/RECOVERY)
Active
Multiple Asset Classes
Trades Equities, Crypto, Forex, Futures, Options, CFDs across broker-specific universes
Active
Simulation & Live Modes
Mock ($100k simulated), Paper (realistic with slippage), Live (MFA-gated real execution)
Active
Multi-Trade Execution
Per-symbol entry/exit decisions, shared cash pool, portfolio-level risk, correlation monitoring
Active
Multiple Brokers
Alpaca, Binance, IBKR, Pepperstone, Schwab with unified adapter interface and credential encryption
Active
3. Full System Architecture
Complete architecture showing the Fund Manager orchestrating strategies, brokers, and regime detection.
Three trading modes with increasing levels of risk and required verification.
flowchart LR
subgraph Mock["MOCK MODE"]
M1["Simulated $100k"]
M2["No broker connection"]
M3["Zero risk"]
M4["Default for all users"]
end
subgraph Paper["PAPER MODE"]
P1["Realistic simulation"]
P2["Almgren-Chriss slippage"]
P3["Bid-ask spread modeling"]
P4["Fill delays"]
end
subgraph Live["LIVE MODE"]
L1["Real broker execution"]
L2["MFA verification required"]
L3["Risk acknowledgement"]
L4["Real capital at risk"]
end
Mock -->|"Opt-in"| Paper
Paper -->|"Graduation gates + MFA"| Live
Mode
Description
Risk Level
Requirements
Mock
Simulated $100k portfolio, no broker connection, instant fills
None
Default - no setup needed
Paper
Realistic simulation with slippage, spread, and fill delay modeling
None
Opt-in via settings
Live
Real broker execution with actual capital
Real capital at risk
MFA + Risk Ack + Graduation Gates
Paper Trading Features
Realistic Simulation: Paper mode uses institutional-grade simulation:
Almgren-Chriss Model: Square-root market impact based on trade size and volatility
Bid-Ask Spread: Asset-class specific spreads (tighter for liquid equities, wider for crypto)
Fill Delays: Simulated latency based on market conditions
Slippage Calculation: Persistent tracking in algorithm_trades.slippage_bps
11. Multi-Symbol Execution
The executor processes each symbol in the strategy's universe with shared resource management.
Security: All broker credentials are encrypted with AES-256-GCM. API responses only return ****last4 for sensitive fields. Live trading requires MFA verification.
13. NAV Calculation
Real-time Net Asset Value calculation tracking fund performance.
Auto-Pause: When a fund breaches max drawdown or daily loss limits, it automatically pauses and stops all trading. The user is notified and must manually restart after reviewing the situation.
Database Schema
Core tables for fund management (Migration 228).
erDiagram
funds ||--o{ fund_strategies : has
funds ||--o{ fund_positions : holds
funds ||--o{ fund_trades : executes
funds ||--o{ fund_nav_history : tracks
funds ||--o{ fund_rebalancing_events : rebalances
funds ||--o{ fund_audit_log : logs
funds {
uuid id PK
uuid user_id FK
string name
string status
numeric initial_capital
numeric current_capital
numeric total_equity
numeric shares_outstanding
numeric nav_per_share
numeric high_water_mark
string risk_level
string allocation_strategy
numeric max_drawdown_pct
numeric max_daily_loss_pct
numeric max_position_pct
boolean stock_hunter_enabled
numeric stock_hunter_min_confidence
boolean auto_rebalance_enabled
numeric rebalance_threshold_pct
jsonb regime_thresholds
boolean regime_auto_switch_enabled
timestamp last_regime_switch_at
}
fund_strategies {
uuid id PK
uuid fund_id FK
uuid algorithm_id FK
string strategy_type
numeric target_allocation_pct
numeric current_allocation_pct
boolean enabled
uuid algorithm_run_id
}
fund_positions {
uuid id PK
uuid fund_id FK
string symbol
uuid strategy_id FK
string status
numeric quantity
numeric entry_price
numeric current_price
numeric market_value
numeric unrealized_pnl
numeric realized_pnl
}
fund_trades {
uuid id PK
uuid fund_id FK
uuid position_id FK
string symbol
string side
numeric quantity
numeric price
numeric total_value
string source_type
}
fund_nav_history {
uuid id PK
uuid fund_id FK
date snapshot_date
numeric nav_per_share
numeric total_equity
numeric daily_return_pct
numeric cumulative_return_pct
numeric drawdown_pct
}
API Endpoints
17 API routes for fund management.
Method
Path
Description
POST
/api/predict/v1/fund-manager
Create new fund
GET
/api/predict/v1/fund-manager
List user's funds
GET
/api/predict/v1/fund-manager/:id
Get fund details
PUT
/api/predict/v1/fund-manager/:id
Update fund config
DELETE
/api/predict/v1/fund-manager/:id
Delete fund
POST
/api/predict/v1/fund-manager/:id/start
Start/resume fund
POST
/api/predict/v1/fund-manager/:id/pause
Pause fund
POST
/api/predict/v1/fund-manager/:id/stop
Stop fund & close positions
POST
/api/predict/v1/fund-manager/:id/deposit
Deposit capital
POST
/api/predict/v1/fund-manager/:id/withdraw
Withdraw capital
POST
/api/predict/v1/fund-manager/:id/strategies
Add strategy
DELETE
/api/predict/v1/fund-manager/:id/strategies/:sid
Remove strategy
GET
/api/predict/v1/fund-manager/:id/performance
Get performance metrics
GET
/api/predict/v1/fund-manager/:id/nav-history
Get NAV history
GET
/api/predict/v1/fund-manager/:id/positions
Get open positions
GET
/api/predict/v1/fund-manager/:id/trades
Get recent trades
POST
/api/predict/v1/fund-manager/:id/rebalance
Trigger manual rebalance
File Locations
Key backend and frontend files for the AI Fund Manager.
Backend Files
File
Purpose
packages/be/src/fund-manager/types.ts
Type definitions for Fund, FundStrategy, FundPosition, FundTrade
packages/be/src/fund-manager/repository.ts
Database CRUD operations
packages/be/src/fund-manager/service.ts
Business logic: create/update/delete, NAV, rebalancing