랭킹으로 돌아가기

virattt/ai-hedge-fund

Python

An AI Hedge Fund Team

스타 성장
스타
62.3k
포크
11k
주간 성장
이슈
49
20k40k60k
2024년 11월2025년 5월2025년 12월2026년 7월
아티팩트PyPIpip install ai-hedge-fund
README

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:

  1. Aswath Damodaran Agent - The Dean of Valuation, focuses on story, numbers, and disciplined valuation
  2. Ben Graham Agent - The godfather of value investing, only buys hidden gems with a margin of safety
  3. Bill Ackman Agent - An activist investor, takes bold positions and pushes for change
  4. Cathie Wood Agent - The queen of growth investing, believes in the power of innovation and disruption
  5. Charlie Munger Agent - Warren Buffett's partner, only buys wonderful businesses at fair prices
  6. Michael Burry Agent - The Big Short contrarian who hunts for deep value
  7. Mohnish Pabrai Agent - The Dhandho investor, who looks for doubles at low risk
  8. Nassim Taleb Agent - The Black Swan risk analyst, focuses on tail risk, antifragility, and asymmetric payoffs
  9. Peter Lynch Agent - Practical investor who seeks "ten-baggers" in everyday businesses
  10. Phil Fisher Agent - Meticulous growth investor who uses deep "scuttlebutt" research
  11. Rakesh Jhunjhunwala Agent - The Big Bull of India
  12. Stanley Druckenmiller Agent - Macro legend who hunts for asymmetric opportunities with growth potential
  13. Warren Buffett Agent - The oracle of Omaha, seeks wonderful companies at a fair price
  14. Valuation Agent - Calculates the intrinsic value of a stock and generates trading signals
  15. Sentiment Agent - Analyzes market sentiment and generates trading signals
  16. Fundamentals Agent - Analyzes fundamental data and generates trading signals
  17. Technicals Agent - Analyzes technical indicators and generates trading signals
  18. Risk Manager - Calculates risk metrics and sets position limits
  19. Portfolio Manager - Makes final trading decisions and generates orders
Screenshot 2025-03-22 at 6 19 07 PM

Note: the system does not actually make any trades.

Twitter Follow

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.

Screenshot 2025-01-06 at 5 50 17 PM

Quick Start

  1. Install Poetry (if not already installed):
curl -sSL https://install.python-poetry.org | python3 -
  1. 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: Screenshot 2025-01-06 at 5 47 52 PM

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.

Screenshot 2025-06-28 at 6 41 03 PM

How to Contribute

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. 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.

관련 저장소
public-apis/public-apis

A collective list of free APIs

PythonPyPIMIT Licenseapipublic-apis
apilayer.com
451.9k49.7k
EbookFoundation/free-programming-books

:books: Freely available programming books

PythonPyPICreative Commons Attribution 4.0 Internationaleducationbooks
ebookfoundation.github.io/free-programming-books/
392.7k66.6k
donnemartin/system-design-primer

Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.

PythonPyPIOtherprogrammingdevelopment
358.7k57.3k
vinta/awesome-python

An opinionated list of Python frameworks, libraries, tools, and resources

PythonPyPIOtherawesomepython
awesome-python.com
309.6k28.4k
practical-tutorials/project-based-learning

Curated list of project-based tutorials

PythonPyPIMIT Licensetutorialproject
274.6k35.4k
TheAlgorithms/Python

All Algorithms implemented in Python

PythonPyPIMIT Licensepythonalgorithm
thealgorithms.github.io/Python/
223k50.9k
NousResearch/hermes-agent

The agent that grows with you

PythonPyPIMIT Licenseaiai-agent
hermes-agent.nousresearch.com
218.5k41.3k
Significant-Gravitas/AutoGPT

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

PythonPyPIOtheraiopenai
agpt.co
185.6k46.1k
yt-dlp/yt-dlp

A feature-rich command-line audio/video downloader

PythonPyPIThe Unlicenseyoutube-dlpython
discord.gg/H5MNcFW63r
179.4k15.3k
microsoft/markitdown

Python tool for converting files and office documents to Markdown.

PythonPyPIMIT Licenselangchainopenai
168k12.1k
521xueweihan/HelloGitHub

:octocat: 分享 GitHub 上有趣、入门级的开源项目。Share interesting, entry-level open source projects on GitHub.

PythonPyPIgithubhellogithub
hellogithub.com
166.5k12.4k
AUTOMATIC1111/stable-diffusion-webui

Stable Diffusion web UI

PythonPyPIGNU Affero General Public License v3.0deep-learningdiffusion
164.3k30.4k