AI Fund Manager System Architecture

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.

flowchart TB subgraph FundManager["AI FUND MANAGER"] subgraph Orchestrator["Fund Orchestrator"] NAV["NAV Calculation"] Alloc["Capital Allocation"] Risk["Risk Limits"] Corr["Correlation Monitor"] Rebal["Auto Rebalancing"] end subgraph RegimeSelector["Regime Strategy Selector"] PINN["PINN Predictor"] Markov["Markov HMM"] Detector["Regime Detector"] Selector["Strategy Selector"] Fitness["Fitness Scoring"] end subgraph Strategies["Strategy Pool (6 Strategies)"] S1["Bull Market Momentum"] S2["Bull Factor Tilt"] S3["Bear Defensive"] S4["Bear Pairs Trading"] S5["Sideways Vol Premium"] S6["Crisis Risk Parity"] end subgraph Executor["Multi-Symbol Executor"] PriceVal["Price Validation"] PerSymbol["Per-Symbol Decisions"] SharedCash["Shared Cash Pool"] Slippage["Slippage Model"] end end subgraph DataFeeds["Market Data Feeds"] Yahoo["Yahoo Finance"] Finnhub["Finnhub"] CoinGecko["CoinGecko"] Polygon["Polygon.io"] Binance["Binance"] end subgraph Brokers["Broker Adapters"] Alpaca["Alpaca\n(Stocks, ETFs, Crypto)"] BinanceB["Binance\n(Crypto Spot + Futures)"] IBKR["IBKR\n(All Asset Classes)"] Pepper["Pepperstone\n(Forex, CFDs)"] Schwab["Schwab\n(US Stocks, Options)"] end subgraph Storage["Database"] Funds["predict.funds"] Positions["predict.fund_positions"] Trades["predict.fund_trades"] NAVHist["predict.fund_nav_history"] Audit["predict.fund_audit_log"] end DataFeeds --> PINN DataFeeds --> Markov PINN --> Detector Markov --> Detector Detector --> Selector Selector --> Fitness Fitness --> Strategies Orchestrator --> Strategies Strategies --> Executor Executor --> Brokers Brokers --> Storage Orchestrator --> Storage

4. Tick Loop Flow (60-Second Cycle)

The fund orchestrator runs a tick loop every 60 seconds for all active funds.

flowchart TB Start["Scheduler: fund-tick-active (60s)"] --> LoadFunds["Load all active funds"] LoadFunds --> ForEach["For each fund"] subgraph TickLoop["Per-Fund Tick Loop"] ForEach --> Step1["Step 1: Fetch live prices"] Step1 --> Step2["Step 2: Update position values"] Step2 --> Step3["Step 3: Calculate fund equity"] Step3 --> Step4["Step 4: Update NAV per share"] Step4 --> Step41{"Step 4.1: Auto-switch enabled?"} Step41 -->|"Yes"| CheckRegime["Get current regime + confidence"] CheckRegime --> SwitchDecision{"Switch urgency?"} SwitchDecision -->|"Immediate"| ExecuteSwitch["Create new algorithm\nStart paper run\nUpdate allocations"] SwitchDecision -->|"None"| Step5 ExecuteSwitch --> Step5 Step41 -->|"No"| Step5 Step5["Step 5: Tick each strategy"] Step5 --> Step6["Step 6: Process Stock Hunter\n(if enabled)"] Step6 --> Step7["Step 7: Check risk limits"] Step7 --> Step8{"Risk breach?"} Step8 -->|"Yes"| Pause["Auto-pause fund"] Step8 -->|"No"| Step9["Step 8: Check rebalancing"] Step9 --> Step10["Step 9: Update telemetry"] end Step10 --> NextFund["Next fund"] Pause --> NextFund NextFund --> ForEach

Scheduler Jobs

Job Name Interval Description
fund-tick-active 60 seconds Main tick loop for all active funds
fund-nav-snapshot Daily (market close) Record daily NAV snapshot for performance charts
fund-rebalance-check 1 hour Check all funds for rebalancing triggers
fund-correlation-check 4 hours Monitor cross-strategy correlations

