virattt / ai-hedge-fund
virattt / ai-hedge-fund
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. 🚧 The project is evolving. We’re rebuilding it into a persistent, always-on AI hedge fund — a fund as a first-class entity you can backtest, paper-trade, and (opt-in) run live, with the investor agents reimagined as pluggable, backtestable “alpha models.” Read the Vision → and the Roadmap →.
AI 对冲基金 这是一个 AI 驱动对冲基金的概念验证项目。该项目的目标是探索利用人工智能进行交易决策。本项目仅供教育目的,不用于实际交易或投资。🚧 该项目正在不断演进。我们正在将其重构为一个持久、全天候运行的 AI 对冲基金——一个你可以进行回测、模拟交易,并(可选)进行实盘交易的一流实体,同时将投资者智能体重新构想为可插拔、可回测的“Alpha 模型”。阅读愿景 → 和路线图 →。
This system employs several agents working together: Aswath Damodaran Agent - The Dean of Valuation, focuses on story, numbers, and disciplined valuation Ben Graham Agent - The godfather of value investing, only buys hidden gems with a margin of safety Bill Ackman Agent - An activist investor, takes bold positions and pushes for change Cathie Wood Agent - The queen of growth investing, believes in the power of innovation and disruption Charlie Munger Agent - Warren Buffett’s partner, only buys wonderful businesses at fair prices Michael Burry Agent - The Big Short contrarian who hunts for deep value Mohnish Pabrai Agent - The Dhandho investor, who looks for doubles at low risk Nassim Taleb Agent - The Black Swan risk analyst, focuses on tail risk, antifragility, and asymmetric payoffs Peter Lynch Agent - Practical investor who seeks “ten-baggers” in everyday businesses Phil Fisher Agent - Meticulous growth investor who uses deep “scuttlebutt” research Rakesh Jhunjhunwala Agent - The Big Bull of India Stanley Druckenmiller Agent - Macro legend who hunts for asymmetric opportunities with growth potential Warren Buffett Agent - The oracle of Omaha, seeks wonderful companies at a fair price Valuation Agent - Calculates the intrinsic value of a stock and generates trading signals Sentiment Agent - Analyzes market sentiment and generates trading signals Fundamentals Agent - Analyzes fundamental data and generates trading signals Technicals Agent - Analyzes technical indicators and generates trading signals Risk Manager - Calculates risk metrics and sets position limits Portfolio Manager - Makes final trading decisions and generates orders Note: the system does not actually make any trades.
该系统采用了多个协同工作的智能体: Aswath Damodaran 智能体 - 估值学泰斗,专注于故事、数据和严谨的估值。 Ben Graham 智能体 - 价值投资教父,只购买具有安全边际的隐藏瑰宝。 Bill Ackman 智能体 - 激进投资者,采取大胆立场并推动变革。 Cathie Wood 智能体 - 成长投资女王,坚信创新与颠覆的力量。 Charlie Munger 智能体 - 沃伦·巴菲特的合伙人,只以合理价格购买优秀企业。 Michael Burry 智能体 - 《大空头》中的逆向投资者,专门寻找深度价值。 Mohnish Pabrai 智能体 - Dhandho 投资者,寻找低风险下的翻倍机会。 Nassim Taleb 智能体 - 黑天鹅风险分析师,专注于尾部风险、反脆弱性和非对称收益。 Peter Lynch 智能体 - 务实投资者,在日常业务中寻找“十倍股”。 Phil Fisher 智能体 - 细致的成长型投资者,使用深入的“传闻”研究。 Rakesh Jhunjhunwala 智能体 - 印度大牛市的领军人物。 Stanley Druckenmiller 智能体 - 宏观传奇,寻找具有增长潜力的非对称机会。 Warren Buffett 智能体 - 奥马哈先知,以合理价格寻找优秀公司。 估值智能体 - 计算股票内在价值并生成交易信号。 情绪智能体 - 分析市场情绪并生成交易信号。 基本面智能体 - 分析基本面数据并生成交易信号。 技术面智能体 - 分析技术指标并生成交易信号。 风险管理器 - 计算风险指标并设定头寸限制。 投资组合经理 - 做出最终交易决策并生成订单。 注意:该系统实际上并不进行任何交易。
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.
免责声明 本项目仅用于教育和研究目的。不用于实际交易或投资。不提供任何投资建议或保证。创建者对财务损失不承担任何责任。投资决策请咨询财务顾问。过往业绩不代表未来结果。使用本软件即表示您同意仅将其用于学习目的。
Table of Contents
- How to Install
- How to Run
- ⌨️ Command Line Interface
- 🖥️ Web Application
- How to Contribute
- Feature Requests
- License
目录
- 如何安装
- 如何运行
- ⌨️ 命令行界面
- 🖥️ Web 应用程序
- 如何贡献
- 功能请求
- 许可证
How to Install Before you can run the AI Hedge Fund, you’ll need to install it and set up your API keys. These steps are common to both the full-stack web application and command line interface.
- Clone the Repository
git clone https://github.com/virattt/ai-hedge-fund.gitcd ai-hedge-fund - Set up API keys
Create a .env file for your API keys:
cp .env.example .envOpen and edit the .env file to add your API keys:OPENAI_API_KEY=your-openai-api-keyFINANCIAL_DATASETS_API_KEY=your-financial-datasets-api-keyImportant: You must set at least one LLM API key (e.g. OPENAI_API_KEY, GROQ_API_KEY, ANTHROPIC_API_KEY, or DEEPSEEK_API_KEY) for the hedge fund to work.
如何安装 在运行 AI 对冲基金之前,您需要安装它并设置 API 密钥。这些步骤适用于全栈 Web 应用程序和命令行界面。
- 克隆仓库
git clone https://github.com/virattt/ai-hedge-fund.gitcd ai-hedge-fund - 设置 API 密钥
为您的 API 密钥创建一个 .env 文件:
cp .env.example .env打开并编辑 .env 文件以添加您的 API 密钥:OPENAI_API_KEY=您的-openai-api-密钥FINANCIAL_DATASETS_API_KEY=您的-financial-datasets-api-密钥重要提示:您必须至少设置一个 LLM API 密钥(例如 OPENAI_API_KEY、GROQ_API_KEY、ANTHROPIC_API_KEY 或 DEEPSEEK_API_KEY),对冲基金才能正常工作。
How to Run ⌨️ Command Line Interface
You can run the AI Hedge Fund directly via terminal. This approach offers more granular control and is useful for automation, scripting, and integration purposes.
Quick Start
Install Poetry (if not already installed): curl -sSL https://install.python-poetry.org | python3 -
Install dependencies: poetry install
Run the AI Hedge Fund: poetry run python src/main.py --ticker AAPL,MSFT,NVDA
如何运行 ⌨️ 命令行界面
您可以直接通过终端运行 AI 对冲基金。这种方法提供了更细粒度的控制,适用于自动化、脚本编写和集成目的。
快速开始
安装 Poetry(如果尚未安装):curl -sSL https://install.python-poetry.org | python3 -
安装依赖项:poetry install
运行 AI 对冲基金:poetry run python src/main.py --ticker AAPL,MSFT,NVDA
🖥️ Web Application The new way to run the AI Hedge Fund is through our web application that provides a user-friendly interface. This is recommended for users who prefer visual interfaces over command line tools. Please see detailed instructions on how to install and run the web application here.
🖥️ Web 应用程序 运行 AI 对冲基金的新方式是通过我们提供用户友好界面的 Web 应用程序。对于喜欢可视化界面而非命令行工具的用户,推荐使用此方式。请在此处查看有关如何安装和运行 Web 应用程序的详细说明。
How to Contribute
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request Important: Please keep your pull requests small and focused. This will make it easier to review and merge.
如何贡献
- Fork 本仓库
- 创建功能分支
- 提交您的更改
- 推送到分支
- 创建 Pull Request 重要提示:请保持您的 Pull Request 小而专注。这将使审查和合并变得更容易。
Feature Requests If you have a feature request, please open an issue and make sure it is tagged with enhancement.
功能请求 如果您有功能请求,请提交一个 Issue 并确保将其标记为 enhancement。
License This project is licensed under the MIT License - see the LICENSE file for details.
许可证 本项目采用 MIT 许可证授权 - 有关详细信息,请参阅 LICENSE 文件。