The FullStack Alpha research desk tests AI trading bots on paper and live accounts. Reviewed and edited by Jay Rocco, Founder and Editor.
By FullStack Alpha Editorial Team | Reviewed by Jay Rocco, Chief Editor
The AI hedge fund GitHub repo, virattt/ai-hedge-fund, is a free, MIT-licensed Python project that runs a simulated hedge fund whose analysts are AI: LLM “investor” agents and quant models feed a portfolio layer and a hard risk layer. It can backtest a fund over history and, since version 2.5.0, paper trade it through real market sessions with fake money on a hash-chained ledger. Its README says plainly that “the system does not actually make any trades” and that it is for educational and research purposes only. It needs a Financial Datasets API key and a model API key, both paid, and it fails first when you treat an LLM’s opinion as a tested edge.
Key insights
- The repo had about 64,200 stars, 11,300 forks and 943 commits when we checked in 2026, per the GitHub repository page.
- Version 2.6.0 (October 19, 2026) added intraday paper trading on minute bars from 04:00 to 20:00 New York time, plus a scorecard that grades every analyst on hit rate, slugging and information coefficient.
- Version 2.4.1 fixed a real backtest flaw: LLM agents were scoring their own memory of companies, so ticker, industry and dates are now withheld from investor prompts.
- Data costs start at a $20 one-time pack of 1,000 requests at Financial Datasets, and premium endpoints such as fundamentals and earnings count 8x on that pack.
- Decision rule: run it to learn how a fund is built, not to find a strategy you fund tomorrow.
What Is the AI Hedge Fund GitHub Repo?
The AI hedge fund GitHub repo is an open-source simulation of a hedge fund built by developer Virat Singh (virattt). It is not a product, not a registered fund and not a broker. You install it, give it API keys, design a “fund,” and it backtests or paper trades that fund while explaining every decision it makes.

The project’s VISION.md describes the structure as a real fund’s org chart with AI swapped in for people. Three nested layers do the work:
- Fund = an allocator (the “CIO”) over strategies
- Strategy = a portfolio policy over analysts
- Analyst = an alpha model that emits a signal: a conviction from -1 to +1 plus a written thesis
Analysts come in two flavors that share one interface. LLM investor agents reason in the voice of famous investors (Warren Buffett, Charlie Munger, Peter Lynch, Stanley Druckenmiller and others). Quant models are pure math, such as post-earnings drift, regime detection and momentum. The project notes the investor agents are “stylized approximations” of public philosophies, not the people themselves.
| Component | What it does in the repo | What it reads |
|---|---|---|
| LLM investor agents | Form a view in a famous investor’s style and write a thesis | Point-in-time fundamentals, prices, earnings; ticker and dates withheld since 2.4.1 |
| Quant models | Score signals with math (post-earnings drift, regime, momentum) | Prices, earnings announcements (8-K required since 2.5.0) |
| Portfolio construction | Turns analyst views into target positions | All analyst signals in a strategy |
| Allocator (CIO) | Splits capital across strategies | Strategy sleeves and their records |
| Risk model | Hard limits the analysts cannot override | Target weights and exposure |
The rule that matters most, from VISION.md: “The LLM never touches the trade. Language models form views and narrate decisions. Deterministic code sizes positions and places orders, and risk limits are hard gates an agent cannot exceed.” That is the right design, and it is the reason this repo is worth studying.
What it is not: proof of anything. VISION.md calls much of the project “aspirational,” live trading is “a broker away” and not shipped, and the disclaimer says “Past performance does not indicate future results.” For other open repos to compare, see our AI trading bot GitHub roundup.
What Do You Need Before You Run the AI Hedge Fund GitHub Repo?
You need Python, two API keys and a terminal. The code is free; the data and the model calls are not.

