This is a proof of concept for an AI-powered hedge fund. The goal of this project is to explore the use of AI to make trading decisions. This project is for educational purposes only and is not intended for real trading or investment.
This system employs several agents working together:
- Aswath Damodaran Agent - The Dean of Valuation, focuses on story, numbers, and disciplined valuation
- Ben Graham Agent - The godfather of value investing, only buys hidden gems with a margin of safety
- Bill Ackman Agent - An activist investor, takes bold positions and pushes for change
- Cathie Wood Agent - The queen of growth investing, believes in the power of innovation and disruption
- Charlie Munger Agent - Warren Buffett's partner, only buys wonderful businesses at fair prices
- Michael Burry Agent - The Big Short contrarian who hunts for deep value
- Peter Lynch Agent - Practical investor who seeks "ten-baggers" in everyday businesses
- Phil Fisher Agent - Meticulous growth investor who uses deep "scuttlebutt" research
- Rakesh Jhunjhunwala Agent - The Big Bull of India
- Stanley Druckenmiller Agent - Macro legend who hunts for asymmetric opportunities with growth potential
- Warren Buffett Agent - The oracle of Omaha, seeks wonderful companies at a fair price
- Valuation Agent - Calculates the intrinsic value of a stock and generates trading signals
- Sentiment Agent - Analyzes market sentiment and generates trading signals
- Fundamentals Agent - Analyzes fundamental data and generates trading signals
- Technicals Agent - Analyzes technical indicators and generates trading signals
- Risk Manager - Calculates risk metrics and sets position limits
- Portfolio Manager - Makes final trading decisions and generates orders

As of June 2025, there are two ways to run the AI Hedge Fund:
- ⌨️ Command Line Interface - Terminal-based approach
- 🖥️ Web Application (NEW!) - User-friendly web interface
Note: the system simulates trading decisions, it does not actually trade.
This project is for educational and research purposes only.
- Not intended for real trading or investment
- No investment advice or guarantees provided
- Creator assumes no liability for financial losses
- Consult a financial advisor for investment decisions
- Past performance does not indicate future results
By using this software, you agree to use it solely for learning purposes.
Before you can run the AI Hedge Fund, you'll need to install it and set up your API keys. These steps are common to both the full-stack web application and command line interface.
git clone https://github.com/virattt/ai-hedge-fund.git
cd ai-hedge-fund
Create a .env
file for your API keys:
# Create .env file for your API keys (in the root directory)
cp .env.example .env
Open and edit the .env
file to add your API keys:
# For running LLMs hosted by openai (gpt-4o, gpt-4o-mini, etc.)
OPENAI_API_KEY=your-openai-api-key
# For running LLMs hosted by groq (deepseek, llama3, etc.)
GROQ_API_KEY=your-groq-api-key
# For getting financial data to power the hedge fund
FINANCIAL_DATASETS_API_KEY=your-financial-datasets-api-key
Important: You must set at least one LLM API key (OPENAI_API_KEY
, GROQ_API_KEY
, ANTHROPIC_API_KEY
, or DEEPSEEK_API_KEY
) for the hedge fund to work.
Financial Data: Data for AAPL, GOOGL, MSFT, NVDA, and TSLA is free and does not require an API key. For any other ticker, you will need to set the FINANCIAL_DATASETS_API_KEY
in the .env file.
For users who prefer working with command line tools, you can run the AI Hedge Fund directly via terminal. This approach offers more granular control and is useful for automation, scripting, and integration purposes.

Choose one of the following installation methods:
- Install Poetry (if not already installed):
curl -sSL https://install.python-poetry.org | python3 -
- Install dependencies:
poetry install
-
Make sure you have Docker installed on your system. If not, you can download it from Docker's official website.
-
Navigate to the docker directory:
cd docker
- Build the Docker image:
# On Linux/Mac:
./run.sh build
# On Windows:
run.bat build
poetry run python src/main.py --ticker AAPL,MSFT,NVDA
# Navigate to the docker directory first
cd docker
# On Linux/Mac:
./run.sh --ticker AAPL,MSFT,NVDA main
# On Windows:
run.bat --ticker AAPL,MSFT,NVDA main
You can also specify a --ollama
flag to run the AI hedge fund using local LLMs.
# With Poetry:
poetry run python src/main.py --ticker AAPL,MSFT,NVDA --ollama
# With Docker (from docker/ directory):
# On Linux/Mac:
./run.sh --ticker AAPL,MSFT,NVDA --ollama main
# On Windows:
run.bat --ticker AAPL,MSFT,NVDA --ollama main
You can also specify a --show-reasoning
flag to print the reasoning of each agent to the console.
# With Poetry:
poetry run python src/main.py --ticker AAPL,MSFT,NVDA --show-reasoning
# With Docker (from docker/ directory):
# On Linux/Mac:
./run.sh --ticker AAPL,MSFT,NVDA --show-reasoning main
# On Windows:
run.bat --ticker AAPL,MSFT,NVDA --show-reasoning main
You can optionally specify the start and end dates to make decisions for a specific time period.
# With Poetry:
poetry run python src/main.py --ticker AAPL,MSFT,NVDA --start-date 2024-01-01 --end-date 2024-03-01
# With Docker (from docker/ directory):
# On Linux/Mac:
./run.sh --ticker AAPL,MSFT,NVDA --start-date 2024-01-01 --end-date 2024-03-01 main
# On Windows:
run.bat --ticker AAPL,MSFT,NVDA --start-date 2024-01-01 --end-date 2024-03-01 main
poetry run python src/backtester.py --ticker AAPL,MSFT,NVDA
# Navigate to the docker directory first
cd docker
# On Linux/Mac:
./run.sh --ticker AAPL,MSFT,NVDA backtest
# On Windows:
run.bat --ticker AAPL,MSFT,NVDA backtest
You can optionally specify the start and end dates to backtest over a specific time period.
# With Poetry:
poetry run python src/backtester.py --ticker AAPL,MSFT,NVDA --start-date 2024-01-01 --end-date 2024-03-01
# With Docker (from docker/ directory):
# On Linux/Mac:
./run.sh --ticker AAPL,MSFT,NVDA --start-date 2024-01-01 --end-date 2024-03-01 backtest
# On Windows:
run.bat --ticker AAPL,MSFT,NVDA --start-date 2024-01-01 --end-date 2024-03-01 backtest
You can also specify a --ollama
flag to run the backtester using local LLMs.
# With Poetry:
poetry run python src/backtester.py --ticker AAPL,MSFT,NVDA --ollama
# With Docker (from docker/ directory):
# On Linux/Mac:
./run.sh --ticker AAPL,MSFT,NVDA --ollama backtest
# On Windows:
run.bat --ticker AAPL,MSFT,NVDA --ollama backtest
The new way to run the AI Hedge Fund is through our web application that provides a user-friendly interface. This is recommended for most users, especially those who prefer visual interfaces over command line tools.

cd app && ./run.sh
If you get a "permission denied" error, run this first:
cd app && chmod +x run.sh && ./run.sh
# Go to /app directory
cd app
# Run the app
\.run.bat
That's it! These scripts will:
- Check for required dependencies (Node.js, Python, Poetry)
- Install all dependencies automatically
- Start both frontend and backend services
- Automatically open your web browser to the application
For detailed setup instructions, troubleshooting, and advanced configuration options, see:
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
Important: Please keep your pull requests small and focused. This will make it easier to review and merge.
If you have a feature request, please open an issue and make sure it is tagged with enhancement
.
This project is licensed under the MIT License - see the LICENSE file for details.