5. Regime Detection System

The system uses PINN (Physics-Informed Neural Network) combined with Markov HMM to detect market regimes.

flowchart LR subgraph Input["Market Data (252 bars)"] Prices["Price History"] Volume["Volume Data"] VIX["VIX Index"] Yields["Treasury Yields"] end subgraph PINN["PINN Predictor"] Features["16 Input Features"] Physics["Physics Constraints\n(Kelly, Liquidation, Mean-Rev)"] Outputs["3 Output Heads"] CrisisProb["Crisis Probability"] end subgraph Markov["Markov HMM (4-State)"] States["BULL | BEAR | SIDEWAYS | CRISIS"] Trans["Transition Matrix"] Prob["State Probabilities"] end subgraph Combined["Combined Regime Detection"] Merge["Confidence Scoring"] Regime["Final Regime"] Warning["Crisis Warning Level"] end Input --> PINN Input --> Markov PINN --> CrisisProb Markov --> Prob CrisisProb --> Merge Prob --> Merge Merge --> Regime Merge --> Warning

Market Regimes

Regime Characteristics Detection Signals Strategy Approach
BULL Positive drift, low volatility Hurst > 0.55, positive factor alpha, VIX < 20 Momentum, trend-following, let winners run
BEAR Negative drift, high volatility Hurst < 0.45, negative drift, VIX > 25 Defensive, quick profits, tight stops
SIDEWAYS No drift, moderate volatility Hurst ~ 0.50, ranging price action Mean-reversion, volatility selling, range trading
CRISIS Extreme volatility, correlations spike VIX > 35, PINN crisis prob > 0.5, yield curve signals Capital preservation, hedging, risk parity
RECOVERY Transitioning from crisis/bear VIX declining, positive momentum building Cautious momentum, rebuilding positions

6. Regime-Specific Strategies

Six pre-built strategies optimized for specific market regimes.

mindmap root((Regime Strategies)) BULL Market Bull Market Momentum Trend-following Wide stops Trailing stops Kelly sizing Bull Factor Tilt High-beta tilt Small-cap SMB Factor exposure BEAR Market Bear Defensive Mean-reversion Oversold entries Tight stops Low beta pref Bear Pairs Trading Market-neutral Cointegrated pairs Z-score extremes SIDEWAYS Sideways Vol Premium Vol selling IV greater than RV Range trading CRISIS Crisis Risk Parity Max preservation Diversified defense Minimal exposure

Strategy Details

Strategy Regimes Risk Level Key Parameters
Bull Market Momentum BULL RECOVERY Medium Stop: 6%, Trailing: 4%, Max Position: $40k
Bull Factor Tilt BULL High High-beta targets, SMB factor tilt, growth bias
Bear Defensive BEAR CRISIS Low Stop: 2.5%, Trailing: 1.5%, Max Position: $15k
Bear Pairs Trading BEAR SIDEWAYS Medium Market-neutral, cointegration required, z-score > 2
Sideways Vol Premium SIDEWAYS Medium IV > RV spread, range-bound symbols, vol decay
Crisis Risk Parity CRISIS Low Stop: 3%, Max DD: 5%, Daily Loss: 1.5%, Max Position: $10k

7. Automatic Strategy Switching

The fund automatically switches strategies when regime conditions change.

sequenceDiagram participant Scheduler as Tick Loop (60s) participant Orchestrator as Fund Orchestrator participant Selector as Regime Strategy Selector participant PINN as PINN + Markov participant Executor as Algorithm Executor participant DB as Database Scheduler->>Orchestrator: tick(fundId) Orchestrator->>Orchestrator: Check: regimeAutoSwitchEnabled? alt Auto-Switch Enabled Orchestrator->>Selector: checkRegimeSwitch(fundId, currentStrategy) Selector->>PINN: detectRegime(priceHistory) PINN-->>Selector: { regime: BEAR, confidence: 0.78, crisisWarning: 0.15 } Selector->>Selector: evaluateFitness(allStrategies, regime) Selector->>Selector: computeSwitchUrgency() Selector-->>Orchestrator: { shouldSwitch: true, urgency: 'immediate', newStrategy: 'Bear Defensive' } alt Urgency = Immediate Orchestrator->>Executor: stopRun(oldRunId) Orchestrator->>DB: createAlgorithm(bearDefensiveAST) Orchestrator->>Executor: startRun(newAlgoId, 'paper') Orchestrator->>DB: updateFundStrategy(newAlgoId) Orchestrator->>DB: logAudit('regime_switch_executed') end end Orchestrator->>Orchestrator: Continue tick loop...

