AI Card Bao RTTQMDX.AICARDBAO.COM
Home / open source / AI Hedge Fund
AI TOOL / #12932

AI Hedge Fund

A hedge fund team composed of AI investor agents that make trading decisions from the perspective of a traditional fund.

Introduction

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.

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.

How to Install

pipx install aihf

(or uv tool install aihf, or pip install aihf into an environment of your choice)

Then run it from anywhere:

aihf

API keys

The app asks for keys the first time it needs them and saves them to ~/.hedge-fund/.env — nothing to configure up front. It needs:

  • A Financial Datasets API key, for prices, fundamentals, and earnings. Or, instead of a key, the private key of a Base wallet holding USDC: every call then pays for itself with x402 (pip install 'aihf[x402]'; last 365 days of data, non-professional use).
  • One model API key for the investor agents. Supported providers: Anthropic, OpenAI, DeepSeek, Google, xAI, Kimi, TypeSafe (Jev).

Keys exported in your shell always win over the saved file.

How to Run

Interactive app

aihf

With no arguments, this launches the interactive terminal app. It has two modes:

  • Paper trading — your funds, each with a ledger of real market days and fake money. Highlight a fund to see what its next run will do; press enter to run it through the next completed session (an approval step shows the exact decision about to execute before anything trades), s for its full session history, h/r for the kill switch. Build a new fund from the same list: strategies, capital, cadence, tickers, and it is live. Every session is appended to a hash-chained ledger in ~/.hedge-fund/paper//, so NAV is a track record, not a reset.
  • Backtesting — replay a fund over history and watch its equity curve draw against its benchmark. Results are saved to ~/.hedge-fund/research/. Fund definitions live in ~/.hedge-fund/mandates/ and carry no tickers; you pick the universe per backtest.

Development

git clone https://github.com/virattt/ai-hedge-fund.git
cd ai-hedge-fund
poetry install
poetry run aihf
poetry run pytest hedge_fund

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.

Visits:76 Updated:2026-12-05 AI tools

Related

USTC Open Source Software Mirror If you are unsure about how to configure the installation sources for Linux distributions or software, we provide guidance on setting up these sources for popular distribution versions. Empty like a net Kongruo.cn is a comprehensive platform that aggregates various types of resource content. It offers free online tools, such as programming tutorials, dictionaries, humorous jokes, classical literature materials, recipes, sound effects, and fonts, in addition to practical software resources. Its mission is to create a convenient and diverse online sharing environment for users. Seeing the big picture through the details Zhwei Shi Jian – the most comprehensive platform aggregating hot topics in the internet society, providing in-depth analyses of the truth behind various events. Here, you can gain a deeper understanding of China in the digital age. KukuAI Office Intelligent Agent Kuku AI is an AI-powered office assistant jointly developed by Baidu Wenku and Baidu Netdisk. It can create documents in formats such as Word, PPT, and Excel, and perform data analysis, thereby integrating the content stored in both Netdisk and Wenku. How To Cook Recipe Website An open-source recipe website where each recipe is automatically translated into 27 different languages by AI, allowing users to prepare meals in their native languages. Nanotechnology-based AI We pioneered the concept of multi-agent clusters, enabling the generation of expert-level videos, reports, and PPTs in just one step. Our platform integrates the MCP Universal Toolkit with sixteen major models, including DeepSeek, ZhiNao, and Tongyi Qianwen, thus supporting advanced reasoning capabilities as well as personalized knowledge management functions.