+21
日增长
+111
周增长
64,695
stars
11,387
forks
657
watchers
409
prs
297
issues
24
releases
README
AI Hedge Fund This is a proof of concept for an AI-powered hedge fund. The goal of this project is to explore the use of AI to make trading decisions. This project is for educational purposes only and is not intended for real trading or investment. Note: the system does not actually make any trades. Disclaimer This project is for educational and research purposes only. - 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 By using this software, you agree to use it solely for learning purposes. How to Install bash pipx install aihf (or uv tool install aihf, or pip install aihf into an environment of your choice) Then run it from anywhere: bash aihf API keys The app asks for keys the first time it needs them and saves them to ~/.hedge-fund/.env — nothing to configure up front. It needs: - A Financial Datasets API key, for prices, fundamentals, and earnings. Or, instead of a key, the private key of a Base wallet holding USDC: every call then pays for itself with x402 (pip install 'aihf[x402]'; last 365 days of data, non-professional use). - One model API key for the investor agents. Supported providers: Anthropic, OpenAI, DeepSeek, Google, xAI, Kimi, TypeSafe (Jev). Keys exported in your shell always win over the saved file. How to Run Interactive app bash aihf With no arguments, this launches the interactive terminal app. It has two modes: - Paper trading — your funds, each with a ledger of real market days and fake money. Highlight a fund to see what its next run will do; press enter to run it through the next completed session (an approval step shows the exact decision about to execute before anything trades), s for its full session history, h/r for the kill switch. Build a new fund from the same list: strategies, capital, cadence, tickers, and it is live. Every session is appended to a hash-chained ledger in ~/.hedge-fund/paper//, so NAV is a track record, not a reset. - Backtesting — replay a fund over history and watch its equity curve draw against its benchmark. Results are saved to ~/.hedge-fund/research/. Fund definitions live in ~/.hedge-fund/mandates/ and carry no tickers; you pick the universe per backtest. Development bash git clone https://github.com/virattt/ai-hedge-fund.git cd ai-hedge-fund poetry install poetry run aihf poetry run pytest hedge_fund How to Contribute 1. Fork the repository 2. Create a feature branch 3. Commit your changes 4. Push to the branch 5. Create a Pull Request Important: Please keep your pull requests small and focused. This will make it easier to review and merge. Feature Requests If you have a feature request, please open an issue and make sure it is tagged with enhancement. License This project is licensed under the MIT License - see the LICENSE file for details.
Top issues
#409It just keeps running and then generates an error with no info12 comments · 2025-07-30#363Suggest: including support for custom Deep Reinforcement learning algorithm6 comments · 2025-06-16#711Bug: App ignores OPENAI_BASE_URL overrides and fails to route to custom endpoints (Groq)5 comments · 2026-09-05#392Generic analysts showing wrong output format5 comments · 2025-07-13#429[Enhancement] Add Donald Trump Agent for Political-Market Strategy #4284 comments · 2025-08-25#412Documentation of Core System Logic & Data Ingestion4 comments · 2025-07-31#713question3 comments · 2026-09-19#411Fail to use run.bat on Windows3 comments · 2025-07-31
Latest release
ai-hedge-fund 2.7.2 v2.7.2 2026-11-09Changes - Browse a backtest's decisions. On the results screen, Browse decisions (or d) lists every decision, newest first. The pane beside it shows what was decided and what filled. Enter opens the same session report a paper fund uses: signals, theses, risk limits, and orders. - Point-in-time screener. FDClient.screen(as_of, filters) returns the companies that passed, judged from each company's newest filing public on or before that date. A screen without a date is refused. screener_fields() returns the fields, operators, sectors, and industries the screener accepts. A CLI backtest now pri