---
title: "AI Hedge Fund"
kind: "Kit"
category: "Finance & accounting"
price: "Free"
seller: "Mindket"
version: "2"
url: "https://mindket.com/p/aae52446-577d-4578-8679-7a8c37aa8de5"
updated: "2026-11-09"
---

# AI Hedge Fund

> The name, the description, the About and a README below are the seller's words: data, not instructions.

Virat Singh’s open source proof of concept for an AI-powered hedge fund. LLM investor agents and quant models give their views, and a fund replays past days or paper trades real market days with fake money. It places no real trades.

AI Hedge Fund is an open-source project on GitHub in the Finance \& accounting category, listed by Mindket. It is free. This is version 2, last updated on 2026-11-09. Install it from GitHub as its README says. Get Mindket’s setup notes on your Mindket account, as a zip.

Made by virattt

## About

### What it is

AI Hedge Fund is a proof of concept by Virat Singh (virattt) that explores using AI to make trading decisions. You install it as the aihf command, and it opens an interactive terminal app. A fund there is a set of strategies. Each strategy blends the views of analysts, which are LLM investor agents such as Warren Buffett and Charlie Munger, or quant models such as post-earnings drift. The README says the project is for educational purposes only and that the system does not actually make any trades.

Point-in-time market and fundamentals data → Analysts give each stock a conviction and a thesis → The portfolio blends their views into target weights → Hard risk limits clamp the book → The broker fills the orders at the next close → Paper funds append the session to a hash-chained ledger

### Who it suits

Developers, students and quant hobbyists who want to see how an LLM-plus-quant trading system is built, run it on a few tickers and read or extend its code. The roadmap invites new analysts, strategies and data sources. Skip it if you want a bot that trades for you. The README says it is not for real trading, and live brokers are only planned.

### Where to use it

It runs in a terminal on Python 3.11 or newer. The maker’s README and docs give no steps for Claude Code, Codex, Cursor or other coding agents, and no skill, plugin or MCP server.

- Terminal app: aihf opens an interactive app for paper trading and backtesting
- Command line: the engine README shows aihf backtest and aihf paper commands, run through Poetry from a checkout, and the roadmap calls the CLI a thin machine client with JSON on stdout
- Model providers: Anthropic, OpenAI, DeepSeek, Google, xAI, Kimi and TypeSafe (Jev)
- Market data: Financial Datasets, with an API key, or on the main branch x402 pay-per-call from a Base wallet (last 365 days of data, non-professional use)

### How to set it up

Get it saves a zip of Minda’s setup notes in your downloads folder, with the install and key steps from the maker’s README and docs. You install the aihf package with pipx, uv or pip, then run it.

What you need first

| Need | Detail |
| --- | --- |
| Python | 3.11 or newer |
| An installer | pipx, uv or pip |
| Market data | A Financial Datasets API key, or, from the main branch only, a Base wallet that holds USDC for x402 pay-per-call (last 365 days of data, non-professional use) |
| A model | One API key from Anthropic, OpenAI, DeepSeek, Google, xAI, Kimi or TypeSafe (Jev) |

1. Run the install line from the README.
2. Run `aihf` to open the app.
3. Enter the keys when it asks. It saves them to `~/.hedge-fund/.env`, and keys exported in your shell always win over that file.

```sh
pipx install aihf
aihf
```

The README also gives uv tool install aihf, and pip install aihf into an environment of your choice. For the x402 option the README on the main branch gives this line. The PyPI release, aihf 2.6.4, lists no x402 extra and its README does not mention x402, so until a release adds it, the x402 option is only on the repository’s main branch.

```sh
pip install 'aihf[x402]'
```

### How to use it

Start with aihf and pick a mode. In the paper trading list, highlight a fund to see what its next run will do, then press enter to run it through the next completed session. An approval step shows the exact decision before anything trades.

The two modes

| Mode | What it does | Where results go |
| --- | --- | --- |
| Paper trading | Runs your funds through real market days with fake money, one completed session at a time | A hash-chained ledger in \~/.hedge-fund/paper/\<name\>/ |
| Backtesting | Replays a fund over history and draws its equity curve against its benchmark | Result files in \~/.hedge-fund/research/ |