Confirmed against the README:
- Python and an installer.
pipx install aihf,uv tool install aihf, orpip install aihfinto an environment you choose. Then runaihffrom anywhere. - A Financial Datasets API key for prices, fundamentals and earnings.
- One model API key for the investor agents. Supported providers: Anthropic, OpenAI, DeepSeek, Google, xAI, Kimi and TypeSafe (Jev). Our Jev AI trading bot breakdown covers what Jev is and is not good at.
- Nothing to configure up front. The app asks for keys the first time it needs them and saves them to
~/.hedge-fund/.env. Keys exported in your shell override the saved file.
If you want to work on the code itself, the README’s development path is git clone, poetry install, poetry run aihf, and poetry run pytest hedge_fund to run the tests.
Decision rule: if you have never opened a terminal, budget an hour for setup friction, not ten minutes. If you have used pip before, ten minutes is realistic. If you are new to Python for trading, start with our Python algorithmic trading roadmap.
Common mistake: buying model credits before data credits. Without Financial Datasets access, the agents have nothing to read.
How Do You Run the AI Hedge Fund GitHub Repo Step by Step?
Running the AI hedge fund GitHub repo takes five stages: install, add keys, build a fund, backtest it, then paper trade it. No new code is required.
- Install.
pipx install aihf(or the uv or pip equivalent). Most common error: an old Python version. - Add keys when prompted. Launch
aihf; it asks for the Financial Datasets key and one model key and saves them. Most common error: a key that is not yet active on the provider’s dashboard. - Build a fund. In the interactive app, choose strategies, capital, cadence and tickers. Fund definitions live in
~/.hedge-fund/mandates/and carry no tickers; you pick the universe per backtest. Most common error: too many tickers on the first run, which multiplies data and model costs. - Backtest. Replay the fund over history and watch its equity curve draw against its benchmark. Results save to
~/.hedge-fund/research/. Most common error: reading the curve as a forecast. It is a replay with a simulated broker. - Paper trade. Highlight a fund and press enter to run it through the next completed session. An approval step shows the exact decision about to execute before anything trades. Press
sfor session history andhorrfor the kill switch. Every session appends to a hash-chained ledger in~/.hedge-fund/paper/<name>/, so net asset value is a track record, not a reset.
Since version 2.6.0, a fund can also rebalance intraday on minute bars (rebalance: minute) between 04:00 and 20:00 New York time. aihf paper run <name> stays up and advances one bar per interval, and aihf paper stop <name> stops it after the bar in flight. The shortest interval is now 1 second, down from 10. Start with daily bars; intraday multiplies every cost below.
That is the whole loop: hypothesize, backtest, paper trade, review the scorecard, repeat. There is no live broker connection in the shipped code.
What Does a Paper Run Cost in API Fees?
A paper run on the AI hedge fund GitHub repo costs money in two places, data requests and model calls, and the bill scales with tickers, agents and rebalance frequency, not with the simulated capital.
Financial Datasets’ pricing page lists in 2026:
| Plan | Price | Included requests | Premium endpoint weight |
|---|---|---|---|
| Credits | $20 one-time | 1,000 | 8x |
| Personal | $200 a month | 100,000 | 4x |
| Professional | $2,000 a month | 2,000,000 | 2x |
Premium endpoints include SEC filings, earnings and fundamentals. We found no free tier on the pricing page.
Worked example: a small monthly backtest
These are our assumptions, not the app’s measured usage, so treat the method as the point. Say a backtest covers 10 tickers with monthly rebalances for one year, and each rebalance needs one standard price request and one premium fundamentals request per ticker.
- Data units per rebalance: 10 tickers x (1 + 8) = 90 units on the Credits pack
- Data for the year: 90 x 12 = 1,080 units, just over the $20 pack of 1,000
- Model calls: 4 investor agents x 10 tickers x 12 rebalances = 480 calls
- Model cost on Claude Sonnet 5.5 at $2 per million input and $10 per million output tokens, assuming 8,000 input and 800 output tokens per call: (480 x 8,000 / 1,000,000 x $2) + (480 x 800 / 1,000,000 x $10) = $7.68 + $3.84 = $11.52
Total: roughly $32 to $40 for one small backtest, depending on whether you buy a second data pack. Double the tickers and agents and the bill roughly quadruples. Switch to minute bars and it can be hundreds of times larger, which is why the shortest interval should be the last thing you try. The app keeps a cache under ~/.hedge-fund/, so repeat runs may cost less; check your provider dashboards after the first run to see the real numbers.
Set a hard monthly spend cap in both provider dashboards before your first run. A loop that keeps calling a paid model is the most common way a free repo becomes an expensive one.
What Do the Analyst Agents Decide and How?
Each analyst in the AI hedge fund GitHub repo emits a signal: a conviction between -1 and +1 plus a written thesis. A portfolio policy blends the signals into target positions, the risk model clamps them, and deterministic code turns targets into orders on the simulated or paper broker.

