virattt/ai-hedge-fund
Summary
This is a proof-of-concept AI-powered hedge fund that uses multiple AI agents (e.g., Warren Buffett, Ben Graham) to simulate trading decisions for educational purposes. It is an open-source project from GitHub, not intended for real trading.
View Cached Full Text
Cached at: 07/12/26, 10:51 AM
virattt/ai-hedge-fund
Source: https://github.com/virattt/ai-hedge-fund
AI Hedge Fund
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.
🚧 The project is evolving. We’re rebuilding it into a persistent, always-on AI hedge fund — a fund as a first-class entity you can backtest, paper-trade, and (opt-in) run live, with the investor agents reimagined as pluggable, backtestable “alpha models.” Read the Vision → and the Roadmap →.
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
- Mohnish Pabrai Agent - The Dhandho investor, who looks for doubles at low risk
- Nassim Taleb Agent - The Black Swan risk analyst, focuses on tail risk, antifragility, and asymmetric payoffs
- 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
Note: the system does not actually make any trades.
Disclaimer
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.
Table of Contents
How to Install
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.
1. Clone the Repository
git clone https://github.com/virattt/ai-hedge-fund.git
cd ai-hedge-fund
2. Set up API keys
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 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 (e.g. OPENAI_API_KEY, GROQ_API_KEY, ANTHROPIC_API_KEY, or DEEPSEEK_API_KEY) for the hedge fund to work.
How to Run
⌨️ Command Line Interface
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.
Quick Start
- Install Poetry (if not already installed):
curl -sSL https://install.python-poetry.org | python3 -
- Install dependencies:
poetry install
Run the AI Hedge Fund
poetry run python src/main.py --ticker AAPL,MSFT,NVDA
You can also specify a --ollama flag to run the AI hedge fund using local LLMs.
poetry run python src/main.py --ticker AAPL,MSFT,NVDA --ollama
You can optionally specify the start and end dates to make decisions over a specific time period.
poetry run python src/main.py --ticker AAPL,MSFT,NVDA --start-date 2024-01-01 --end-date 2024-03-01
Run the Backtester
poetry run python src/backtester.py --ticker AAPL,MSFT,NVDA
Example Output:
Note: The --ollama, --start-date, and --end-date flags work for the backtester, as well!
🖥️ Web Application
The new way to run the AI Hedge Fund is through our web application that provides a user-friendly interface. This is recommended for users who prefer visual interfaces over command line tools.
Please see detailed instructions on how to install and run the web application here.
How to Contribute
- 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.
Feature Requests
If you have a feature request, please open an issue and make sure it is tagged with enhancement.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Similar Articles
@IndieDevHailey: This open-source project lets AI clone Buffett, Burry, and Cathie Wood into a fund team! A GitHub project called ai-hedge-fund has blown up to 62k stars! It did an amazing thing: turned all those top Wall Street investing legends into AI! Buffett, Munger, …
An open-source project called ai-hedge-fund has gained 62k stars on GitHub. It clones the strategies of 14 legendary investors like Buffett, Munger, and Cathie Wood into AI, forming a virtual fund team. It supports backtesting, simulation, and live trading (for learning only), and provides stock analysis process similar to real human meetings.
@antpalkin: A finance professor manages $200M with AI agents, and he told everyone why: "Large language models are at the level of …
Promotional post about Horizon, an AI-driven trading strategy platform that lets users backtest and deploy strategies in plain English, citing a professor managing $200M with AI agents and returning 56% last year.
AI-Trader: Benchmarking Autonomous Agents in Real-Time Financial Markets
This paper introduces AI-Trader, the first fully automated live benchmark for evaluating LLMs in financial decision-making across US stocks, A-shares, and cryptocurrencies. It highlights that general intelligence does not guarantee trading success and emphasizes the importance of risk control in autonomous agents.
built an ai agent pipeline for trading that won't let a single model near real money without proving itself first
The author built PortfolioLab, an AI agent pipeline for trading that stages models through backtesting, paper trading, and read-only API execution to prevent premature exposure to real money. They are seeking feedback on trust patterns in AI agent architectures for high-stakes applications.
@51bodila: Jane Street Head of Technology showed the code that generates $13B profit - using it, you can build your own hedge fund…
Jane Street's Head of Technology presents code that purportedly generates $13B profit, offering a template to build your own AI-powered hedge fund.