Switch Urgency Levels

Urgency Trigger Action
Immediate Crisis warning > threshold OR fitness diff > 50% Auto-execute switch if enabled
Soon Fitness diff > 30% AND confidence >= threshold Recommend in UI, user decides
Optional Fitness diff > 15% Show as suggestion
None Current strategy is optimal No action needed

8. Configurable Thresholds

Each fund has UI-configurable thresholds for regime detection and strategy switching.

Threshold Default Range Description
markovRegimeProbMin 0.60 0.30 - 0.90 Minimum Markov regime probability to confirm regime
hurstTrendingThreshold 0.55 0.45 - 0.70 Hurst exponent threshold for trending confirmation
garchVolatilityCap 25 15 - 50 GARCH volatility cap (%) for normal trading
crisisWarningThreshold 0.30 0.10 - 0.60 Crisis warning level to trigger defensive switch
regimeSwitchConfidenceMin 0.70 0.50 - 0.95 Confidence required to trigger automatic switch
minTicksBetweenSwitches 10 1 - 60 Minimum ticks (minutes) before allowing another switch

Threshold Presets

Conservative

Higher thresholds for more certainty. Lower crisis warning for earlier defensive moves. Longer wait between switches.

{ markovRegimeProbMin: 0.70, crisisWarningThreshold: 0.20, minTicksBetweenSwitches: 20 }

Moderate (Default)

Balanced thresholds suitable for most market conditions.

{ markovRegimeProbMin: 0.60, crisisWarningThreshold: 0.30, minTicksBetweenSwitches: 10 }

Aggressive

Lower thresholds for faster regime response. Higher crisis tolerance. Shorter intervals between switches.

{ markovRegimeProbMin: 0.50, crisisWarningThreshold: 0.40, minTicksBetweenSwitches: 5 }

9. Multi-Asset Class Support

The fund supports trading across 6 asset classes with broker-specific routing.

flowchart TB subgraph AssetClasses["Asset Classes"] Equities["Equities\nAAPL, MSFT, SPY, QQQ"] Crypto["Crypto\nBTC, ETH, SOL"] Forex["Forex\nEUR/USD, GBP/USD"] Futures["Futures\nES, NQ, CL, GC"] Options["Options\nSPY calls/puts"] CFDs["CFDs\nIndices, Commodities"] end subgraph Brokers["Broker Routing"] Alpaca["Alpaca"] Binance["Binance"] IBKR["IBKR"] Pepper["Pepperstone"] Schwab["Schwab"] end Equities --> Alpaca Equities --> IBKR Equities --> Schwab Crypto --> Alpaca Crypto --> Binance Forex --> Pepper Forex --> IBKR Futures --> IBKR Options --> IBKR Options --> Schwab CFDs --> Pepper
Asset Class Supported Brokers Example Symbols Special Features
Equities Alpaca, IBKR, Schwab AAPL, MSFT, SPY, QQQ Commission-free (Alpaca/Schwab)
Crypto Alpaca, Binance BTC, ETH, SOL 24/7 trading, futures support (Binance)
Forex Pepperstone, IBKR EUR/USD, GBP/USD 70+ pairs, leverage available
Futures IBKR ES, NQ, CL, GC Contract multipliers, margin
Options IBKR, Schwab SPY calls/puts Full chain, Greeks
CFDs Pepperstone Indices, Commodities Leveraged products

10. Trading Modes

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:

11. Multi-Symbol Execution

The executor processes each symbol in the strategy's universe with shared resource management.