| Analyst type | Style it imitates | What data it reads | Typical blind spot |
|---|---|---|---|
| Buffett or Munger style agent | Quality and value investing | Fundamentals, valuation, earnings | Slow to react to momentum and catalysts |
| Lynch style agent | Growth at a reasonable price | Earnings growth, valuation | Can chase stories the numbers do not support |
| Druckenmiller style agent | Macro and trend | Price trends, macro context | Late on sudden regime shifts |
| Post-earnings drift model | Quant signal | 8-K earnings announcements and price reaction | Only fires around earnings |
| Risk model | Hard limits | Target weights, exposure | Caps a bad decision; does not prevent one |
The style descriptions are our summary of each investor’s public approach, not text from the repo, so read the agent code in hedge_fund/ before you rely on any one of them.
Version 2.4.0 added rules that derive each strategy’s investment rules from its analysts’ approaches and enforce them in portfolio construction, and it reassesses decisions before next-close execution. Per VISION.md, a decision made at one session’s close executes at the next session’s close, so nothing is assessed and executed against the same price.
The plain truth: the LLM agents are language models writing an opinion in a famous investor’s voice. A convincing thesis is not the same as a factor that has worked across decades of data. The new scorecard in 2.6.0 is exactly the tool to test that: it grades every analyst on hit rate, slugging and information coefficient, each shown next to the count behind it.
Two bugs the maintainer fixed, and why they matter
The release notes show how easily an AI backtest lies:
- Memory leakage (2.4.1). Backtests were “scoring an LLM’s memory of the companies.” A model that has read about how Nvidia did in 2023 can “predict” 2023 perfectly. The fix withholds ticker, industry and calendar dates from investor prompts, and 2.5.0 shows size as a market-cap percentile instead of a raw number.
- Earnings timing (2.5.0). Post-earnings drift now requires an 8-K before treating a quarter as a surprise. The old logic used the 10-Q or 10-K filing date, which “fired days to weeks after the market had already priced the beat or miss.”
Both are textbook look-ahead problems. Our guide to look-ahead bias in AI-written backtests shows how to audit for them in your own code.
How Do You Read the Scorecard in the AI Hedge Fund GitHub Repo?
Version 2.6.0 grades every analyst on three numbers: hit rate, slugging and information coefficient, and shows the count behind each one. Together they tell you whether an analyst is right often, right big, or right at all.
- Hit rate: the share of an analyst’s calls that went the right way. 55% means 55 of every 100 calls were correct.
- Slugging: how big the wins are compared with the losses. In common trading usage it is average gain on winners divided by average loss on losers. Above 1.0 means winners are bigger than losers.
- Information coefficient (IC): the correlation between an analyst’s conviction and the return that followed. An IC of 0 means its conviction told you nothing; positive means stronger convictions tended to do better. Real-world signals tend to have small ICs, so a very high IC on a small sample deserves suspicion, not celebration. Watch whether the IC holds its sign across different months and market conditions; a signal that flips between positive and negative is noise.
The release notes do not spell out the exact formulas the scorecard uses, so check the scorecard code before comparing its numbers with other tools.
Worked example: a “good” hit rate that loses money
Say a Buffett-style analyst made 40 calls in a paper run:
- 22 were right: hit rate = 22 / 40 = 55%
- Average gain on winners: 1.2%; average loss on losers: 1.5%: slugging = 1.2 / 1.5 = 0.8
- Expected result per call = (0.55 x 1.2%) - (0.45 x 1.5%) = 0.66% - 0.675% = about -0.02%
A 55% hit rate with a slugging of 0.8 is a slow leak before trading costs, and worse after them. To break even with those win and loss sizes, the analyst needs a hit rate of 1.5 / (1.5 + 1.2) = about 56%. Now look at the count: 40 calls is far too few to tell a 55% analyst from a 50% one. That is why the scorecard prints the count next to every rate, and why you should read the count first.
What the paper ledger proves and what it does not
The hash-chained ledger means each session record is linked to the one before it, so a record cannot be quietly edited without breaking the chain. Per the 2.5.0 notes, the paper broker keeps its own book, reconciled against the ledger before every session, and any failure halts the fund until a human clears it. That is a strong research record.
It still is not an audited track record. Paper fills are simulated, the ledger lives on your machine, and you control the inputs. Treat it as your own lab notebook, not as evidence you can show anyone else. If a creator shows you a screenshot of their ledger as proof of an edge, ask for the full session history, the fund definition and the costs, and then ask how many other funds they ran and did not show you.
Where Does the AI Hedge Fund GitHub Repo Fail?
The AI hedge fund GitHub repo fails, like every research backtester, in six places: sample size, trading costs, look-ahead risk, model randomness, data gaps and the absence of live execution.
- Sample size. A year of monthly rebalances on 10 tickers is 120 decisions. That sounds like a lot until you split it by analyst and by market regime. The scorecard shows the count behind each rate for a reason.
- Trading costs. A simulated broker can only model the spreads, commissions and slippage you tell it about. A strategy that nets 2% a year on paper can go negative once realistic costs come in.
- Look-ahead risk. The maintainer has fixed two leaks already (memory and earnings timing). There may be others; VISION.md’s own rule is “point-in-time honesty,” which is a goal you should keep checking, not a guarantee.
- Model randomness. LLMs do not return identical answers to identical prompts. Run the same backtest twice and compare the decisions before you trust either.
- Data gaps. If a data request fails or a ticker is missing, the agents reason on what they have. Check the run log for missing data before you read the result.
- No live execution. The shipped code has a simulated broker and a paper broker. Live is opt-in, off by default and not built yet, per VISION.md. A local paper ledger is a real record of decisions, but it is not an audited record of real fills.
The project’s own principles name the fix for overfitting: nothing the fund invents should get capital without passing a validation gate using checks like CPCV and PBO (combinatorial purged cross-validation and probability of backtest overfitting). Our coming guide to overfitting vs underfitting explains both.
How Do You Test the Repo Safely Before Any Real Money?
Test the AI hedge fund GitHub repo the way the repo itself intends: backtest, then paper trade, with the approval step on and a fixed universe, and judge it on the scorecard rather than on the equity curve.
- Paper only. The code cannot trade live, and you should not route its signals to a broker by hand until you have a long paper record.
- Fixed universe. Pick five to ten tickers and keep them for the whole test.
- Approve every decision. The paper mode shows the exact decision before it executes. Read it.
- Use the kill switch. Know the
horrkey before you start. - At least 30 decisions per analyst before you judge any one of them, and more before you judge the fund.
- One change at a time. Swap one analyst, one model or one risk setting, then rerun.
- Run it twice. Same fund, same window, two runs. If the decisions differ a lot, the model, not the strategy, is driving the result.
Common mistake: going from a clean backtest straight to a funded account. Paper trade first, log it honestly, and let the sample size argue back.
How Does the AI Hedge Fund GitHub Repo Compare With Other Open-Source Trading Bots?
The AI hedge fund GitHub repo stands out for its fund-style architecture and its hash-chained paper ledger. It is one of several free projects worth comparing before you invest your time.

