Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
A

ai-hedge-fund

> 编程语言
Open source

An AI Hedge Fund Team

62.6K stars0 likes1 views
WebsiteGitHub

About

An AI Hedge Fund Team

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 →.

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

bash
pipx install aihf

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

Then run it from anywhere:

bash
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.
  • One LLM API key for the LLM-powered alpha models. Supported providers: Anthropic, OpenAI, DeepSeek, Google, xAI, Kimi.

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

How to Run

Interactive app

bash
aihf

With no arguments, this launches the interactive terminal app. Build a fund — pick stocks, strategies, rebalance cadence — or backtest a saved fund and watch its equity curve draw against its benchmark. Funds you build are saved as mandate files in ~/.hedge-fund/mandates/.

Non-interactive

Run one fund cycle from a mandate file. The full cycle record prints to stdout as JSON; a short human summary goes to stderr:

bash
aihf ~/.hedge-fund/mandates/example.yaml --tickers AAPL,MSFT

Backtest the mandate over history at its rebalance cadence:

bash
aihf ~/.hedge-fund/mandates/example.yaml --tickers AAPL,MSFT --backtest

A mandate is the desk — strategies, staff, risk, capital, cadence — and never names tickers; --tickers says what to point it at for this run.

Development

bash
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.

Issues· 168 open

View all issuesOpen on GitHub
  • #713

    question

    Updated Sep 26, 2026
  • #720

    Model memory can still leak into backtests through the ticker and filing dates in the snapshot

    Updated Sep 25, 2026
  • #718

    Reject NaN prices before SimBroker mutates the book

    Updated Sep 25, 2026
  • #711

    Bug: App ignores OPENAI_BASE_URL overrides and fails to route to custom endpoints (Groq)

    bugUpdated Sep 25, 2026
  • #706

    Financial Data sets API not working

    bugUpdated Aug 24, 2026
  • #691

    The Unlimited Access Idea

    enhancementUpdated Aug 15, 2026
  • #703

    Proposal: add point-in-time momentum alpha model to v2

    Updated Aug 4, 2026
  • #702

    'Inconsistent fundamental metrics (D/E, ROE) across agents in the same run; Valuation Analyst results dropped from final output; empty news sentiment data'.

    bugUpdated Aug 1, 2026
  • #605

    能否增加支持qwen的大模型?

    Updated Jul 31, 2026
  • #685

    有没有哥们试过?分析一个耗费多少 token?

    enhancementUpdated Jul 31, 2026

> Tags

Python

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 29, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言