AI Hedge Fund: A Pluggable, Backtestable Simulator for LLM-Driven Trading Strategies
Educational proof of concept in which a team of AI agents modeled on investors like Ben Graham and Bill Ackman makes trading decisions; not intended for real trading.
At a glance
- What is it?
- virattt/ai-hedge-fund is a Python-based proof of concept that simulates an AI-run hedge fund. It is educational only, makes no real trades, and is being rebuilt around persistent, backtestable 'alpha models'.
- Who is it for?
- Adopt AI Hedge Fund if you are a developer or quant researcher who wants to experiment with LLM-powered trading signals in a simulated, backtestable environment, and if you accept that it will not place real trades. Do not use it if you need a production trading system or any form of investment advice.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 12 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 14, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
What This Project Actually Does
AI Hedge Fund is a proof of concept for using large language models to make trading decisions. The README is blunt about its scope: it is for educational purposes only, is not intended for real trading, and the system does not actually make any trades. The audience is developers and researchers who want to see how LLM agents might reason about market data, and who want a sandbox to test those ideas without risking capital. The project is not a trading bot. It is a simulator that produces decisions, not orders. That distinction matters because the output looks like a fund's workflow, but the loop stops at analysis and backtesting.
The Shift from Agents to Alpha Models
The repository is mid-transition. The README announces a rebuild into a persistent, always-on AI hedge fund, where the fund itself is a first-class entity that can be backtested, paper-traded, and optionally run live. The investor agents are being reimagined as pluggable, backtestable 'alpha models'. That is a significant architectural change. In the current version, you interact with a terminal app that builds a fund from stocks, strategies, and rebalance cadence. In the future, the unit of work appears to be a mandate file that describes the desk, and the alpha models are the components that generate signals. The vision document is referenced but not included in the README, so the exact mechanics of the new model are not fully specified. What is clear is that the project is moving away from a fixed team of agents toward a more modular, testable structure.
Installation and First Run
Installation is straightforward. The README gives three options: pipx install aihf, uv tool install aihf, or pip install aihf into an environment of your choice. After that, running aihf with no arguments launches the interactive terminal app. API keys are requested on first use and saved to ~/.hedge-fund/.env. You need a Financial Datasets API key for prices, fundamentals, and earnings, plus one LLM API key from a supported provider: Anthropic, OpenAI, DeepSeek, Google, xAI, or Kimi. Keys exported in your shell take precedence over the saved file. That lazy configuration is convenient for a first run, but it means you need to have both keys ready before you can actually test anything.
Mandate Files and the Non-Interactive Cycle
The non-interactive mode is where the project's design becomes visible. A mandate file, saved in ~/.hedge-fund/mandates/, defines the desk: strategies, staff, risk, capital, and cadence. It never names tickers. You pass tickers on the command line for each run, for example: aihf ~/.hedge-fund/mandates/example.yaml --tickers AAPL,MSFT. This separation is deliberate. A mandate is reusable across different tickers and time periods. Running that command produces a full cycle record as JSON on stdout and a short human summary on stderr. Adding --backtest runs the mandate over history at its rebalance cadence. That is a clean interface: the mandate is the configuration, the tickers are the input, and the output is structured data. It makes automation possible, which fits the 'always-on fund' vision.
What the Backtest Does and Does Not Prove
The backtest feature is central to the project's value, but the README contains no details on how the backtest handles survivorship bias, transaction costs, or slippage. It says the goal is to explore the use of AI in trading decisions, and that past performance does not indicate future results. That is a standard disclaimer, but it is also a real limitation. Without knowing the backtest's assumptions, you cannot judge whether the equity curve it draws is meaningful. The project is a proof of concept, so the backtest is likely a rough simulator rather than a precision tool. If you are evaluating a strategy, you need to treat the output as a sanity check, not as evidence of profitability. The documentation does not claim otherwise, but it also does not provide the caveats you would want in a serious backtesting framework.
A Concrete Limitation: No Real Trades and No Position Sizing Details
The most obvious limitation is that the system does not actually make any trades. That is stated twice in the README. For anyone looking for an automated trading system, this is a dealbreaker. The project also does not describe how capital is allocated across strategies or how risk is managed beyond the word 'risk' in the mandate. The mandate file includes 'risk' as a field, but there is no specification of what risk parameters are supported. That is a gap. If you want to model drawdown limits or position sizing, you have to infer them from the code, which is not documented in the README. This is the wrong tool if you need a live trading execution layer, and it is also the wrong tool if you need a rigorously specified backtesting engine. It is a research scaffold, not a trading platform.
Alternatives and the Difference in Approach
A real alternative is QuantConnect's Lean, an open-source algorithmic trading engine. Lean is a full backtesting and live trading platform that supports multiple asset classes, has a detailed data feed, and handles order simulation with realistic costs. The difference is fundamental: Lean is a deterministic engine where your strategy is code that processes data and emits orders. AI Hedge Fund is a proof of concept where LLM agents generate decisions, and the backtest is a secondary feature. If you want to test a systematic strategy with known parameters, Lean gives you control over every assumption. If you want to explore how an LLM reasons about earnings and prices, AI Hedge Fund is more direct. The trade-off is between a mature, tested framework and an experimental environment that is still evolving.
Maintenance, Licensing, and Upgrade Path
The project is under active development. The last push was August 7, 2026, with release v2.2.0 on the same day. The release history shows a rapid cadence: v2.1.0 on August 4 and v2.0.2 on July 30. That suggests frequent changes. The README warns that the project is evolving and points to a vision and roadmap, which are not included in the README. For adopters, that means the CLI and mandate file format may change between versions. The license is MIT, which allows commercial use, modification, and redistribution with attribution. That is permissive, but it also means there is no warranty and no support. The upgrade cost is likely to be low if you use the pipx or uv installation, since those tools manage versions, but you should expect to read the changelog before each update. The project is a moving target, so pinning a version is a reasonable first step.
Editorial conclusion
Adopt AI Hedge Fund if you are a developer or quant researcher who wants to experiment with LLM-powered trading signals in a simulated, backtestable environment, and if you accept that it will not place real trades. Do not use it if you need a production trading system or any form of investment advice. Before relying on any backtest results, verify that your LLM API provider and Financial Datasets key are correctly configured, and review the mandate file format to ensure your strategies and risk parameters are represented as you intend. The project is explicitly a proof of concept, so treat every output as a research artifact, not a recommendation.
Community notes