前言
在当今瞬息万变的金融市场中,寻找稳定而有效的投资策略是每位投资者的梦想。随着人工智能技术的飞速发展,AI在股票投资领域的应用正逐渐成为现实。今天,给大家介绍一款开源、免费且功能强大的AI股票投资神器:AI Hedge Fund。
项目介绍
AI Hedge Fund 是一个基于 AI 技术的对冲基金概念验证项目。该项目旨在探索利用 AI 进行交易决策的可能性,并通过模拟交易来验证其效果。
应用场景功能模块估值代理(Valuation Agent):情感分析代理(Sentiment Agent):基本面分析代理(Fundamentals Agent):技术分析代理(Technicals Agent):风险管理代理(Risk Manager):投资组合管理代理(Portfolio Manager):功能特点项目技术栈项目结构
ai-hedge-fund/
├── src/
│ ├── agents/ # Agent definitions and workflow
│ │ ├── bill_ackman.py # Bill Ackman agent
│ │ ├── fundamentals.py # Fundamental analysis agent
│ │ ├── portfolio_manager.py # Portfolio management agent
│ │ ├── risk_manager.py # Risk management agent
│ │ ├── sentiment.py # Sentiment analysis agent
│ │ ├── technicals.py # Technical analysis agent
│ │ ├── valuation.py # Valuation analysis agent
│ │ ├── ... # Other agents
│ │ ├── warren_buffett.py # Warren Buffett agent
│ │ ├── aswath_damodaran.py # Aswath Damodaran agent
│ │ ├── ... # Other agents
│ │ ├── ... # Other agents
│ ├── tools/ # Agent tools
│ │ ├── api.py # API tools
│ ├── backtester.py # Backtesting tools
│ ├── main.py # Main entry point
├── pyproject.toml
├── ...
在 Docker 中快速使用项目仓库克隆
git clone https://github.com/virattt/ai-hedge-fund.git
cd ai-hedge-fund
设置环境变量
# Create .env file for your API keys
cp .env.example .env
设置您的 API 密钥
# For running LLMs hosted by openai (gpt-4o, gpt-4o-mini, etc.)
# Get your OpenAI API key from https://platform.openai.com/
OPENAI_API_KEY=your-openai-api-key
# For running LLMs hosted by groq (deepseek, llama3, etc.)
# Get your Groq API key from https://groq.com/
GROQ_API_KEY=your-groq-api-key
# For getting financial data to power the hedge fund
# Get your Financial Datasets API key from https://financialdatasets.ai/
FINANCIAL_DATASETS_API_KEY=your-financial-datasets-api-key
构建 Docker 镜像
# On Linux/Mac:
./run.sh build
# On Windows:
run.bat build
项目运行
# On Linux/Mac:
./run.sh --ticker AAPL,MSFT,NVDA main
# On Windows:
run.bat --ticker AAPL,MSFT,NVDA main
免责声明:由于无法甄别是否为投稿用户创作以及文章的准确性,本站尊重并保护知识产权,根据《信息网络传播权保护条例》,如我们转载的作品侵犯了您的权利,请您通知我们,请将本侵权页面网址发送邮件到qingge@88.com,深感抱歉,我们会做删除处理。