# docker-run-ai-hedge-fund **Repository Path**: ronghuasoft/docker-run-ai-hedge-fund ## Basic Information - **Project Name**: docker-run-ai-hedge-fund - **Description**: 使用docker 运行: ai-hedge-fund - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2025-05-20 - **Last Updated**: 2025-05-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 项目说明 项目地址: https://gitcode.com/gh_mirrors/ai/ai-hedge-fund 使用docker 构建啊项目,解决国内网络问题。 ```bash git clone https://gitee.com/pythonstock/docker-run-ai-hedge-fund.git cd docker-run-ai-hedge-fund run build.sh ``` ## 申请key,演示使用,已经删除,自己重新申请 deepseek的key [https://platform.deepseek.com/api_keys](https://platform.deepseek.com/api_keys) sk-1181776cfe0d48099fd7ef028d9c7285 [https://www.financialdatasets.ai/](https://www.financialdatasets.ai/) key: 491abec3-0eaa-4a43-908b-f9f509b404b3 ## 运行镜像 ```bash docker run --name ai-hedge-fund -e DEEPSEEK_API_KEY=sk-1181776cfe0d48099fd7ef028d9c7285 \ -e FINANCIAL_DATASETS_API_KEY=491abec3-0eaa-4a43-908b-f9f509b404b3 \ -itd pythonstock/docker-run-ai-hedge-fund docker exec -it ai-hedge-fund bash ``` ## 异常分析 ```python ## 大模型未配置: File "/data/ai-hedge-fund/src/llm/models.py", line 206, in get_model raise ValueError("DeepSeek API key not found. Please make sure DEEPSEEK_API_KEY is set in your .env file.") ValueError: DeepSeek API key not found. Please make sure DEEPSEEK_API_KEY is set in your .env file. During task with name 'ben_graham_agent' and id '5f72b05a-9d9b-63d9-b8a6-30f659b0e32c' ``` ## 配置环境变量 运行: ```bash python3 src/main.py --ticker AAPL,MSFT,NVDA ? Select your AI analysts. [Ben Graham] Selected analysts: Ben Graham ? Select your LLM model: [deepseek] deepseek-v3 Selected DeepSeek model: deepseek-chat ✓ Ben Graham [NVDA] Done ✓ Risk Management [NVDA] Done ✓ Portfolio Management[NVDA] Done Analysis for AAPL ================================================== AGENT ANALYSIS: [AAPL] +------------+----------+--------------+--------------------------------------------------------------+ | Agent | Signal | Confidence | Reasoning | +============+==========+==============+==============================================================+ | Ben Graham | NEUTRAL | 45.0% | While AAPL demonstrates positive and growing EPS across all | | | | | periods, indicating stable earnings, its financial strength | | | | | metrics fall short of Graham's conservative standards. The | | | | | current ratio of 0.87 is significantly below Graham's | | | | | preferred threshold of 1.5, reflecting weaker liquidity, and | | | | | the debt ratio of 0.84 is quite high by Graham's standards, | | | | | suggesting excessive leverage. Additionally, the stock | | | | | trades at a substantial premium to its Graham Number of | | | | | $22.59, with a negative margin of safety of -88.39%, | | | | | offering no margin of safety. Although the company has a | | | | | consistent dividend record, the combination of weak | | | | | liquidity, high leverage, and overvaluation relative to | | | | | Graham's intrinsic value metrics warrants a neutral stance. | +------------+----------+--------------+--------------------------------------------------------------+ TRADING DECISION: [AAPL] +------------+--------------------------------------------------------------+ | Action | HOLD | +------------+--------------------------------------------------------------+ | Quantity | 0 | +------------+--------------------------------------------------------------+ | Confidence | 45.0% | +------------+--------------------------------------------------------------+ | Reasoning | Neutral signal with low confidence, no existing positions to | | | manage | +------------+--------------------------------------------------------------+ Analysis for MSFT ================================================== AGENT ANALYSIS: [MSFT] +------------+----------+--------------+-------------------------------------------------------------+ | Agent | Signal | Confidence | Reasoning | +============+==========+==============+=============================================================+ | Ben Graham | NEUTRAL | 50.0% | MSFT exhibits stable earnings growth with positive EPS in | | | | | all periods, which aligns with Graham's preference for | | | | | earnings consistency. The company's financial strength is | | | | | moderate, with a current ratio of 1.27 (below Graham's | | | | | preferred 2.0 threshold) but a conservative debt ratio of | | | | | 0.48 (under Graham's 0.50 limit). However, the valuation | | | | | presents no margin of safety, with the Graham Number at | | | | | $98.19 and the current price trading at a 73.31% premium, | | | | | far exceeding Graham's strict criteria for intrinsic value. | | | | | The dividend history provides some cushion, but the lack of | | | | | a margin of safety and weaker liquidity metrics necessitate | | | | | a neutral stance. | +------------+----------+--------------+-------------------------------------------------------------+ TRADING DECISION: [MSFT] +------------+------------------------------------------------------+ | Action | HOLD | +------------+------------------------------------------------------+ | Quantity | 0 | +------------+------------------------------------------------------+ | Confidence | 50.0% | +------------+------------------------------------------------------+ | Reasoning | Neutral signal with moderate confidence, no existing | | | positions to manage | +------------+------------------------------------------------------+ Analysis for NVDA ================================================== AGENT ANALYSIS: [NVDA] +------------+----------+--------------+--------------------------------------------------------------+ | Agent | Signal | Confidence | Reasoning | +============+==========+==============+==============================================================+ | Ben Graham | NEUTRAL | 50.0% | NVDA demonstrates strong financial strength with a current | | | | | ratio of 4.44 (well above Graham's preferred 2.0 threshold) | | | | | and a conservative debt ratio of 0.29 (below Graham's 0.50 | | | | | limit). The company has consistently positive and growing | | | | | EPS, and it pays dividends, adding an extra layer of safety. | | | | | However, the valuation metrics present a significant | | | | | concern. The stock trades at a steep premium to both its | | | | | Graham Number ($14.69 vs. $101.12 market price, -85.47% | | | | | margin of safety) and its NCAV per share ($1.95 vs. | | | | | $101.12). While the financial strength and earnings | | | | | stability are commendable, the extreme overvaluation | | | | | relative to Graham's conservative metrics prevents a bullish | | | | | recommendation. A neutral stance is warranted until the | | | | | price aligns more closely with intrinsic value. | +------------+----------+--------------+--------------------------------------------------------------+ TRADING DECISION: [NVDA] +------------+------------------------------------------------------+ | Action | HOLD | +------------+------------------------------------------------------+ | Quantity | 0 | +------------+------------------------------------------------------+ | Confidence | 50.0% | +------------+------------------------------------------------------+ | Reasoning | Neutral signal with moderate confidence, no existing | | | positions to manage | +------------+------------------------------------------------------+ PORTFOLIO SUMMARY: +----------+----------+------------+--------------+ | Ticker | Action | Quantity | Confidence | +==========+==========+============+==============+ | AAPL | HOLD | 0 | 45.0% | +----------+----------+------------+--------------+ | MSFT | HOLD | 0 | 50.0% | +----------+----------+------------+--------------+ | NVDA | HOLD | 0 | 50.0% | +----------+----------+------------+--------------+ Portfolio Strategy: Neutral signal with low confidence, no existing positions to manage ```