| Project | Core approach | Live trading support | Notable limitation |
|---|---|---|---|
| ai-hedge-fund (virattt) | LLM investor agents and quant models, portfolio, allocator and risk layers | No; backtest and paper only | Research project; live is not built |
| TradingAgents (TauricResearch) | LLM analysts, bull and bear researchers, a trader and a risk team that debate a trade | Research framework | Academic design from UCLA, MIT and Tauric Research authors; not a broker integration |
| Freqtrade | Rule-based strategies in Python, with dry-run and backtesting | Yes, on crypto exchanges only | No stocks; you write the strategy |
| QuantConnect LEAN | Algorithmic backtesting and live deployment | Yes, including Alpaca for US equities, options and crypto | Steeper learning curve; live needs a paid node |
Corrections to an earlier draft: Freqtrade lists only crypto exchanges (Binance, Kraken, OKX and others) on its documentation home, not stocks. QuantConnect’s Alpaca integration supports US equities, equity options, index options and crypto, with paper or live environments. More on LEAN in our QuantConnect LEAN guide.
A creator walkthrough worth knowing about
AI Pathways’ “MIT Researchers Built An AI Hedge Fund (Here’s How To Use It)” is often found by people searching for this repo, but per its description it covers TauricResearch/TradingAgents, not virattt/ai-hedge-fund. It has chapters on structure, a demo, costs and setup. Watch it if you want to compare a debate-style agent design with this repo’s fund-style design.
What Do Creator Walkthroughs Skip About the AI Hedge Fund GitHub Repo?
Creator walkthroughs tend to show a clean install and one backtest. They skip the three things that decide whether any of it is useful: the running API bill, the sample size behind the result, and whether the same run gives the same answer twice.
What to look for in any walkthrough, including the one above:
- Version. The repo changed a lot in 2026 (package renamed to aihf in 2.2.0, v1 code removed in 2.1.0, paper trading in 2.5.0). A video made before those changes may show commands that no longer exist.
- The cost slide. If a video shows no data or model bill, assume it ran a tiny test.
- The scorecard. A result without hit rate and count per analyst is a highlight, not a test.
- A losing run. If the creator never shows a bad backtest, you are watching marketing.
Those gaps are where a fun demo and a usable research tool part ways.
Frequently Asked Questions
What is the AI hedge fund on GitHub?
The AI hedge fund GitHub repo, virattt/ai-hedge-fund, is a free, MIT-licensed Python project that simulates a hedge fund run by AI analysts. LLM investor agents and quant models feed a portfolio layer and a hard risk layer. It backtests funds over history and paper trades them with fake money.
Is the AI hedge fund GitHub repo free?
The code is free, but running it is not. You need a Financial Datasets API key, whose cheapest option is a $20 one-time pack of 1,000 requests, and a paid model API key from a provider such as Anthropic, OpenAI or Google. A small backtest can cost $30 to $40 in data and model fees.
Can the AI hedge fund repo place real trades?
No. The README says the system does not actually make any trades, and live trading is described as opt-in and not yet built. It offers backtesting and, since version 2.5.0, paper trading with a hash-chained ledger and an approval step.
How do I install the AI hedge fund repo?
Run pipx install aihf, uv tool install aihf, or pip install aihf, then start it with the aihf command. The app asks for your Financial Datasets and model API keys the first time and saves them to ~/.hedge-fund/.env. Developers can clone the repo and use poetry instead.
Does the AI hedge fund GitHub repo beat the market?
There is no audited record showing it does. Backtests and local paper ledgers are research records you control, not verified performance. Use the built-in scorecard and run the same fund twice to see whether results hold up.
What models does the AI hedge fund repo support?
The README lists Anthropic, OpenAI, DeepSeek, Google, xAI, Kimi and TypeSafe (Jev) as model providers. Version 2.3.0 added GPT-6 Astra and Claude Fable 5.1, and 2.3.1 added Opus 5.5. Model choice changes both cost and the style of each agent’s reasoning.
How is ai-hedge-fund different from TradingAgents?
ai-hedge-fund is built like a fund, with analysts, strategies, an allocator, a risk model and a persistent ledger. TauricResearch’s TradingAgents is a research framework where LLM analysts, bull and bear researchers, a trader and a risk team debate each trade. Neither places live trades out of the box.
Our Take
This is a research tool, and a well-built one, not something you point at a brokerage account. The fund-style design, the rule that “the LLM never touches the trade,” the hash-chained paper ledger and the willingness to publish fixes for its own backtest leaks put it ahead of most AI trading repos. But every LLM analyst is still a model writing an opinion, and the system has never placed a real trade.
The first test to run: five tickers, two analysts, daily cadence, paper trade for 30 sessions with approval on, then read the scorecard and run it a second time. If the two runs disagree, you have learned the most important thing about AI hedge funds already. For more plain-English reviews of open-source bots, start at AI Stock Trading Bots, and when any strategy is ready for a broker, our Alpaca review covers the API most of these projects target.
Related: if you would rather skip the setup, browse the AI trading platforms directory on AI Stock Picker Apps for hosted alternatives.
Built something on this repo with a real paper record? Send it to us and we will review it.
Stay alpha.
The FullStack Alpha research desk tests AI trading bots on paper and live accounts. Reviewed and edited by Jay Rocco, Founder and Editor.