I tested AI Hedge Fund, the open-source repo with 64,000 GitHub stars
How the multi-agent fund turns five investor agents and a quant model into a portfolio, the math behind each step, and a live paper run on DeepSeek where one weight in a strategy file decided two of five stocks.


AI Hedge Fund is Virat Singh's open-source repository for running a fund with AI agents, and 64,000 people have starred it on GitHub. It's built like a small pod shop: investor agents form views, and plain code decides the money. To see how that works in practice, a $100,000 paper fund was built with it, run live on DeepSeek for the 9 October 2026 session, and every number it produced was traced back through the code.
Graham, Buffett and Munger read the same filings on five stocks. Buffett and Munger liked Adobe and Autodesk. Graham didn't, and the strategy file counts his vote twice. With equal votes, those two names would have held 24% of the fund. With Graham's double vote, Adobe got 2.7% and Autodesk nothing. One line in a 13-line YAML file, weight: 2.0, moved the book more than the language model did.
Latest video: Open Source AI Hedge Fund: Multi-Agent Trading with DeepSeek
What AI Hedge Fund is
Virat Singh started the repository in November 2024. He also founded Financial Datasets, the data company the fund reads by default, now in Y Combinator. Ten releases have shipped since July, from a rebuild in 2.0.0 on 18 July to 2.5.0 on 2 October, which added paper trading: a fund advances one real market session at a time with fake money, and you approve each decision before it trades. Its README calls it a proof of concept for education that, in its own words, "does not actually make any trades".
How it works
A fund starts as a mandate: strategies, capital, a rebalance cadence, risk limits and a list of tickers. For each ticker the data layer builds a snapshot of prices and the last four quarters, only as they were filed by that date. A backtest goes one step further and hides the company name and the dates, so a model can't lean on what it remembers about how earnings turned out.
Six analysts read that snapshot. Five are investor prompts run by the language model you pick: Graham wants a margin of safety, Buffett a moat, Munger inverts and asks what would make the business fail, Lynch wants growth at a reasonable price, and Druckenmiller looks for a turn in the trend, the only one allowed to short. Number six is pure math: post-earnings drift, which buys after an earnings beat and sells after a miss. Each returns a signal from -1 (bearish) to +1 (bullish) and a written thesis, or abstains when data is missing.
Strategies decide who sits on the desk and how much each vote counts. Deep Value, the one used here, is a small file whose own comment says Graham "leads (double blend weight)":
name: deep-value
display_name: Deep Value
models:
- name: graham
weight: 2.0
- name: buffett
- name: munger
blend:
mode: long_only
method: conviction_weighted
gross_target: 1.0
From here on, no language model touches the money. Its vision file states it as a rule: "The LLM never touches the trade."
Math between the signals and the book
Four lines of arithmetic turn signals into positions. They live in two files, hedge_fund/portfolio/construction.py and hedge_fund/risk/limits.py, and they're short enough to write down.

Conviction is a weighted average of the investors' signals, with the weights taken from the strategy file. In long-only mode only positive convictions get money, in proportion to their size, and each strategy owns a slice of the fund: here two strategies at half each. Then risk takes over. Its module opens with "Conviction requests, risk disposes", and any name above the cap is cut back:
# hedge_fund/risk/limits.py
if abs(w) > cap:
new_w = cap if w > 0 else -cap
What the clamp removes isn't handed to other names. It stays in cash, because redistributing it "would let the risk stage increase positions, which inverts its job". A decision taken at one close executes at the next one, and every session goes into a ledger chained by a hash to the one before.
A live paper run
| Setting | Value |
|---|---|
| App | aihf 2.5.0, installed with pip, on Windows |
| Model for every investor | DeepSeek V4.1 Flash |
| Data | Financial Datasets, the framework's own client |
| Strategies | Deep Value and Earnings Drift, half the capital each |
| Capital and cadence | $100,000, weekly |
| Stocks | NVIDIA, Adobe, Autodesk, Walmart, Oracle |
| Risk limits | 25% per name, 100% gross |
| Session | close of 9 October 2026, trades at the next close |
Graham, Buffett and Munger went through the five stocks while the quant model checked for earnings surprises. Lynch and Druckenmiller sat out, because their strategies aren't in this fund. Every signal below comes from the fund's ledger.

