I Tested the 64,932-Star AI Hedge Fund — It Stopped at a Paywall in 40 Seconds
The test in one line: I installed the open-source AI hedge fund with 64,932 GitHub stars — a committee of AI analysts modelled on famous investors — and ran its own example fund for real. It stopped in forty seconds, before a single analyst produced a view. Not on an AI error. On a paywall. This post is the whole test report: what the system is, what I measured, the two failures I hit in order, and what going further would actually cost.
What ai-hedge-fund is (and is not)
The project is virattt/ai-hedge-fund on GitHub (MIT licence; I pinned version 2.7.2, commit 5c553b5). Think of it as a small investment firm rebuilt as software. Market data flows in from a service called Financial Datasets. Six analysts study it — five AI investors and one maths model — and each returns a conviction score (a grade from −1 to +1) with a written thesis, or abstains. A blender weighs the analysts' grades — an analyst with a better track record counts for more — a risk layer clamps the result against hard limits, and only then does the fund act, on paper.
It is a simulator. It replays over history (a backtest) or keeps a pretend-money ledger (a paper fund). The only brokers in the shipped code are a paper broker and a simulator — there is no real-money mode, and the README says so itself: "the system does not actually make any trades."
The team sheet — read from the code, not the README
The pinned code registers exactly six alpha models (ALPHA_MODEL_REGISTRY in hedge_fund/signals/__init__.py):
- PEAD — the one pure-maths model. It trades post-earnings-announcement drift: a stock that beats earnings expectations tends to keep drifting the same way for weeks.
- Five language-model investors — stylised approximations of Buffett, Munger, Graham, Lynch and Druckenmiller. Stylised is the honest word: the code gives each a written philosophy and a checklist; it is not the person, and it is not trained on their private judgement.
Every analyst sees point-in-time data only — what actually existed on that date, no future knowledge smuggled in. In backtests the fund is blinded further: the ticker, the industry and the calendar dates are withheld from the prompts, so a model's memory of what a famous stock did next cannot masquerade as skill.
The mandate I ran
The bundled example fund (hedge_fund/fund/example.yaml) splits $100,000 of pretend money across two pods: a deep-value pod at 60% (Graham-weighted, with Buffett and Munger) and an earnings-drift pod at 40% (run by PEAD), rebalanced weekly and measured against SPY. The risk rules sit in the same file, in plain numbers: no position above 25% of the fund; if the fund falls 10% from its peak it trades at half size; at 20% down it sells to cash and stays there. The risk layer is hard code, not a prompt — the AI can argue, but it cannot argue its way past a limit.
Measured results
| Step | Measured |
|---|---|
Install (fresh venv, pip install) | 618 MB installed; CLI reports version 2.7.2 |
Run 1 — model named in the repo's example env file (gemini-2.5-flash) | Died in 11 s: ValueError: ANTHROPIC_API_KEY not found |
Run 2 — the registry's Google model (gemini-3.8-flash) | Died in 40 s: FDClientError: GET /prices/ returned 402 — Payment required |
| AI spend across the whole test | $0 — no analyst ever received data to analyse |
The test session — every command, on record
The full recorded session — the install, both run attempts and the data-client probe, exactly as they happened — is in the companion folder topic-ai-hedge-fund-test in the visual-studio-learn-code repo. The one thing deliberately not in there is the key-passing line: keys are never published. Put your own GOOGLE_API_KEY in the environment and the session replays as recorded.
Failure 1 — the stale-example trap (11 seconds)
The repository's example environment file names gemini-2.5-flash, so I used it. The run died asking for an Anthropic key I never configured. The code explains it (hedge_fund/llm/client.py): model names route through a registry; the registry knows nine models, and an unlisted name falls back to the Anthropic transport. gemini-2.5-flash is not in the registry — only gemini-3.8-flash represents Google. Lesson one of this test: read the registry, not the example.
Failure 2 — the data wall (40 seconds)
With the registry's model, the fund built correctly and the backtest started — and the first data call, benchmark prices for SPY, came back 402 Payment Required. The shipped code hardcodes the Financial Datasets client: every run fetches prices, fundamentals and earnings events from that one service before any agent runs. The model is not what costs money here; the data is. The service's own message offers two doors: send an API key header, or pay per call.
What is the key worth? A third-party review — FullStack Alpha — prices the entry pack at US$20 one-time for 1,000 requests, with premium endpoints counting eight requests per call; treat that as a review figure to re-verify at purchase, not a quote. Your model key is separate and billed per run by the provider.
Two safety habits worth copying
- No real-money path. Its only brokers are paper and simulated, so there is no broker key to leak and no setting that turns it live by accident.
- Know your key file. Your model and data keys live in one file on your own disk (
~/.hedge-fund/.env). And the standing agent rule applies to anything you run: everything an agent reads — news, filings, web pages — is untrusted input; an agent cannot tell instructions from data.
The verdict
As a classroom for multi-agent design, this is one of the best free ones I have tested: a committee of specialists, a blender that weighs them by track record, a hard risk layer, and a scorecard that re-weights the analysts over time. As a money machine, it is nothing of the kind — it places no trades, its own README tells you so before you install, and its famous investors are checklists wearing famous names. Do not install it expecting a real-money trading bot; it is an educational research tool.
The question I ended the video with: the only thing between this test and the sequel is a twenty-dollar data key. Would you pay the twenty dollars to watch the committee argue — yes or no? Tell me in the comments; the answer decides whether I fund the key and run the full backtest.
Comments
Post a Comment