Open Source
Explore the latest AI open-source projects from GitHub and HuggingFace.
Explore the latest AI open-source projects from GitHub and HuggingFace.
AI Hedge Fund is an open-source multi-agent system that simulates an investment team by deploying 18 specialized AI agents, each modeled after a famous investor's philosophy or a specific analytical discipline. With over 46,000 GitHub stars and 8,100 forks, it has become one of the most popular AI finance projects on GitHub, demonstrating how multi-agent architectures can tackle complex decision-making tasks that require diverse perspectives. ## What AI Hedge Fund Does The project creates a simulated hedge fund where multiple AI agents collaborate to analyze stocks, evaluate risk, and make portfolio decisions. Each agent brings a distinct investment philosophy or analytical approach, and the system aggregates their recommendations into a final trading signal. The result is an educational framework that shows how multi-agent systems can model expert disagreement and consensus. This is explicitly not a real trading system. The creators state clearly that it is for educational and research purposes only, and users should not use it for actual investment decisions. ## Agent Architecture The system deploys 18 agents organized into three categories: ### Investor-Inspired Agents (12) These agents embody the investment philosophies of renowned investors: | Agent | Philosophy | |-------|----------| | Warren Buffett | Long-term value investing with moats | | Charlie Munger | Mental models and multidisciplinary thinking | | Benjamin Graham | Deep value, margin of safety | | Cathie Wood | Disruptive innovation and growth | | Michael Burry | Contrarian, deep-dive analysis | | Bill Ackman | Activist investing, operational improvement | | Peter Lynch | Growth at a reasonable price (GARP) | | Phil Fisher | Qualitative growth analysis | | George Soros | Macro trends and reflexivity | | Ray Dalio | Economic cycles and all-weather approach | | Stanley Druckenmiller | Concentrated macro bets | | Aswath Damodaran | Quantitative valuation frameworks | Each agent receives the same market data but interprets it through its own philosophical lens. A Graham agent might flag a stock as undervalued based on book value, while a Wood agent might dismiss the same stock for lacking innovation potential. ### Analytical Agents (4) These agents handle specific data-processing tasks: - **Valuation Agent**: Calculates intrinsic value using DCF, comparable analysis, and other models - **Sentiment Agent**: Analyzes news, social media, and market sentiment - **Fundamentals Agent**: Evaluates financial statements, margins, and growth metrics - **Technical Agent**: Performs chart pattern and indicator analysis ### Operational Agents (2) - **Risk Manager**: Assesses portfolio risk, position sizing, and correlation - **Portfolio Manager**: Synthesizes all agent outputs into final buy/sell/hold decisions ## Multi-LLM Support The system supports multiple LLM providers, giving users flexibility in how they power the agents: - OpenAI (GPT series) - Anthropic (Claude) - Groq (fast inference) - DeepSeek - Ollama (local models) This multi-provider support means users can run the entire system locally with Ollama for zero API cost, or use cloud providers for higher-quality reasoning at the expense of per-query fees. ## Deployment Options AI Hedge Fund offers two interfaces: **Command-Line Interface**: Direct Python execution that supports backtesting against historical data. Users can specify tickers, date ranges, and which agents to activate. This is the preferred option for researchers who want to automate experiments. **Web Application**: A full-stack interface with a TypeScript frontend that provides dashboards for viewing agent recommendations, portfolio allocations, and historical performance. This is more accessible for users who prefer visual interaction. ## Technical Stack The project uses Python for the backend agent framework (58% of the codebase) and TypeScript for the web frontend (38%). Dependency management uses Poetry, and the system requires at least one LLM API key to function. An optional Financial Datasets API key expands the available ticker coverage beyond the default set. ## Educational Value The primary appeal of AI Hedge Fund is educational. It demonstrates several important concepts: - **Multi-agent orchestration**: How to coordinate multiple specialized agents toward a shared goal - **Perspective diversity**: How different analytical frameworks produce different conclusions from the same data - **Consensus mechanisms**: How a portfolio manager agent can synthesize conflicting recommendations - **Backtesting methodology**: How to evaluate AI-generated trading signals against historical data These patterns transfer directly to non-financial domains. Any problem requiring multiple expert perspectives, such as medical diagnosis, legal analysis, or engineering review, can benefit from similar architectures. ## Limitations and Considerations The project carries important caveats. Past performance of backtests does not predict future results. The agents use LLM reasoning, which is probabilistic and can produce inconsistent outputs. The system does not account for real-world trading frictions like slippage, commissions, or market impact. And the investor persona approach, while engaging, is a simplification of complex investment philosophies that evolved over decades. Despite these limitations, the project succeeds at its stated goal: demonstrating how multi-agent AI systems can approach complex analytical tasks that benefit from diverse perspectives.