GitHub - virattt/ai-hedge-fund: An AI Hedge Fund Team
Service

GitHub - virattt/ai-hedge-fund: An AI Hedge Fund Team

virattt
2025.04.20
·GitHub·by Anonymous
#AI#Hedge Fund#Trading#Agent#Python

Key Points

  • 1This project is a proof-of-concept for an AI-powered hedge fund, developed purely for educational and research purposes to explore AI's application in making theoretical trading decisions.
  • 2The system employs a diverse set of AI agents, including those embodying famous investor personas and functional agents for valuation, sentiment, fundamentals, technicals, risk, and portfolio management, all working collaboratively.
  • 3Users can run this simulated hedge fund via a command-line interface or a web application, requiring API keys for LLMs and financial data, with a clear disclaimer that it does not execute real trades and provides no investment advice.

This paper describes an open-source project titled "AI Hedge Fund," a proof-of-concept system designed to explore the application of artificial intelligence in making simulated trading decisions. The project explicitly states it is for educational and research purposes only, not intended for real trading or investment, and provides no investment advice or guarantees.

The core methodology of the AI Hedge Fund revolves around a multi-agent system, where distinct AI agents, each embodying a specific investment philosophy or analytical function, collaborate to process financial data and generate trading signals. These agents leverage Large Language Models (LLMs) to power their decision-making and analysis, with support for various LLM providers such as OpenAI, Groq, Anthropic, and DeepSeek, or local LLMs via Ollama.

The system comprises three main categories of agents:

  1. Investment Philosophy Agents (Persona Agents): These agents are designed to emulate the investment strategies of renowned investors. Each agent focuses on specific criteria and perspectives:
    • Aswath Damodaran Agent: Specializes in valuation, focusing on story, numbers, and disciplined valuation.
    • Ben Graham Agent: Identifies hidden gems with a margin of safety, adhering to value investing principles.
    • Bill Ackman Agent: Acts as an activist investor, taking bold positions and advocating for corporate change.
    • Cathie Wood Agent: Focuses on growth investing, emphasizing innovation and disruptive technologies.
    • Charlie Munger Agent: Seeks high-quality businesses at fair prices.
    • Michael Burry Agent: A contrarian investor hunting for deep value.
    • Mohnish Pabrai Agent: Looks for low-risk, high-return opportunities ("doubles").
    • Peter Lynch Agent: Identifies "ten-baggers" in everyday businesses.
    • Phil Fisher Agent: Conducts meticulous growth investing through "scuttlebutt" research.
    • Rakesh Jhunjhunwala Agent: Represents an Indian investment perspective.
    • Stanley Druckenmiller Agent: Focuses on macro trends and asymmetric opportunities with growth potential.
    • Warren Buffett Agent: Seeks wonderful companies at a fair price.
  1. Analytical Agents: These agents perform specialized financial analysis:
    • Valuation Agent: Calculates the intrinsic value of a stock and generates trading signals based on this metric.
    • Sentiment Agent: Analyzes market sentiment to generate trading signals.
    • Fundamentals Agent: Examines fundamental financial data to produce trading signals.
    • Technicals Agent: Analyzes technical indicators to generate trading signals.
  1. Decision-Making and Management Agents: These agents synthesize the information from other agents and manage the simulated portfolio:
    • Risk Manager: Calculates risk metrics and establishes position limits to manage potential downside.
    • Portfolio Manager: Makes final simulated trading decisions based on all inputs and generates theoretical orders.

The system does not execute actual trades. Financial data for analysis is primarily sourced through a FINANCIAL_DATASETS_API_KEY, though data for specific tickers (AAPL, GOOGL, MSFT, NVDA, TSLA) is available without an API key.

Technically, the project is implemented in Python and managed with Poetry for dependency resolution. Users are required to set up API keys for their chosen LLM provider (e.g., OPENAI_API_KEY) and optionally for financial data. The system can be operated via a Command Line Interface (CLI), allowing specification of tickers, date ranges (start and end dates), and the use of local LLMs. A separate backtester script src/backtester.py is also provided to evaluate historical performance. Additionally, a web application interface is available for a more user-friendly experience. The project is licensed under the MIT License.