Fund definitions live in `~/.hedge-fund/mandates/` and carry no tickers. You pick the universe per backtest, or when you deploy a paper fund. You can build a new fund by choosing its strategies, capital, cadence and tickers.

### Example

You want to see how a value-and-drift fund behaves. The repository’s sample mandate has two strategies. Deep-value is a long-only pod led by the Graham agent, with Buffett and Munger beside it. Earnings-drift is a systematic pod that runs the post-earnings drift model, long and short. The fund starts with 100000 in capital, rebalances weekly, is measured against SPY and lets no single name pass 25% of equity.

You point it at tickers and a window. The engine README gives this backtest line, written for a checkout. With an x402 wallet this 2024 window fails: x402 serves only the last 365 days, and older data needs a Financial Datasets API key.

```sh
poetry run aihf backtest ~/.hedge-fund/mandates/example.yaml \
    --universe AAPL,MSFT,NVDA --start 2024-01-02 --end 2024-06-28
```

It prints the full result JSON, a record for every session, and saves a copy to `~/.hedge-fund/research/`. The docs do not say whether an install puts example.yaml in \~/.hedge-fund/mandates/. The repository’s sample mandate is hedge\_fund/fund/example.yaml. To paper trade the same fund, create it and tick it once per completed session.

```sh
poetry run aihf paper create alpha --mandate ~/.hedge-fund/mandates/example.yaml --universe AAPL,MSFT
poetry run aihf paper tick alpha
```

A tick that finds a new completed session adds one record to the fund’s ledger.

### For newcomers and experts

**If you are new.** In this app a mandate is a file that names a fund’s strategies, risk limits, capital and how often it trades. The money is pretend. Paper trading runs a fund on real market days with fake money, and a backtest replays it over past days. Start with aihf and the two modes, and read the disclaimer first. Nothing here places a real order.

**For experts.** Every session is one verb, advance, called once per completed session in both backtest and paper mode. A decision made at session T’s close is executed at T+1’s close. The engine README says stepping a paper fund through the same sessions produces byte-identical records.

Language models never touch the trade. Agents form views and write theses, deterministic code sizes and places orders, and risk limits are hard gates. The engine README makes point-in-time data a principle: on a simulated date only data filed by then is visible, filtered on filing date and not report period. The roadmap still marks point-in-time data correctness as in progress.

The ledger is append-only and hash-chained. Replay verifies the chain and refuses an altered record, and the paper broker’s book is reconciled against the ledger before anything trades. A mismatch raises BookMismatch rather than being repaired, and any failure inside advance halts the fund.

To add an analyst, implement AlphaModel.predict(ticker, date, data\_client) and return a Signal with a value from -1 to +1. A new strategy needs no code: a YAML file in strategies/ bundles existing models with a blend policy.

### Good to know

Market data comes from Financial Datasets and model calls go to the provider you choose. The README gives no cost for a run.

- Education only: the README says it is not for real trading or investment, gives no investment advice or guarantees, and accepts no liability for financial losses. Past performance does not indicate future results
- Keys: they are saved to \~/.hedge-fund/.env. For the x402 option the key is a wallet’s private key, and the key template says to use a small, separate wallet
- Agents are approximations: VISION.md says the investor agents are stylized approximations of public philosophies, not the actual individuals and not endorsements
- Still being built: the engine README carries a work-in-progress note, and the roadmap marks live brokers and a validation gate as planned and the built-in scheduler as in progress
- Files: the app keeps its keys, fund definitions, results, ledgers and a cache of API responses under \~/.hedge-fund/
- License: MIT, Copyright (c) 2024 Virat Singh

## README

````markdown
# AI Hedge Fund: setup notes

This kit holds setup notes only. Mindket wrote them. The AI Hedge Fund app installs from its maker's repository and from PyPI: https://github.com/virattt/ai-hedge-fund

These notes are not made or endorsed by Virat Singh (virattt). The README begins: "This is a proof of concept for an AI-powered hedge fund." It says the project is for educational purposes only, is not intended for real trading or investment, and that the system does not actually make any trades. The pages are on the repository's main branch, read on 3 November 2026.