flowchart TB subgraph Strategy["Strategy AST"] Universe["universe: ['AAPL', 'MSFT', 'NVDA', 'GOOGL']"] Entry["entry: { when: rsi(14) < 30, size: kelly(0.5) }"] Exit["exit: { when: rsi(14) > 70 }"] end subgraph Executor["Multi-Symbol Executor"] FetchPrices["Fetch prices for all symbols"] Validate["Price validation (bounds, spikes)"] subgraph PerSymbol["For Each Symbol"] BuildCtx["Build EvalContext"] EvalEntry{"entry.when?"} EvalExit{"exit.when?"} CalcSize["Calculate position size"] end subgraph Shared["Shared Resources"] CashPool["Shared Cash Pool"] RiskBudget["Portfolio Risk Budget"] CorrMatrix["Correlation Matrix"] Concentration["Concentration Limits"] end end subgraph Output["Trade Execution"] Trades["Generated Trades"] Positions["Updated Positions"] Telemetry["Equity Telemetry"] end Universe --> FetchPrices FetchPrices --> Validate --> PerSymbol PerSymbol --> Shared Shared --> Trades --> Positions --> Telemetry

Multi-Symbol Features

Feature Description
Per-Symbol Decisions Independent entry/exit evaluation for each symbol in universe
Shared Cash Pool All positions draw from common cash balance, preventing over-allocation
Portfolio Risk Management Aggregate risk limits applied across all positions
Correlation Monitoring Tracks pairwise correlations, applies haircuts when correlated
Concentration Limits Max single position, sector limits, asset class limits

12. Multi-Broker Integration

Unified broker adapter interface with credential encryption and auth-specific flows.

flowchart TB subgraph Adapters["BrokerAdapter Interface"] Interface["placeOrder() | getPositions() | getBalance() | closeAll()"] end subgraph Alpaca["Alpaca"] AlpacaAuth["API Key Auth"] AlpacaAssets["Stocks, ETFs, Crypto"] AlpacaFeatures["Commission-free\n$100k paper balance"] end subgraph Binance["Binance"] BinanceAuth["API Key Auth"] BinanceAssets["Crypto spot + futures"] BinanceFeatures["Testnet for paper\n24/7 trading"] end subgraph IBKR["Interactive Brokers"] IBKRAuth["Session Auth\n(Gateway required)"] IBKRAssets["All asset classes"] IBKRFeatures["Gateway at localhost:5000\n55s keepalive ping"] end subgraph Pepper["Pepperstone"] PepperAuth["OAuth 2.0 + PKCE"] PepperAssets["Forex, CFDs, indices"] PepperFeatures["30-day token\n6-hour refresh job"] end subgraph Schwab["Charles Schwab"] SchwabAuth["OAuth 2.0 + PKCE"] SchwabAssets["US stocks, ETFs, options"] SchwabFeatures["7-day token limit\nWeekly re-auth required"] end Interface --> Alpaca Interface --> Binance Interface --> IBKR Interface --> Pepper Interface --> Schwab
Broker Auth Type Asset Classes Key Notes
Alpaca API Key Stocks, ETFs, Crypto Commission-free, $100k paper balance
Binance API Key Crypto spot + futures Testnet for paper trading
IBKR Session All (stocks, options, futures, forex, bonds) Requires IBKR Gateway on localhost:5000
Pepperstone OAuth 2.0 Forex, CFDs, indices, commodities 30-day token, auto-refresh scheduler
Schwab OAuth 2.0 US stocks, ETFs, options 7-day hard token limit - weekly re-auth
Security: All broker credentials are encrypted with AES-256-GCM. API responses only return ****last4 for sensitive fields. Live trading requires MFA verification.

14. Capital Allocation Strategies

Three allocation strategies for distributing capital across strategies.

