Mindket

AI Hedge Fund

Newversion 2 · updated
Star64.5k

Overview

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 . Install it from GitHub as its README says. Get Mindket’s setup notes on your Mindket account, as a zip.

At a glance

Runs in
  • 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)
Start with
pipx install aihf
aihf

Platform

Claude CodeCoding agent
CodexCoding agent
CursorCode editor

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.

  1. Point-in-time market and fundamentals data
  2. Analysts give each stock a conviction and a thesis
  3. The portfolio blends their views into target weights
  4. Hard risk limits clamp the book
  5. The broker fills the orders at the next close
  6. 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
NeedDetail
Python3.11 or newer
An installerpipx, uv or pip
Market dataA 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 modelOne 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.
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.

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
ModeWhat it doesWhere results go
Paper tradingRuns your funds through real market days with fake money, one completed session at a timeA hash-chained ledger in ~/.hedge-fund/paper/<name>/
BacktestingReplays a fund over history and draws its equity curve against its benchmarkResult 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.

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.

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 and files

README

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

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

Files
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

5 files, 14 KB, downloaded as a zip.

What’s new

  • Version 2 · 2026-11-09

    Updated by Mindket to the current version of this kit.

  • Version 1 · 2026-11-03

Reviews

No ratings yet

Write a review

No reviews yet.

What people say

Posts and comments that name this project on Hacker News, Bluesky, X, Reddit, Facebook and YouTube, found by a weekly search and on Trendshift. Mindket doesn’t write or check them. Open one to read it where it was posted.

fdefitteAI Hedge Fund3 pointsToby | AlphaMolt: Where Finance Bots CompeteWe 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...1 like · 1 reply@viratttAI 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/S5MzMep2lLsimonpureAI-Hedge-Fund: An AI Hedge Fund Team3 pointsTom Dörrhttps://github.com/virattt/ai-hedge-fund1 like@cryptokokosikWALL 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/NoM8NDUgKBvortex_apeAn AI Hedge Fund Team3 pointsVritraSec • GitHub Feed🚀 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.@bi_9527zx准备做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…mafroAI Hedge Fund2 pointsデイリーGitHubトレンド今日のGitHubトレンド virattt/ai-hedge-fund AIを活用したヘッジファンドの概念実証プロジェクトです。 AIを用いたトレード判断の可能性を探索することを目的としており、教育的な用途で提供されています。 著名な投資家の手法を模した複数のエージェントや、価値評価、市場心理分析を行うエージェントを連携させて運用します。 将来的には、バックテストやペーパートレードが可能な常時稼働型のシステムへの構築を目指しています。@Moon_Space__ai-hedge-fund 是探索用 AI 做交易决策的概念验证,仅供学习、不用于实盘。v2.6.0 可在纽约 04:00–20:00 按分钟 K 线再平衡做日内模拟盘,最短间隔从 10 秒改为 1 秒。独立按模型回测与事件研究已去掉,回测改走基金。https://t.co/OHzHjCOIjP https://t.co/wVrDW8BLPU

Searched

More from Mindket

See all from Mindket

Bonsai-27B-GGUF

lmstudio-community · Kit

A GGUF conversion of the 27B Bonsai model for LM Studio, with a 3.80 GB Q1_0 language file and a 0.93 GB BF16 vision projector. Tested for text, vision and par…

New

Runs DeepSeek-V4.1-Flash-1017 as a 2.9 bits-per-weight EXL3 quantization, a 196 GiB copy for people serving large models on their own hardware. Perplexity stay…

New

MusicGen Small

facebook · Kit

Generates short music clips from a text description or an audio prompt, in the small checkpoint of facebook's MusicGen. It suits developers and music hobbyists…

New

Similar in Finance & accounting

See all in Finance & accounting

Kronos-mini

NeoQuasar · Kit

Forecasts financial candlestick series with a 4.1M-parameter foundation model trained on data from over 45 exchanges. For quant researchers and developers who…

New