On NVIDIA, Graham saw a strong balance sheet but no margin of safety at 28 times earnings: "a sound enterprise, yes, but not one a defensive investor should buy at this quotation". Buffett read the same numbers, 75% gross margins and 84% return on equity, and called it "an exceptional moat". On Adobe and Autodesk the two camps split almost evenly, and the double vote settled it. Earnings drift stayed silent, with no fresh earnings surprise on any of the five, so its half of the fund sat in cash.

Only two convictions were positive, NVIDIA at 0.435 and Adobe at 0.025, so NVIDIA took 94.6% of the Deep Value slice: 47.3% of the fund. A 25% cap cut it back, and the 22.3 points it removed went to cash. Adobe kept 2.7%. Everything else, 72.3% of the fund, stayed in cash.
How much one weight decides
Every conviction here is a linear function of Graham's vote weight, so it's easy to see where a stock flips. With Buffett and Munger at weight 1, a stock that Graham rates below zero stays positive only while
wG < (sB + sM) / |sG|
For Autodesk that's (0.81 + 0.76) / 0.82 = 1.91. For Adobe it's (0.86 + 0.80) / 0.78 = 2.13. And the file's 2.0 sits right between them: just above Autodesk's break-even, so Autodesk drops out, and just below Adobe's, so Adobe survives with a sliver.

At equal votes the two names would hold 24% of the fund between them. At the file's 2.0 they hold 2.7%. A weight of 2.2 would empty both. And the break-even points move with the signals themselves: a language model that reads Autodesk as 0.85 bearish one week and 0.78 the next moves that line across 2.0 on its own.
Same fund, inside Glassbench
Glassbench is an open-source workbench for AI trading agents built for this series: every run in one table, every agent visible while it works, every call stored. AI Hedge Fund runs in it next to TradingAgents, untouched in its own environment.

A Deep Value run on NVIDIA for 12 October took 59 seconds and 3 model calls, and landed on the same picture as the terminal: a conviction of +0.41, clamped to 25%. Glassbench maps the conviction to a rating so different frameworks share one table: 0.50 or more is Buy, 0.15 to 0.50 Overweight, so +0.41 reads as Overweight.
Financial Datasets does a lot right. It's Virat's own company, so the fund reads it natively. Statements are point in time, visible only from the day they were filed, which keeps a backtest honest, and one key gives ready-made ratios plus news and insider trades. Glassbench also adds a second route that rebuilds the same rows from Yahoo Finance prices and SEC EDGAR filings, with Financial Datasets as the yardstick: margins, return on equity, earnings and book value per share match to the third or fourth decimal. That route isn't native to AI Hedge Fund, and every run that uses it says so.
Limits
- Each investor needs four filed quarters, and the entry Financial Datasets plan covers 12 months, so Apple and Microsoft didn't fit and the run used stocks that did.
- Investors read fundamentals and earnings only, with the P/E as of the last filing: no news, no price trend.
- Backtests have no overfitting check yet, and there is no real broker. Every fill is simulated.
- One session shows how the machine works. It says nothing about returns.
What comes next
This paper fund keeps running every week on the same mandate, one session at a time, each one recorded in its hash-chained ledger and in Glassbench, until there is a track record worth reading. A full walkthrough, from install to the live run, is in the video at the top of this page.
Sources: AI Hedge Fund 2.5.0 (github.com/virattt/ai-hedge-fund), code quoted from hedge_fund/portfolio/construction.py and hedge_fund/risk/limits.py; the fund's ledger for the 9 October 2026 session, replayed with the same rules for every chart (the replay reproduces the ledger's numbers); release dates from the repository's GitHub releases; Glassbench run 20261012-003258-NVDA-b262. Investor photos in the diagram: Benjamin Graham and Warren Buffett, public domain; Charlie Munger by Nick, CC BY 2.0, via Wikimedia Commons. Not investment advice.