flowchart TB subgraph Strategies["Available Strategies"] S1["Strategy A\nSharpe: 1.5\nDD: 8%"] S2["Strategy B\nSharpe: 1.2\nDD: 12%"] S3["Strategy C\nSharpe: 0.9\nDD: 15%"] end subgraph EqualWeight["Equal Weight"] EW["Each gets 33.3%"] end subgraph SharpeWeight["Sharpe Weighted"] SW["A: 41.7%\nB: 33.3%\nC: 25.0%"] end subgraph RiskParity["Risk Parity"] RP["Inverse volatility:\nA: 43.5%\nB: 29.0%\nC: 27.5%"] end Strategies --> EqualWeight Strategies --> SharpeWeight Strategies --> RiskParity
Strategy Formula Best For
Equal Weight allocation = 1 / numStrategies Simple diversification, no performance history
Sharpe Weighted allocation = max(0, sharpe) / sum(sharpes) Allocate more to risk-adjusted performers
Risk Parity allocation = (1/vol) / sum(1/vols) Balance risk contribution across strategies

15. Automatic Rebalancing

Fund automatically rebalances when allocations drift or on schedule.

flowchart TB subgraph Triggers["Rebalancing Triggers"] Scheduled["Scheduled\n(rebalance_interval_days)"] Drift["Allocation Drift\n(> rebalance_threshold_pct)"] Manual["Manual\n(User request)"] Risk["Risk Event\n(Post-crisis recovery)"] end subgraph Process["Rebalancing Process"] Calc["Calculate target allocations"] Compare["Compare to current allocations"] Delta["Compute required trades"] Execute["Execute rebalancing trades"] Record["Record to fund_rebalancing_events"] end subgraph Outcome["Outcome"] Updated["Updated position sizes"] Audit["Audit trail entry"] NAVUpdate["NAV recalculated"] end Triggers --> Process --> Outcome

Rebalancing Settings

Setting Description Default
auto_rebalance_enabled Enable automatic rebalancing false
rebalance_threshold_pct Drift percentage to trigger rebalance 5%
rebalance_interval_days Scheduled rebalancing interval 30 days

16. Risk Management

Multi-layer risk management with automatic fund pausing.

flowchart TB subgraph RiskChecks["Risk Checks (Every Tick)"] MaxDD["Max Drawdown Check"] DailyLoss["Daily Loss Check"] Concentration["Position Concentration"] Correlation["Strategy Correlation"] end subgraph Thresholds["Risk Presets"] Conservative["Conservative\nDD: 10%, Daily: 2%, Pos: 15%"] Moderate["Moderate\nDD: 20%, Daily: 5%, Pos: 25%"] Aggressive["Aggressive\nDD: 30%, Daily: 8%, Pos: 40%"] end subgraph Actions["Breach Actions"] Warn["Warning logged"] Pause["Fund auto-pauses"] Notify["User notified"] Audit["Audit trail entry"] end RiskChecks --> |"Breach"| Actions Thresholds --> RiskChecks

Risk Presets

Level Max Drawdown Max Daily Loss Max Position
Conservative 10% 2% 15%
Moderate 20% 5% 25%
Aggressive 30% 8% 40%
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
packages/be/src/fund-manager/orchestrator.ts Main tick loop and fund coordination
packages/be/src/fund-manager/scheduler.ts Scheduler job definitions
packages/be/src/fund-manager/regime-strategy-selector.ts Regime detection and strategy selection
packages/be/src/api/predict/v1/fund-manager/handlers.ts API handlers

Frontend Files

File Purpose
packages/fe/src/components/fund-manager/types.ts UI types
packages/fe/src/components/fund-manager/FundCard.tsx Summary card for fund list
packages/fe/src/components/fund-manager/FundCreator.tsx 5-step creation wizard
packages/fe/src/components/fund-manager/FundDashboard.tsx Main fund dashboard
packages/fe/src/components/fund-manager/RegimeStrategyPanel.tsx Regime strategy controls
apps/web/src/app/fund-manager/page.tsx Fund list page
apps/web/src/app/fund-manager/[id]/page.tsx Fund detail page

Related Documentation

Document Description
Regime Strategy Selector Detailed regime detection and strategy switching documentation
Algorithm Trading System DSL primitives, backtest engine, paper executor
PINN Architecture Physics-informed neural network for regime prediction
docs/internal/trading/68-ai-fund-manager.md Full markdown documentation
docs/internal/trading/82-regime-strategy-selector.md Regime strategy selector documentation