How AI Hedge Fund Works
AI Hedge Fund simulates an AI-powered hedge fund using 18 different investment strategy agents. Here's a complete guide to understanding the process from start to finish.
🔄 The Complete Process
AI Hedge Fund follows a structured workflow that simulates how a real hedge fund operates, but with AI agents making the decisions. Here's how it works:
Select Stocks
Choose any stock tickers you want to analyze (e.g., AAPL, MSFT, NVDA, TSLA). Free tickers include major tech stocks. For other stocks, you'll need a Financial Datasets API key.
- Free tickers: AAPL, GOOGL, MSFT, NVDA, TSLA
- Multiple stocks: Analyze several companies simultaneously
- Compare sectors: Different industries or markets
You can analyze multiple stocks simultaneously to compare different companies or sectors.
AI Agents Analyze
Our 18 AI agents analyze the stocks using their unique strategies. Each agent examines the companies from their perspective and generates trading signals (BUY, SELL, HOLD).
- Warren Buffett: Looks for wonderful companies at fair prices
- Peter Lynch: Seeks growth companies you can understand
- Technicals Agent: Analyzes chart patterns and indicators
- Sentiment Agent: Evaluates market sentiment and news
Each agent provides detailed reasoning for their decisions, helping you understand their investment philosophy. You can see their analysis in real-time as they process information.
Risk Manager Evaluates
The Risk Manager evaluates all signals from the analyst agents. It calculates risk metrics, sets position limits, and ensures the portfolio doesn't take excessive risk.
- Calculates Value at Risk (VaR)
- Sets maximum position sizes
- Enforces diversification rules
- Evaluates correlation between positions
- Monitors portfolio risk metrics
This step is crucial for protecting your portfolio from large losses. The Risk Manager acts as a safety net, ensuring no single position or strategy can cause excessive risk.
Portfolio Manager Decides
The Portfolio Manager makes final trading decisions based on all agent recommendations and risk constraints. It determines position sizes, executes trades, and manages the portfolio.
- Aggregates signals from all agents
- Determines optimal position sizes
- Executes buy/sell decisions
- Manages cash and positions
- Rebalances portfolio as needed
You see the final portfolio allocation and trading decisions. The Portfolio Manager considers all agent recommendations and risk limits to make optimal decisions.
📊 Trading Flow Structure
A typical trading flow follows this pattern:
Learn more about building flows and available agents.
💡 Example Trading Flows
Basic Flow Example
Goal: Analyze AAPL and MSFT using value and growth strategies
- Add Tickers Node: Set tickers to
AAPL, MSFT - Add Analyst Agents: Warren Buffett, Peter Lynch, Technicals Agent
- Connect Nodes: Tickers → All agents → Risk Manager → Portfolio Manager
- Configure: Set initial cash ($100,000), margin requirement (50%), select LLM model
- Run: Click "Run" and watch the analysis progress
- Each agent provides BUY/SELL/HOLD signals
- Risk Manager evaluates and sets limits
- Portfolio Manager makes final decisions
- See portfolio allocation and reasoning
See our complete guide for detailed instructions.
Multi-Strategy Analysis
Run multiple analyst agents in parallel, then aggregate their signals through the Risk Manager before final portfolio decisions.
Use Case: Get diverse perspectives on the same stocks. Each agent brings a different analytical approach, providing comprehensive coverage.
Sequential Analysis
Chain agents together where one agent's output feeds into the next. For example, fundamentals analysis feeds into valuation.
Use Case: Build complex analysis pipelines where each step builds on the previous one. This allows for deeper, more nuanced analysis.
🎯 Common Strategy Patterns
Combine agents in these proven patterns for different investment approaches:
Conservative Strategy
Agents: Warren Buffett + Ben Graham + Risk Manager
Focus on value investing with strong risk management. Ideal for conservative investors seeking stable returns and capital preservation. Emphasizes companies with strong fundamentals and competitive moats.
View Value Agents →Growth Strategy
Agents: Peter Lynch + Cathie Wood + Risk Manager
Focus on high-growth companies with innovation potential. Perfect for investors seeking above-average returns through growth. Targets companies that can scale rapidly and transform industries.
View Growth Agents →Balanced Strategy
Agents: Multiple value + growth agents + Risk Manager
Combine different approaches for diversified analysis. Provides comprehensive market perspective by balancing value and growth considerations. Reduces reliance on any single strategy.
View All Agents →Technical Strategy
Agents: Technicals Agent + Sentiment Agent + Risk Manager
Focus on technical indicators and market sentiment. Good for short to medium-term trading strategies. Relies on chart patterns, indicators, and market psychology.
View Analytical Agents →Fundamental Strategy
Agents: Fundamentals Agent + Valuation Agent + Risk Manager
Deep fundamental analysis with valuation. Ideal for long-term value investors. Focuses on understanding company financials and determining intrinsic value.
View Analytical Agents →Multi-Perspective
Agents: Value + Growth + Technicals + Risk Manager
Comprehensive analysis from multiple angles. Best for thorough stock evaluation. Combines fundamental, technical, and sentiment analysis for complete picture.
View All Agents →📈 Backtesting
Backtesting lets you test strategies on historical data to see how they would have performed.
Setting Up a Backtest
- Build your flow (same as regular analysis)
- Set date range (start and end dates)
- Set initial capital (e.g., $100,000)
- Click "Backtest"
Backtest Results Include:
- Daily portfolio value
- Total return (percentage)
- Sharpe ratio (risk-adjusted returns)
- Max drawdown (largest peak-to-trough decline)
- Win rate (percentage of profitable trades)
- Final positions and cash
- Test on different time periods
- Use realistic transaction costs
- Consider market conditions
- Compare multiple strategies
- Review individual trade decisions
Read more about backtesting best practices.
🖥️ Using the Web Interface
The web interface provides a visual way to build and run trading flows.
Left Sidebar
Agent library and flow management. Drag agents onto the canvas.
- Browse all 18 agents
- Save and load flows
- Access templates
Center Canvas
Visual flow builder. Drag-and-drop agents and connect them with edges.
- Drag agents from sidebar
- Connect nodes with arrows
- Zoom and pan for large flows
Right Panel
Node configuration. Set tickers, models, and parameters for each agent.
- Configure selected nodes
- Set stock tickers
- Choose LLM models
- Adjust parameters
Bottom Panel
Execution results and logs. See real-time analysis progress and results.
- Real-time progress updates
- Agent reasoning and signals
- Portfolio decisions
- Error messages and logs
Learn more about the web interface features.
Ready to Get Started?
Now that you understand how it works, start building your first trading flow.