股票市场涉及众多统计数据和模式。股票交易基于研究和数据驱动的决策。人工智能的使用可以实现流程自动化,让投资者在研究上花费更少的时间,同时提高准确性。这使他们能够更加专注于监督实际交易和服务客户。
顶尖对冲基金经理发挥着至关重要的作用,因为他们积极管理投资组合,以实现高回报为目标。虽然有些人可能旨在超越市场表现,但他们的主要目标也可能包括将损失降至最低。例如,在经济低迷或衰退期间,有效的管理有助于缓解净值的大幅下跌,有可能将潜在跌幅减少30%至50%。
投资总是伴随着一定程度的风险。此外,聘请知名基金经理对普通人来说可能过于昂贵。
如果我们能利用一个人工智能体来模仿当今杰出对冲基金经理的投资策略,结果会如何呢?
文章目录
这是关于什么的?
我想分享一个概念验证项目,名为“人工智能对冲基金”,这是一个由人工智能驱动的对冲基金,可生成交易决策信号。该项目的目标是创建能够复制著名投资者和顶级对冲基金经理投资风格的人工智能智能体。
在对几个模拟投资组合进行试验后,我发现这可能是一种很有趣的方法,即利用人工智能实现交易决策(而非实际交易)分析的自动化。在本文中,我将探讨这个智能体人工智能项目的设计与实施。
图2;人工智能驱动对冲基金设计工作流程
注意:该系统模拟交易决策,并不实际进行交易。
免责声明
本文件仅供**教育和研究目的** 使用,以促进对智能体人工智能复杂任务自动化的学习。它不应被用作现实世界交易或投资的指南。本文作者及项目创建者对任何由此产生的财务损失不承担责任。在做出投资决策之前,请始终向合格的财务顾问寻求建议。
其主要思路是创建一个人工智能体,模仿成功的知名投资者的各种投资风格和策略,然后将这些见解应用于交易决策。啊哈——现在我们有了一支由人工智能体驱动的基金经理团队,他们致力于帮助我们做出更优的交易决策。
为什么个人投资风格很重要?
结果不言而喻;2021年至2024年,沃伦·巴菲特(Warren Buffett)的表现显著优于方舟投资(Ark Invest)的凯西·伍德(Cathie Wood)。巴菲特在这三年间收益增长68.5%,而凯西·伍德的基金则下跌了67.7%。
个性化风格人工智能智能体
以下是该系统支持的投资角色类型智能体列表:
凯西·伍德智能体——成长型投资女王,坚信创新与颠覆的力量。
沃伦·巴菲特智能体 — 这位奥马哈先知,以合理价格寻找卓越公司。
本杰明·格雷厄姆智能体——价值投资教父,只买入具有安全边际的隐藏瑰宝。
比尔·阿克曼智能体 —— 一位激进投资者,大胆持仓并推动变革。
查理·芒格智能体—— 沃伦·巴菲特的搭档,只以合理价格买入出色的企业。
菲利普·费雪智能体 —— 精通小道消息分析法的传奇成长型投资者。
斯坦利·德鲁肯米勒智能体——寻找具有增长潜力的不对称机会的宏观传奇人物。
技术任务智能体
执行专项分析的技术智能体列表
估值智能体 —— 计算股票的内在价值并生成交易信号
情绪智能体 — 分析市场情绪并生成交易信号
基本面智能体 —— 分析基本面数据并生成交易信号
技术智能体 —— 分析技术指标并生成交易信号
风险经理 — 计算风险指标并设定头寸限制
投资组合经理 — 做出最终交易决策并生成订单
获取股票代码
你需要知道股票代码名称:苹果(AAPL)、谷歌(GOOGL)、英伟达(NVDA)、特斯拉(TSLA)等。如果你不知道股票的代码名称,可以在网络上搜索。
获取全面的财务数据
你还需要在预算范围内收集有关该股票的真实准确的金融数据。幸运的是,该项目找到了一个不错的数据提供商,名为Financial Datasets,这是一个对开发者友好的股市API,你只需在此获取自己的API密钥:https://financialdatasets.ai.
大语言模型供应商
该项目支持OpenAI、谷歌、Grok、DeepSeek或Anthropic。所需的只是.env文件下的API密钥。
环境设置
安装Poetry(如果尚未安装)
curl -sSL https://install.python-poetry.org | python3 -
or pip install poetry
安装依赖项
poetry install
创建一个.env文件
# 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
运行对冲基金
在项目文件夹下的终端中运行以下命令:
用法1:单一股票代码:苹果(AAPL)
第一个例子,我们要求智能体根据凯西·伍德的投资原则,对苹果公司(AAPL)进行分析工作流程。然后生成一个交易决策信号,以及其数量和置信度。
咱们开始运行智能体,应该很快。
$ poetry run python src/main.py --ticker AAPL
在第一个屏幕上,系统会要求你选择 “角色型” 智能体、“技术型” 分析,或者你希望使用的所有选项。
图3;人工智能驱动对冲基金运行界面1
选定的基金经理:凯西·伍德
图4;人工智能驱动对冲基金运行界面2
所选大语言模型供应商:谷歌Gemini-2.0-flash
图5;人工智能动力对冲基金运行屏幕3
稍等一下,等待最终报告。凯西·伍德的信号是看跌,交易决策为:做空,还有交易策略总结。
Portfolio Strategy:
Cathie Wood agent signal is bearish with 75% confidence.
Shorting the maximum allowed shares of AAPL (90) as per the
maximum shares limit. Margin requirement is 0 so we can
proceed with the short.
如何解读报告结果——无论是正面的还是负面的——在很大程度上取决于你个人的投资策略和风险承受能力。务必咨询专业投资人士。
用法二:多股票代码和多智能体风格
在第二个例子中,我们要求智能体根据凯西·伍德(Cathy Wood)和沃伦·巴菲特(Warren Buffett)的投资原则,结合技术分析、基本面分析、市场情绪分析和估值分析,对苹果公司(AAPL)、微软、英伟达等多只股票进行分析工作流程。然后生成最终的交易决策信号,以及信号的数量和置信度。
**股票**:苹果、微软和英伟达
角色智能体:凯西·伍德、沃伦·巴菲特
图6;人工智能驱动对冲基金运行界面-t2
图-7。AI Power Hedge Fund运行屏幕-t3
选择谷歌双子座2.0-flash
图8;人工智能动力对冲基金运行界面-t3
对于每张股票票据,智能体生成一份分为三个部分的报告:
- 智能体分析
- 基本面分析
- 技术分析
- 估值
- 情绪
2. 人物风格信号
- 凯西·伍德
- 沃伦·巴菲特
3. 交易决策行动摘要
- 行动(例如买入、持有、卖出)
- 数量
- 置信度
- 推理
查看完整报告如下:
✓ Cathie Wood [NVDA] Done
✓ Fundamentals [NVDA] Done
✓ Sentiment [NVDA] Done
✓ Technical Analyst [NVDA] Done
✓ Valuation [NVDA] Done
✓ Warren Buffett [NVDA] Done
✓ Risk Management [NVDA] Done
✓ Portfolio Management[NVDA] Done
Analysis for AAPL
==================================================
AGENT ANALYSIS: [AAPL]
+-------------------+----------+--------------+--------------------------------------------------------------+
| Agent | Signal | Confidence | Reasoning |
+===================+==========+==============+==============================================================+
| Fundamentals | NEUTRAL | 25.0% | { "profitability_signal": { "signal": "bullish", "details": |
| | | | "ROE: 145.30%, Net Margin: 24.30%, Op Margin: 31.77%" }, |
| | | | "growth_signal": { "signal": "neutral", "details": "Revenue |
| | | | Growth: 1.21%, Earnings Growth: 2.58%" }, |
| | | | "financial_health_signal": { "signal": "neutral", "details": |
| | | | "Current Ratio: 0.92, D/E: 4.15" }, "price_ratios_signal": { |
| | | | "signal": "bearish", "details": "P/E: 40.18, P/B: 57.87, |
| | | | P/S: 9.76" } } |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Technical Analyst | BEARISH | 22% | |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Valuation | BEARISH | 76.0% | { "dcf_analysis": { "signal": "bearish", "details": |
| | | | "Intrinsic Value: $1,384,683,782,101.15, Market Cap: |
| | | | $3,863,453,200,570.00, Gap: -64.2%" }, |
| | | | "owner_earnings_analysis": { "signal": "bearish", "details": |
| | | | "Owner Earnings Value: $467,980,442,527.33, Market Cap: |
| | | | $3,863,453,200,570.00, Gap: -87.9%" } } |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Sentiment | BEARISH | 59.0% | Weighted Bullish signals: 123.7, Weighted Bearish signals: |
| | | | 204.7 |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Cathie Wood | BEARISH | 75.0% | While Apple demonstrates positive operating leverage and |
| | | | invests in R&D, its innovation score is moderate. The |
| | | | primary concern is the negative margin of safety based on |
| | | | intrinsic value, suggesting the market price significantly |
| | | | exceeds our calculated valuation. As a growth investor, |
| | | | overpaying significantly reduces potential returns, leading |
| | | | to a bearish signal despite some positive innovation |
| | | | indicators. |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Warren Buffett | BEARISH | 90.0% | While AAPL exhibits a strong economic moat with stable ROE |
| | | | and operating margins, shareholder-friendly management |
| | | | through buybacks and dividends, and a robust return on |
| | | | equity, several factors deter investment. The debt-to-equity |
| | | | ratio is very high at 4.2. The current ratio is weak at 0.9. |
| | | | The price-to-earnings ratio is elevated at 40.18, and the |
| | | | price-to-book ratio is extremely high at 57.87. Most |
| | | | critically, the intrinsic value analysis reveals a negative |
| | | | margin of safety of -50.9%. The current market |
| | | | capitalization significantly exceeds the calculated |
| | | | intrinsic value. Inconsistent earnings growth and a total |
| | | | earnings decline over the past 10 periods further erode |
| | | | confidence. According to Buffett's principles, a significant |
| | | | margin of safety is paramount, which is absent in this case. |
| | | | Therefore, a bearish signal is warranted. |
+-------------------+----------+--------------+--------------------------------------------------------------+
TRADING DECISION: [AAPL]
+------------+--------------------------------------------------------------+
| Action | SHORT |
+------------+--------------------------------------------------------------+
| Quantity | 91 |
+------------+--------------------------------------------------------------+
| Confidence | 71.0% |
+------------+--------------------------------------------------------------+
| Reasoning | AAPL shows overwhelmingly bearish signals across valuation, |
| | sentiment, Cathie Wood, and Warren Buffett agents. The |
| | technical analyst and fundamentals agents are neutral. Given |
| | the strong bearish signals, I will initiate a short |
| | position, taking into account the maximum allowed shares. |
+------------+--------------------------------------------------------------+
Analysis for MSFT
==================================================
AGENT ANALYSIS: [MSFT]
+-------------------+----------+--------------+--------------------------------------------------------------+
| Agent | Signal | Confidence | Reasoning |
+===================+==========+==============+==============================================================+
| Fundamentals | BEARISH | 75.0% | { "profitability_signal": { "signal": "bullish", "details": |
| | | | "ROE: 33.40%, Net Margin: 35.40%, Op Margin: 44.42%" }, |
| | | | "growth_signal": { "signal": "bearish", "details": "Revenue |
| | | | Growth: 2.99%, Earnings Growth: 2.47%" }, |
| | | | "financial_health_signal": { "signal": "bearish", "details": |
| | | | "Current Ratio: 1.35, D/E: 0.76" }, "price_ratios_signal": { |
| | | | "signal": "bearish", "details": "P/E: 33.79, P/B: 10.35, |
| | | | P/S: 11.97" } } |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Technical Analyst | NEUTRAL | 13% | Decision |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Valuation | BEARISH | 72.0% | { "dcf_analysis": { "signal": "bearish", "details": |
| | | | "Intrinsic Value: $983,137,324,838.96, Market Cap: |
| | | | $3,133,802,247,084.00, Gap: -68.6%" }, |
| | | | "owner_earnings_analysis": { "signal": "bearish", "details": |
| | | | "Owner Earnings Value: $754,711,464,524.99, Market Cap: |
| | | | $3,133,802,247,084.00, Gap: -75.9%" } } |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Sentiment | BULLISH | 59.0% | Weighted Bullish signals: 152.5, Weighted Bearish signals: |
| | | | 81.2 |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Cathie Wood | NEUTRAL | 65.0% | While Microsoft demonstrates strong innovation funding |
| | | | capacity, healthy operating margins, and a focus on |
| | | | reinvestment, the current valuation presents a significant |
| | | | challenge. The calculated margin of safety is -47.14%, |
| | | | indicating that the market price significantly exceeds the |
| | | | estimated intrinsic value. Although MSFT invests moderately |
| | | | in R&D (13.5% of revenue) and has a high gross margin |
| | | | (67.8%), the overvaluation outweighs these positive factors, |
| | | | making a bullish stance difficult to justify. I will remain |
| | | | neutral until the valuation becomes more attractive or |
| | | | Microsoft demonstrates a disruptive breakthrough justifying |
| | | | the current market price. |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Warren Buffett | NEUTRAL | 65.0% | MSFT exhibits characteristics of a good business, including |
| | | | a strong ROE, operating margins, and a durable moat. |
| | | | Management is shareholder-oriented through buybacks and |
| | | | dividends. However, the inconsistent earnings growth and the |
| | | | lack of a significant margin of safety (less than 30%) based |
| | | | on the intrinsic value calculation prevent a bullish signal. |
| | | | While not significantly overvalued, it's not trading at a |
| | | | discount sufficient to warrant investment according to |
| | | | Buffett's principles. |
+-------------------+----------+--------------+--------------------------------------------------------------+
TRADING DECISION: [MSFT]
+------------+----------------------------------------------------------+
| Action | HOLD |
+------------+----------------------------------------------------------+
| Quantity | 0 |
+------------+----------------------------------------------------------+
| Confidence | 56.0% |
+------------+----------------------------------------------------------+
| Reasoning | MSFT has mixed signals. Fundamentals and valuation are |
| | bearish, while sentiment is bullish. Technical analysis, |
| | Cathie Wood, and Warren Buffett are neutral. The overall |
| | picture is unclear, so I will hold off on any action. |
+------------+----------------------------------------------------------+
Analysis for NVDA
==================================================
AGENT ANALYSIS: [NVDA]
+-------------------+----------+--------------+--------------------------------------------------------------+
| Agent | Signal | Confidence | Reasoning ✓ Cathie Wood [NVDA] Done
✓ Fundamentals [NVDA] Done
✓ Sentiment [NVDA] Done
✓ Technical Analyst [NVDA] Done
✓ Valuation [NVDA] Done
✓ Warren Buffett [NVDA] Done
✓ Risk Management [NVDA] Done
✓ Portfolio Management[NVDA] Done
Analysis for AAPL
==================================================
AGENT ANALYSIS: [AAPL]
+-------------------+----------+--------------+--------------------------------------------------------------+
| Agent | Signal | Confidence | Reasoning |
+===================+==========+==============+==============================================================+
| Fundamentals | NEUTRAL | 25.0% | { "profitability_signal": { "signal": "bullish", "details": |
| | | | "ROE: 145.30%, Net Margin: 24.30%, Op Margin: 31.77%" }, |
| | | | "growth_signal": { "signal": "neutral", "details": "Revenue |
| | | | Growth: 1.21%, Earnings Growth: 2.58%" }, |
| | | | "financial_health_signal": { "signal": "neutral", "details": |
| | | | "Current Ratio: 0.92, D/E: 4.15" }, "price_ratios_signal": { |
| | | | "signal": "bearish", "details": "P/E: 40.18, P/B: 57.87, |
| | | | P/S: 9.76" } } |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Technical Analyst | BEARISH | 22% | |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Valuation | BEARISH | 76.0% | { "dcf_analysis": { "signal": "bearish", "details": |
| | | | "Intrinsic Value: $1,384,683,782,101.15, Market Cap: |
| | | | $3,863,453,200,570.00, Gap: -64.2%" }, |
| | | | "owner_earnings_analysis": { "signal": "bearish", "details": |
| | | | "Owner Earnings Value: $467,980,442,527.33, Market Cap: |
| | | | $3,863,453,200,570.00, Gap: -87.9%" } } |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Sentiment | BEARISH | 59.0% | Weighted Bullish signals: 123.7, Weighted Bearish signals: |
| | | | 204.7 |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Cathie Wood | BEARISH | 75.0% | While Apple demonstrates positive operating leverage and |
| | | | invests in R&D, its innovation score is moderate. The |
| | | | primary concern is the negative margin of safety based on |
| | | | intrinsic value, suggesting the market price significantly |
| | | | exceeds our calculated valuation. As a growth investor, |
| | | | overpaying significantly reduces potential returns, leading |
| | | | to a bearish signal despite some positive innovation |
| | | | indicators. |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Warren Buffett | BEARISH | 90.0% | While AAPL exhibits a strong economic moat with stable ROE |
| | | | and operating margins, shareholder-friendly management |
| | | | through buybacks and dividends, and a robust return on |
| | | | equity, several factors deter investment. The debt-to-equity |
| | | | ratio is very high at 4.2. The current ratio is weak at 0.9. |
| | | | The price-to-earnings ratio is elevated at 40.18, and the |
| | | | price-to-book ratio is extremely high at 57.87. Most |
| | | | critically, the intrinsic value analysis reveals a negative |
| | | | margin of safety of -50.9%. The current market |
| | | | capitalization significantly exceeds the calculated |
| | | | intrinsic value. Inconsistent earnings growth and a total |
| | | | earnings decline over the past 10 periods further erode |
| | | | confidence. According to Buffett's principles, a significant |
| | | | margin of safety is paramount, which is absent in this case. |
| | | | Therefore, a bearish signal is warranted. |
+-------------------+----------+--------------+--------------------------------------------------------------+
TRADING DECISION: [AAPL]
+------------+--------------------------------------------------------------+
| Action | SHORT |
+------------+--------------------------------------------------------------+
| Quantity | 91 |
+------------+--------------------------------------------------------------+
| Confidence | 71.0% |
+------------+--------------------------------------------------------------+
| Reasoning | AAPL shows overwhelmingly bearish signals across valuation, |
| | sentiment, Cathie Wood, and Warren Buffett agents. The |
| | technical analyst and fundamentals agents are neutral. Given |
| | the strong bearish signals, I will initiate a short |
| | position, taking into account the maximum allowed shares. |
+------------+--------------------------------------------------------------+
Analysis for MSFT
==================================================
AGENT ANALYSIS: [MSFT]
+-------------------+----------+--------------+--------------------------------------------------------------+
| Agent | Signal | Confidence | Reasoning |
+===================+==========+==============+==============================================================+
| Fundamentals | BEARISH | 75.0% | { "profitability_signal": { "signal": "bullish", "details": |
| | | | "ROE: 33.40%, Net Margin: 35.40%, Op Margin: 44.42%" }, |
| | | | "growth_signal": { "signal": "bearish", "details": "Revenue |
| | | | Growth: 2.99%, Earnings Growth: 2.47%" }, |
| | | | "financial_health_signal": { "signal": "bearish", "details": |
| | | | "Current Ratio: 1.35, D/E: 0.76" }, "price_ratios_signal": { |
| | | | "signal": "bearish", "details": "P/E: 33.79, P/B: 10.35, |
| | | | P/S: 11.97" } } |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Technical Analyst | NEUTRAL | 13% | |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Valuation | BEARISH | 72.0% | { "dcf_analysis": { "signal": "bearish", "details": |
| | | | "Intrinsic Value: $983,137,324,838.96, Market Cap: |
| | | | $3,133,802,247,084.00, Gap: -68.6%" }, |
| | | | "owner_earnings_analysis": { "signal": "bearish", "details": |
| | | | "Owner Earnings Value: $754,711,464,524.99, Market Cap: |
| | | | $3,133,802,247,084.00, Gap: -75.9%" } } |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Sentiment | BULLISH | 59.0% | Weighted Bullish signals: 152.5, Weighted Bearish signals: |
| | | | 81.2 |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Cathie Wood | NEUTRAL | 65.0% | While Microsoft demonstrates strong innovation funding |
| | | | capacity, healthy operating margins, and a focus on |
| | | | reinvestment, the current valuation presents a significant |
| | | | challenge. The calculated margin of safety is -47.14%, |
| | | | indicating that the market price significantly exceeds the |
| | | | estimated intrinsic value. Although MSFT invests moderately |
| | | | in R&D (13.5% of revenue) and has a high gross margin |
| | | | (67.8%), the overvaluation outweighs these positive factors, |
| | | | making a bullish stance difficult to justify. I will remain |
| | | | neutral until the valuation becomes more attractive or |
| | | | Microsoft demonstrates a disruptive breakthrough justifying |
| | | | the current market price. |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Warren Buffett | NEUTRAL | 65.0% | MSFT exhibits characteristics of a good business, including |
| | | | a strong ROE, operating margins, and a durable moat. |
| | | | Management is shareholder-oriented through buybacks and |
| | | | dividends. However, the inconsistent earnings growth and the |
| | | | lack of a significant margin of safety (less than 30%) based |
| | | | on the intrinsic value calculation prevent a bullish signal. |
| | | | While not significantly overvalued, it's not trading at a |
| | | | discount sufficient to warrant investment according to |
| | | | Buffett's principles. |
+-------------------+----------+--------------+--------------------------------------------------------------+
TRADING DECISION: [MSFT]
+------------+----------------------------------------------------------+
| Action | HOLD |
+------------+----------------------------------------------------------+
| Quantity | 0 |
+------------+----------------------------------------------------------+
| Confidence | 56.0% |
+------------+----------------------------------------------------------+
| Reasoning | MSFT has mixed signals. Fundamentals and valuation are |
| | bearish, while sentiment is bullish. Technical analysis, |
| | Cathie Wood, and Warren Buffett are neutral. The overall |
| | picture is unclear, so I will hold off on any action. |
+------------+----------------------------------------------------------+
Analysis for NVDA
==================================================
AGENT ANALYSIS: [NVDA]
+-------------------+----------+--------------+--------------------------------------------------------------+
| Agent | Signal | Confidence | Reasoning |
+===================+==========+==============+==============================================================+
| Fundamentals | BULLISH | 75.0% | { "profitability_signal": { "signal": "bullish", "details": |
| | | | "ROE: 115.40%, Net Margin: 55.80%, Op Margin: 64.58%" }, |
| | | | "growth_signal": { "signal": "bullish", "details": "Revenue |
| | | | Growth: 15.21%, Earnings Growth: 15.55%" }, |
| | | | "financial_health_signal": { "signal": "bullish", "details": |
| | | | "Current Ratio: 4.44, D/E: 0.41" }, "price_ratios_signal": { |
| | | | "signal": "bearish", "details": "P/E: 47.92, P/B: 44.03, |
| | | | P/S: 26.77" } } |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Technical Analyst | NEUTRAL | 13% | |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Valuation | BEARISH | 75.0% | { "dcf_analysis": { "signal": "bearish", "details": |
| | | | "Intrinsic Value: $1,296,979,592,508.65, Market Cap: |
| | | | $3,492,763,800,000.00, Gap: -62.9%" }, |
| | | | "owner_earnings_analysis": { "signal": "bearish", "details": |
| | | | "Owner Earnings Value: $474,881,341,722.87, Market Cap: |
| | | | $3,492,763,800,000.00, Gap: -86.4%" } } |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Sentiment | BEARISH | 72.0% | Weighted Bullish signals: 63.2, Weighted Bearish signals: |
| | | | 194.3 |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Cathie Wood | NEUTRAL | 65.0% | NVDA demonstrates strong disruptive innovation |
| | | | characteristics with accelerating revenue growth and high |
| | | | R&D investment. It operates in a future-facing sector |
| | | | (technology) and shows a focus on reinvestment, aligning |
| | | | with a growth-oriented approach. However, the current |
| | | | valuation indicates a very large negative margin of safety, |
| | | | raising concerns about overvaluation. While the potential |
| | | | for future breakthroughs is present, the current price |
| | | | doesn't offer an attractive entry point. |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Warren Buffett | BEARISH | 95.0% | NVDA exhibits strong fundamentals with high ROE, |
| | | | conservative debt, and robust operating margins, indicating |
| | | | a potential economic moat and shareholder-friendly |
| | | | management. However, the current market capitalization |
| | | | significantly exceeds its intrinsic value, resulting in a |
| | | | negative margin of safety of -63.67%. This overvaluation |
| | | | outweighs the positive aspects, making it a bearish signal |
| | | | according to Buffett's value investing principles. |
+-------------------+----------+--------------+--------------------------------------------------------------+
TRADING DECISION: [NVDA]
+------------+--------------------------------------------------------------+
| Action | SHORT |
+------------+--------------------------------------------------------------+
| Quantity | 169 |
+------------+--------------------------------------------------------------+
| Confidence | 78.4% |
+------------+--------------------------------------------------------------+
| Reasoning | NVDA presents a mixed but overall bearish signal. While |
| | fundamentals are bullish, valuation, sentiment, and Warren |
| | Buffett agents are bearish. Technical analysis and Cathie |
| | Wood are neutral. Considering the strong bearish signals |
| | from valuation and Buffett, I will open a short position, up |
| | to the maximum allowed shares. |
+------------+--------------------------------------------------------------+
PORTFOLIO SUMMARY:
+----------+----------+------------+--------------+
| Ticker | Action | Quantity | Confidence |
+==========+==========+============+==============+
| AAPL | SHORT | 91 | 71.0% |
+----------+----------+------------+--------------+
| MSFT | HOLD | 0 | 56.0% |
+----------+----------+------------+--------------+
| NVDA | SHORT | 169 | 78.4% |
+----------+----------+------------+--------------+
Portfolio Strategy:
AAPL shows overwhelmingly bearish signals across valuation,
sentiment, Cathie Wood, and Warren Buffett agents. The
technical analyst and fundamentals agents are neutral. Given
the strong bearish signals, I will initiate a short
position, taking into account the maximum allowed shares. |
+===================+==========+==============+==============================================================+
| Fundamentals | BULLISH | 75.0% | { "profitability_signal": { "signal": "bullish", "details": |
| | | | "ROE: 115.40%, Net Margin: 55.80%, Op Margin: 64.58%" }, |
| | | | "growth_signal": { "signal": "bullish", "details": "Revenue |
| | | | Growth: 15.21%, Earnings Growth: 15.55%" }, |
| | | | "financial_health_signal": { "signal": "bullish", "details": |
| | | | "Current Ratio: 4.44, D/E: 0.41" }, "price_ratios_signal": { |
| | | | "signal": "bearish", "details": "P/E: 47.92, P/B: 44.03, |
| | | | P/S: 26.77" } } |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Technical Analyst | NEUTRAL | 13% | |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Valuation | BEARISH | 75.0% | { "dcf_analysis": { "signal": "bearish", "details": |
| | | | "Intrinsic Value: $1,296,979,592,508.65, Market Cap: |
| | | | $3,492,763,800,000.00, Gap: -62.9%" }, |
| | | | "owner_earnings_analysis": { "signal": "bearish", "details": |
| | | | "Owner Earnings Value: $474,881,341,722.87, Market Cap: |
| | | | $3,492,763,800,000.00, Gap: -86.4%" } } |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Sentiment | BEARISH | 72.0% | Weighted Bullish signals: 63.2, Weighted Bearish signals: |
| | | | 194.3 |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Cathie Wood | NEUTRAL | 65.0% | NVDA demonstrates strong disruptive innovation |
| | | | characteristics with accelerating revenue growth and high |
| | | | R&D investment. It operates in a future-facing sector |
| | | | (technology) and shows a focus on reinvestment, aligning |
| | | | with a growth-oriented approach. However, the current |
| | | | valuation indicates a very large negative margin of safety, |
| | | | raising concerns about overvaluation. While the potential |
| | | | for future breakthroughs is present, the current price |
| | | | doesn't offer an attractive entry point. |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Warren Buffett | BEARISH | 95.0% | NVDA exhibits strong fundamentals with high ROE, |
| | | | conservative debt, and robust operating margins, indicating |
| | | | a potential economic moat and shareholder-friendly |
| | | | management. However, the current market capitalization |
| | | | significantly exceeds its intrinsic value, resulting in a |
| | | | negative margin of safety of -63.67%. This overvaluation |
| | | | outweighs the positive aspects, making it a bearish signal |
| | | | according to Buffett's value investing principles. |
+-------------------+----------+--------------+--------------------------------------------------------------+
TRADING DECISION: [NVDA]
+------------+--------------------------------------------------------------+
| Action | SHORT |
+------------+--------------------------------------------------------------+
| Quantity | 169 |
+------------+--------------------------------------------------------------+
| Confidence | 78.4% |
+------------+--------------------------------------------------------------+
| Reasoning | NVDA presents a mixed but overall bearish signal. While |
| | fundamentals are bullish, valuation, sentiment, and Warren |
| | Buffett agents are bearish. Technical analysis and Cathie |
| | Wood are neutral. Considering the strong bearish signals |
| | from valuation and Buffett, I will open a short position, up |
| | to the maximum allowed shares. |
+------------+--------------------------------------------------------------+
PORTFOLIO SUMMARY:
+----------+----------+------------+--------------+
| Ticker | Action | Quantity | Confidence |
+==========+==========+============+==============+
| AAPL | SHORT | 91 | 71.0% |
+----------+----------+------------+--------------+
| MSFT | HOLD | 0 | 56.0% |
+----------+----------+------------+--------------+
| NVDA | SHORT | 169 | 78.4% |
+----------+----------+------------+--------------+
Portfolio Strategy:
AAPL shows overwhelmingly bearish signals across valuation,
sentiment, Cathie Wood, and Warren Buffett agents. The
technical analyst and fundamentals agents are neutral. Given
the strong bearish signals, I will initiate a short
position, taking into account the maximum allowed shares.
注意:报告中的内容并非人人都认同,是赞同还是反对,很大程度上取决于最终的实际投资回报。务必咨询专业投资人士。
附加参数
是的,还有一些参数可用于测试不同的投资策略并验证预测。
--initial-cash
Initial cash position. Defaults to 100000.0)
--margin-requirement
Initial margin requirement. Defaults to 0.
--start-date
Start date (YYYY-MM-DD). Defaults to 3 months before end date
--end-date
End date (YYYY-MM-DD). Defaults to today
--show-reasoning
Show reasoning from each agent
大盘股与小盘股信号的差异
大盘股通常能提供更全面的信息,以及大量的跟踪数据点和信号。相比之下,小盘股可能缺乏足够的可用信息。
让我们以一只小盘股的极端例子来说明:微算法公司(MLGO)
根据雅虎财经((https://ca.finance.yahoo.com/quote/MLGO/).)的信息,这只股票在2025年3月24日上涨了11.47美元,至13.99美元,单日涨幅达455.16%。
Analysis for MLGO
==================================================
AGENT ANALYSIS: [MLGO]
+-------------------+----------+--------------+--------------------------------------------------------------+
| Agent | Signal | Confidence | Reasoning |
+===================+==========+==============+==============================================================+
| Fundamentals | BULLISH | 75.0% | { "profitability_signal": { "signal": "bearish", "details": |
| | | | "ROE: -44.00%, Net Margin: -35.40%, Op Margin: -35.53%" }, |
| | | | "growth_signal": { "signal": "bullish", "details": "Revenue |
| | | | Growth: 4.62%, Earnings Growth: 19.88%" }, |
| | | | "financial_health_signal": { "signal": "bullish", "details": |
| | | | "Current Ratio: 3.55, D/E: 0.40" }, "price_ratios_signal": { |
| | | | "signal": "bullish", "details": "P/E: -2.84, P/B: 1.13, P/S: |
| | | | 1.01" } } |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Technical Analyst | NEUTRAL | 14% | |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Valuation | BEARISH | 169.0% | { "dcf_analysis": { "signal": "bearish", "details": |
| | | | "Intrinsic Value: $-116,136,690.85, Market Cap: |
| | | | $84,170,544.00, Gap: -238.0%" }, "owner_earnings_analysis": |
| | | | { "signal": "bearish", "details": "Owner Earnings Value: |
| | | | $0.00, Market Cap: $84,170,544.00, Gap: -100.0%" } } |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Sentiment | BULLISH | 100.0% | Weighted Bullish signals: 2.1, Weighted Bearish signals: 0.0 |
+-------------------+----------+--------------+--------------------------------------------------------------+
上述生成的报告显示,该股票有2个看涨信号、1个看跌信号和1个中性信号。然而,来自角色智能体的所有信号均为看跌。
+-------------------+----------+--------------+--------------------------------------------------------------+
| Ben Graham | BEARISH | 95.0% | MLGO exhibits significant weaknesses based on Graham's |
| | | | principles: a weak current ratio, high debt ratio, negative |
| | | | earnings in multiple periods, no dividends, and an inability |
| | | | to apply Graham valuation metrics. These factors |
| | | | collectively indicate a high-risk investment. |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Bill Ackman | BEARISH | 85.0% | MLGO exhibits several characteristics that are inconsistent |
| | | | with Pershing Square's investment philosophy. The company's |
| | | | revenue growth is weak, operating margins are below our |
| | | | target of 15%, and the ROE is significantly negative, |
| | | | indicating a lack of a durable competitive advantage. While |
| | | | the balance sheet shows manageable debt, the absence of |
| | | | consistent dividend payments and, most critically, negative |
| | | | free cash flow, renders a traditional valuation impossible. |
| | | | This lack of FCF generation and poor profitability makes |
| | | | MLGO unsuitable for investment. Without a clear path to |
| | | | improved profitability and positive free cash flow, we |
| | | | cannot recommend an investment in MLGO. |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Cathie Wood | BEARISH | 65.0% | MLGO exhibits some positive traits like operating leverage |
| | | | and improving operating margins, suggesting potential for |
| | | | future disruption. However, the lack of positive free cash |
| | | | flow and a negative FCF of -35820.0 makes valuation |
| | | | extremely difficult and concerning. While we seek disruptive |
| | | | innovation, a company must demonstrate a pathway to |
| | | | profitability and sustainable cash generation to justify |
| | | | investment. The absence of FCF outweighs the positive |
| | | | indicators at this stage, leading to a bearish signal. We |
| | | | will re-evaluate as financial performance improves. |
+-------------------+----------+--------------+--------------------------------------------------------------+
| Warren Buffett | BEARISH | 95.0% | MLGO exhibits several characteristics that violate Warren |
| | | | Buffett's investment principles. The company has a negative |
| | | | ROE (-44.0%) and operating margin (-35.5%), indicating poor |
| | | | profitability. The inconsistent earnings growth and negative |
| | | | total earnings growth over the past periods raise concerns |
| | | | about the company's stability and predictability. The |
| | | | intrinsic value is significantly negative, and the margin of |
| | | | safety is also negative, indicating that the company is not |
| | | | undervalued. The lack of consistent ROE and operating margin |
| | | | above 15% suggests the absence of a strong economic moat. |
| | | | While debt levels are conservative, the overall financial |
| | | | performance does not meet Buffett's criteria for a quality |
| | | | investment. |
+-------------------+----------+--------------+--------------------------------------------------------------+
因此,最终的交易决策是“持有”。
TRADING DECISION: [MLGO]
+------------+--------------------------------------------------------------+
| Action | HOLD |
+------------+--------------------------------------------------------------+
| Quantity | 0 |
+------------+--------------------------------------------------------------+
| Confidence | 50.0% |
+------------+--------------------------------------------------------------+
| Reasoning | Mixed signals for MLGO. Valuation, Ben Graham, Bill Ackman, |
| | Cathie Wood and Warren Buffett are bearish while |
| | fundamentals and sentiment are bullish. Technicals are |
| | neutral. Given the mixed signals, holding off on any action. |
+------------+--------------------------------------------------------------+
PORTFOLIO SUMMARY:
+----------+----------+------------+--------------+
| Ticker | Action | Quantity | Confidence |
+==========+==========+============+==============+
| MLGO | HOLD | 0 | 50.0% |
+----------+----------+------------+--------------+
Portfolio Strategy:
Mixed signals for MLGO. Valuation, Ben Graham, Bill Ackman,
Cathie Wood and Warren Buffett are bearish while
fundamentals and sentiment are bullish. Technicals are
neutral. Given the mixed signals, holding off on any action.
所以今日股票走势带来的利润率为455%。请注意,投资有风险,过往历史不一定会重演。
幕后
动态工作流程图
在我们选定人物智能体(凯西·伍德)和大语言模型供应商后,人工智能对冲基金工作流程会自动生成一个用于分析执行的树形图。以下是单个智能体的简单树形图示例。
图6;由凯西·伍德智能体运行的人工智能动力对冲基金
所以如果我们对人员类型智能体和技术智能体进行多项选择,图执行树就会展开。
图7;由多个智能体运行的人工智能动力对冲基金
个性化风格投资分析
投资分析方法是根据个人风格、投资原则以及用于评估而计算和收集的具体指标来确定的。
例如智能体:凯西·伍德遵循这些投资原则
Analyzes stocks using Cathie Wood's investing principles and LLM reasoning.
1. Seek companies leveraging disruptive innovation
2. Emphasize exponential growth potential, large TAM.
3. Focus on technology, healthcare, or other future-facing sectors.
4. Consider multi-year time horizons for potential breakthroughs
5. Accept higher volatility in pursuit of high returns
6. Evaluate management's vision and ability to invest in R&D.
Rules:
- Identify disruptive or breakthrough technology
- Evaluate strong potential for multi-year revenue growth.
- Check if the company can scale effectively in a large market
- Use a growth-biased valuation approach
- Provide a data-driven recommendation (bullish, bearish, or neutral)
那么,遵循这些准则的凯西·伍德智能体:
Analyzes stocks using Cathie Wood's investing principles and LLM reasoning.
1. Prioritizes companies with breakthrough technologies or business models
2. Focuses on industries with rapid adoption curves and massive TAM (Total Addressable Market).
3. Invests mostly in AI, robotics, genomic sequencing, fintech, and blockchain.
4. Willing to endure short-term volatility for long-term gains.
并使用以下这些函数收集和计算技术指标:
Cathy Wood agent actions:
.get the market cap()
.analyze disruptive potentials()
.analyze innovation growth()
.analyze market valuation()
接下来,让我们看看沃伦·巴菲特智能体及其投资风格。
沃伦·巴菲特智能体严格遵循以下投资原则:
Decide on investment signals based on Warren Buffett's principles:
> Circle of Competence: Only invest in businesses you understand
> Margin of Safety (> 30%): Buy at a significant discount to intrinsic value
> Economic Moat: Look for durable competitive advantages
> Quality Management: Seek conservative, shareholder-oriented teams
> Financial Strength: Favor low debt, strong returns on equity
> Long-term Horizon: Invest in businesses, not just stocks
> Sell only if fundamentals deteriorate or valuation far exceeds intrinsic value
然后沃伦·巴菲特智能体会研究这些具体的计算和指标。
Warren Buffet Agent actions:
.analyze_fundamentals()
.analyze_consistency()
.analyze_moat()
.analyze_management_quality()
.calculate_owner_earnings()
.calculate_owner_earnings()
在这一点上,我们不再关注单个指标和特定信号,因为要全面阐述这些内容需要更多材料,或许可以在另一篇文章中探讨。
大语言模型生成决策
在收集完决策所需的所有必要数据后,智能体首先构建一个系统提示和一个用户提示,并将相关财务数据纳入其中。
系统提示
"""You are a Cathie Wood AI agent, making investment decisions using her principles:\n\n"
"1. Seek companies leveraging disruptive innovation.\n"
"2. Emphasize exponential growth potential, large TAM.\n"
"3. Focus on technology, healthcare, or other future-facing sectors.\n"
"4. Consider multi-year time horizons for potential breakthroughs.\n"
"5. Accept higher volatility in pursuit of high returns.\n"
"6. Evaluate management's vision and ability to invest in R&D.\n\n"
"Rules:\n"
"- Identify disruptive or breakthrough technology.\n"
"- Evaluate strong potential for multi-year revenue growth.\n"
"- Check if the company can scale effectively in a large market.\n"
"- Use a growth-biased valuation approach.\n"
"- Provide a data-driven recommendation (bullish, bearish, or neutral)."""
用户提示
"""Based on the following analysis, create a Cathie Wood-style investment signal.\n\n"
"Analysis Data for {ticker}:\n"
"{analysis_data}\n\n"
"Return the trading signal in this JSON format:\n"
"{{\n \"signal\": \"bullish/bearish/neutral\",\n \"confidence\": float (0-100),\n \"reasoning\": \"string\"\n}}"""
在用户提示中,还包含了每张股票的财务数据。
最终想法
为人工智能对冲基金项目团队点赞!这是一项出色的基础工作,展示了智能体人工智能在实际应用中的作用,即如何通过大规模自动化加速复杂任务,同时提高准确性。
生成式人工智能智能体的另一个有用之处在于,它能够通过运行模拟来从经济角度评估各种经济情景的结果和行业表现。
通过添加诸如仪表盘、跨多种大语言模型(LLMs)的评估以及交互式报告等功能,可以提升当前项目的能力。
此外,一般来说,大语言模型(LLM)生成的最终决策信号,在经过数学和推理方面强化训练的模型上表现会更好。分享一下你对如何加强这种智能代理人工智能解决方案的想法?
实际交易时,务必向投资专家咨询。
再次感谢您抽出时间阅读本文!
祝你有美好的一天!
蒙特卡洛(这里“MC”可能是“Monte Carlo”的缩写,具体含义需结合更多背景信息确定,常见含义为蒙特卡洛,一种在金融等领域常用的模拟方法)