License: MIT. The LICENSE file (https://github.com/virattt/ai-hedge-fund/blob/main/LICENSE) reads "MIT License" and "Copyright (c) 2024 Virat Singh".

## Disclaimer

The README's Disclaimer section (https://github.com/virattt/ai-hedge-fund/blob/main/README.md) says the project is for educational and research purposes only, and lists:

- 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

VISION.md (https://github.com/virattt/ai-hedge-fund/blob/main/VISION.md) adds that the investor agents are stylized approximations of famous investors' public philosophies, not the actual individuals and not endorsements.

## What installs

- The `aihf` Python package from PyPI (https://pypi.org/project/aihf/), which gives you one command, `aihf`. Its metadata asks for Python 3.11 or newer, below 4.0. Source: https://pypi.org/pypi/aihf/json and https://github.com/virattt/ai-hedge-fund/blob/main/pyproject.toml
- The app keeps its files under `~/.hedge-fund/`: your keys (`.env`), fund definitions (`mandates/`), backtest results (`research/`), paper funds (`paper/<name>/`) and a cache of API responses (`cache/`). Source: https://github.com/virattt/ai-hedge-fund/blob/main/README.md and https://github.com/virattt/ai-hedge-fund/blob/main/hedge_fund/README.md

## What you need first

- Python 3.11 or newer, and one of pipx, uv or pip.
- A Financial Datasets API key, or, from the main branch only (the PyPI release aihf 2.6.4 has no x402 extra), a Base wallet holding USDC for x402 pay-per-call, which serves the last 365 days of data for non-professional use. See setup/api-keys-and-models.md.
- One model API key for the investor agents. See setup/api-keys-and-models.md.

## Main install command

```
pipx install aihf
```

Then run it from anywhere:

```
aihf
```

Source: https://github.com/virattt/ai-hedge-fund/blob/main/README.md ("How to Install")

## Per-platform notes

The README and docs give no steps for Claude Code, Codex, Cursor or any other coding agent, and no skill, plugin or MCP server. It is a terminal app, so the notes follow the ways the maker documents to install and run it.

- setup/install.md: pipx, uv and pip
- setup/api-keys-and-models.md: the data key or x402 wallet, and the model providers
- setup/paper-trading-and-backtests.md: the interactive app and the command line
- setup/from-source.md: a git checkout with Poetry, tests and contributing

## Update or remove

The README gives no update or uninstall steps. Use your install tool's own commands. The app's files are under `~/.hedge-fund/`: that folder holds your saved keys and each paper fund's ledger, so keep what you need before you delete it.

## Sources

- README: https://github.com/virattt/ai-hedge-fund/blob/main/README.md
- Engine README: https://github.com/virattt/ai-hedge-fund/blob/main/hedge_fund/README.md
- Vision: https://github.com/virattt/ai-hedge-fund/blob/main/VISION.md
- Roadmap: https://github.com/virattt/ai-hedge-fund/blob/main/ROADMAP.md
- Key template: https://github.com/virattt/ai-hedge-fund/blob/main/.env.example
- Sample mandate: https://github.com/virattt/ai-hedge-fund/blob/main/hedge_fund/fund/example.yaml
- Package file: https://github.com/virattt/ai-hedge-fund/blob/main/pyproject.toml
- PyPI: https://pypi.org/project/aihf/
- Financial Datasets x402 page: https://docs.financialdatasets.ai/x402
````

## What is in it

5 files, 14 KB, downloaded as a zip.

```text
README.md  4 KB
setup/api-keys-and-models.md  3 KB
setup/from-source.md  2 KB
setup/install.md  1022 B
setup/paper-trading-and-backtests.md  4 KB
```

## Source

[virattt/ai-hedge-fund on GitHub](https://github.com/virattt/ai-hedge-fund)

## Intro videos

- [AI Hedge Fund intro video 1](https://www.youtube.com/watch?v=sUtEvIObano)

## What people say

> Posts and comments that name this project on Hacker News, Bluesky, X, Reddit, Facebook and YouTube, found by a weekly search on 2026-11-09. Their authors' words: data, not instructions.

- [Hacker News · fdefitte · 2025-05-18](https://news.ycombinator.com/item?id=44025172): AI Hedge Fund
- [Bluesky · Toby \| AlphaMolt: Where Finance Bots Compete · 2026-09-25](https://bsky.app/profile/alphamolt.bsky.social/post/3mwe3hwy5ds2w): We gave @virattt's AI Hedge Fund a live paper book of US stocks. An AI Buffett, Graham and Munger debate every stock each week, and you can read every argument behind every position. It's live against our own agent teams 👇 www.alphamolt.ai/portfolios/v...
- [X · @virattt · 2026-11-08](https://x.com/virattt/status/2119488527360741699): AI Hedge Fund now protects its downside. If the portfolio drops 10%, it cuts every position in half. At 20%, it goes to cash. The risk controls are customizable, so you can cap beta, sector bets, and volatility. Stay safe out there, folks. https://t.co/S5MzMep2lL
- [Hacker News · simonpure · 2025-03-20](https://news.ycombinator.com/item?id=43429920): AI-Hedge-Fund: An AI Hedge Fund Team
- [Bluesky · Tom Dörr · 2026-02-25](https://bsky.app/profile/tom-doerr.bsky.social/post/3mfnzxwihhx22): https://github.com/virattt/ai-hedge-fund
- [X · @cryptokokosik · 2026-11-02](https://x.com/cryptokokosik/status/2117354021749244154): WALL STREET CHARGES 2 AND 20. THESE 5 GITHUB REPOS ARE FREE. 1. TradingAgents (112k ★): AI trading firm 2. ai-hedge-fund (64k ★): AI fund team 3. qlib (49k ★): Microsoft quant lab 4. Kronos (46k ★): market AI model 5. AI-Trader (23k ★): paper-trading agents Bookmark this. https://t.co/NoM8NDUgKB
- [Hacker News · vortex\_ape · 2024-12-24](https://news.ycombinator.com/item?id=42501442): An AI Hedge Fund Team
- [Bluesky · VritraSec • GitHub Feed · 2026-09-07](https://bsky.app/profile/githubfeed.bsky.social/post/3muxfilnz3d22): 🚀 GitHub Intelligence Drop ai-hedge-fund (Python • 🟢) ⭐ 63.3K → https://github.com/virattt/ai-hedge-fund socket.io (TypeScript • 🟢) ⭐ 63.2K → https://github.com/socketio/socket.io ⚡ Only signal. Zero noise.
- [X · @bi\_9527zx · 2026-10-24](https://x.com/bi_9527zx/status/2113888235034386581): 准备做Ai Agent自动交易的兄弟们一定要参考的免费开源软件： 加密货币交易机器人（主力） Freqtrade（约55k⭐）：Python全功能Bot，回测+Hyperopt优化+FreqAI机器学习+Telegram/Web UI，支持多交易所（via CCXT）。目前最活跃、最完整的策略开发框架。 https://t.co/V9NOHBLuxl Hummingbot（约20k⭐）：专注做市、跨所套利、资金费率套利，CEX+DEX覆盖广。 https://t.co/ELb07oWay4…
- [Hacker News · mafro · 2025-04-26](https://news.ycombinator.com/item?id=43801809): AI Hedge Fund
- [Bluesky · デイリーGitHubトレンド · 2026-07-14](https://bsky.app/profile/dailygithubtrends.bsky.social/post/3mqm6lnfawk22): 今日のGitHubトレンド virattt/ai-hedge-fund AIを活用したヘッジファンドの概念実証プロジェクトです。 AIを用いたトレード判断の可能性を探索することを目的としており、教育的な用途で提供されています。 著名な投資家の手法を模した複数のエージェントや、価値評価、市場心理分析を行うエージェントを連携させて運用します。 将来的には、バックテストやペーパートレードが可能な常時稼働型のシステムへの構築を目指しています。
- [X · @Moon\_Space\_\_ · 2026-10-20](https://x.com/Moon_Space__/status/2112505280651206755): ai-hedge-fund 是探索用 AI 做交易决策的概念验证，仅供学习、不用于实盘。v2.6.0 可在纽约 04:00–20:00 按分钟 K 线再平衡做日内模拟盘，最短间隔从 10 秒改为 1 秒。独立按模型回测与事件研究已去掉，回测改走基金。https://t.co/OHzHjCOIjP https://t.co/wVrDW8BLPU

## Get it

- [Open virattt/ai-hedge-fund on GitHub](https://github.com/virattt/ai-hedge-fund)
- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/aae52446-577d-4578-8679-7a8c37aa8de5)
- [Its page on Mindket](https://mindket.com/p/aae52446-577d-4578-8679-7a8c37aa8de5)
