US Stock Analysis
Overview
Perform comprehensive analysis of US stocks covering fundamental analysis (financials, business quality, valuation), technical analysis (indicators, trends, patterns), peer comparisons, and generate detailed investment reports. Fetch real-time market data via Tavily API (preferred) or Brave Search (fallback), and apply structured analytical frameworks.
Data Sources
Preferred: Tavily Search (if TAVILY_API_KEY available)
CODEBLOCK0
Tavily advantages for stock analysis:
- - Cleaner financial data snippets
- Better news clustering for recent developments
- INLINECODE1 for time-sensitive market data
- INLINECODE2 for comprehensive fundamental research
Fallback: Brave WebSearch (via web_search tool)
Always use web search tools to gather current market data:
Primary Data to Fetch:
- 1. Current stock price and trading data (price, volume, 52-week range)
- Financial statements (income statement, balance sheet, cash flow)
- Key metrics (P/E, EPS, revenue, margins, debt ratios)
- Analyst ratings and price targets
- Recent news and developments
- Peer/competitor data (for comparisons)
- Technical data (moving averages, RSI, MACD when available)
Search Strategy:
- - Use ticker symbol + specific data needed (e.g., "AAPL financial metrics 2024")
- For comprehensive data: Search for earnings reports, investor presentations, or SEC filings
- For technical data: Search for "AAPL technical analysis" or use financial data sites
- Always verify data recency (prefer data from last quarter)
Quality Sources:
- - Yahoo Finance, Google Finance, MarketWatch, Seeking Alpha, Bloomberg, CNBC
- Company investor relations pages
- SEC filings (10-K, 10-Q) for detailed financials
- TradingView, StockCharts for technical data
Analysis Types
This skill supports four types of analysis. Determine which type(s) the user needs:
- 1. Basic Stock Info - Quick overview with key metrics
- Fundamental Analysis - Deep dive into business, financials, valuation
- Technical Analysis - Chart patterns, indicators, trend analysis
- Comprehensive Report - Complete analysis combining all approaches
Analysis Workflows
1. Basic Stock Information
When to Use: User asks for quick overview or basic info
Steps:
- 1. Search for current stock data (price, volume, market cap)
- Gather key metrics (P/E, EPS, revenue growth, margins)
- Get 52-week range and year-to-date performance
- Find recent news or major developments
- Present in concise summary format
Output Format:
- - Company description (1-2 sentences)
- Current price and trading metrics
- Key valuation metrics (table)
- Recent performance
- Notable recent news (if any)
2. Fundamental Analysis
When to Use: User wants financial analysis, valuation assessment, or business evaluation
Steps:
- 1. Gather comprehensive financial data:
- Revenue, earnings, cash flow (3-5 year trends)
- Balance sheet metrics (debt, cash, working capital)
- Profitability metrics (margins, ROE, ROIC)
- 2. Read references/fundamental-analysis.md for analytical framework
- 3. Read references/financial-metrics.md for metric definitions and calculations
- 4. Analyze business quality:
- Competitive advantages
- Management track record
- Industry position
- 5. Perform valuation analysis:
- Calculate key ratios (P/E, PEG, P/B, EV/EBITDA)
- Compare to historical averages
- Compare to peer group
- Estimate fair value range
- 6. Identify risks:
- Company-specific risks
- Market/macro risks
- Red flags from financial data
- 7. Generate output following references/report-template.md structure
Critical Analyses:
- - Profitability trends (improving/declining margins)
- Cash flow quality (FCF vs earnings)
- Balance sheet strength (debt levels, liquidity)
- Growth sustainability
- Valuation vs peers and historical average
3. Technical Analysis
When to Use: User asks for technical analysis, chart patterns, or trading signals
Steps:
- 1. Gather technical data:
- Current price and recent price action
- Volume trends
- Moving averages (20-day, 50-day, 200-day)
- Technical indicators (RSI, MACD, Bollinger Bands)
- 2. Read references/technical-analysis.md for indicator definitions and patterns
- 3. Identify trend:
- Uptrend, downtrend, or sideways
- Strength of trend
- 4. Locate support and resistance levels:
- Recent highs and lows
- Moving average levels
- Round numbers
- 5. Analyze indicators:
- RSI: Overbought (>70) or oversold (<30)
- MACD: Crossovers and divergences
- Volume: Confirmation or divergence
- Bollinger Bands: Squeeze or expansion
- 6. Identify chart patterns:
- Reversal patterns (head and shoulders, double top/bottom)
- Continuation patterns (flags, triangles)
- 7. Generate technical outlook:
- Current trend assessment
- Key levels to watch
- Risk/reward analysis
- Short and medium-term outlook
Interpretation Guidelines:
- - Confirm signals with multiple indicators
- Consider volume for validation
- Note divergences between price and indicators
- Always identify risk levels (stop-loss)
4. Comprehensive Investment Report
When to Use: User asks for detailed report, investment recommendation, or complete analysis
Steps:
- 1. Perform data gathering (as in Basic Info)
- 2. Execute fundamental analysis (follow workflow above)
- 3. Execute technical analysis (follow workflow above)
- 4. Read references/report-template.md for complete report structure
- 5. Synthesize findings:
- Integrate fundamental and technical insights
- Develop bull and bear cases
- Assess risk/reward
- 6. Generate recommendation:
- Buy/Hold/Sell rating
- Target price with timeframe
- Conviction level
- Entry strategy
- 7. Create formatted report following template structure
Report Must Include:
- - Executive summary with recommendation
- Company overview
- Investment thesis (bull and bear cases)
- Fundamental analysis section
- Technical analysis section
- Valuation analysis
- Risk assessment
- Catalysts and timeline
- Conclusion
Stock Comparison Analysis
When to Use: User asks to compare two or more stocks (e.g., "compare AAPL vs MSFT")
Steps:
- 1. Gather data for all stocks:
- Follow data gathering steps for each ticker
- Ensure comparable timeframes
- 2. Read references/fundamental-analysis.md and references/financial-metrics.md
- 3. Create side-by-side comparison:
- Business models comparison
- Financial metrics table (all key ratios)
- Valuation metrics table
- Growth rates comparison
- Profitability comparison
- Balance sheet strength
- 4. Identify relative strengths:
- Where each company excels
- Quantified advantages
- 5. Technical comparison:
- Relative strength
- Momentum comparison
- Which is in better technical position
- 6. Generate recommendation:
- Which stock is more attractive and why
- Consider both fundamental and technical factors
- Portfolio allocation suggestion
- Risk-adjusted return assessment
Output Format: Follow "Comparison Report Structure" in references/report-template.md
Output Guidelines
General Principles:
- - Use tables for financial data and comparisons (easy to scan)
- Bold key metrics and findings
- Include data sources and dates
- Quantify whenever possible
- Present both bull and bear perspectives
- Be clear about assumptions and uncertainties
Formatting:
- - Headers for clear section separation
- Tables for metrics, comparisons, historical data
- Bullet points for lists, factors, risks
- Bold text for key findings, important metrics
- Percentages for growth rates, returns, margins
- Currency formatted consistently ($B for billions, $M for millions)
Tone:
- - Objective and balanced
- Acknowledge uncertainty
- Support claims with data
- Avoid hyperbole
- Present risks clearly
Reference Files
Load these references as needed during analysis:
references/technical-analysis.md
- - When: Performing technical analysis or interpreting indicators
- Contains: Indicator definitions, chart patterns, support/resistance concepts, analysis workflow
references/fundamental-analysis.md
- - When: Performing fundamental analysis or business evaluation
- Contains: Business quality assessment, financial health analysis, valuation frameworks, risk assessment, red flags
references/financial-metrics.md
- - When: Need definitions or calculation methods for financial ratios
- Contains: All key metrics with formulas (profitability, valuation, growth, liquidity, leverage, efficiency, cash flow)
references/report-template.md
- - When: Creating comprehensive report or comparison
- Contains: Complete report structure, formatting guidelines, section templates, comparison format
Example Queries
Basic Info:
- - "What's the current price of AAPL?"
- "Give me key metrics for Tesla"
- "Quick overview of Microsoft stock"
Fundamental:
- - "Analyze NVDA's financials"
- "Is Amazon overvalued?"
- "Evaluate Apple's business quality"
- "What's Google's debt situation?"
Technical:
- - "Technical analysis of TSLA"
- "Is Netflix oversold?"
- "Show me support levels for AAPL"
- "What's the trend for AMD?"
Comprehensive:
- - "Complete analysis of Microsoft"
- "Give me a full report on AAPL"
- "Should I invest in Tesla? Give me detailed analysis"
Comparison:
- - "Compare AAPL vs MSFT"
- "Tesla vs Nvidia - which is better?"
- "Analyze Meta vs Google"
美股分析
概述
对美股进行全面分析,涵盖基本面分析(财务状况、业务质量、估值)、技术分析(指标、趋势、形态)、同行业比较,并生成详细投资报告。通过 Tavily API(首选) 或 Brave Search(备用)获取实时市场数据,并应用结构化分析框架。
数据来源
首选:Tavily Search(如果 TAVILYAPIKEY 可用)
bash
cd ~/.openclaw/workspace/skills/tavily-search-litiao
股价和指标
node scripts/search.mjs AAPL stock price market cap P/E ratio -n 10
财务报表
node scripts/search.mjs AAPL income statement balance sheet cash flow 2024 -n 10
分析师评级
node scripts/search.mjs AAPL analyst ratings price target --topic news --days 7 -n 10
近期新闻
node scripts/search.mjs AAPL Apple Inc news --topic news --days 14 -n 15
技术分析
node scripts/search.mjs AAPL technical analysis RSI MACD moving averages -n 10
同行业比较
node scripts/search.mjs MSFT GOOGL META stock comparison tech giants -n 10
Tavily 在股票分析中的优势:
- - 更清晰的财务数据摘要
- 更好的近期动态新闻聚类
- --topic news 用于时效性强的市场数据
- --deep 用于全面的基本面研究
备用:Brave WebSearch(通过 web_search 工具)
始终使用网络搜索工具收集当前市场数据:
需获取的主要数据:
- 1. 当前股价和交易数据(价格、成交量、52周范围)
- 财务报表(利润表、资产负债表、现金流量表)
- 关键指标(市盈率、每股收益、营收、利润率、负债比率)
- 分析师评级和目标价
- 近期新闻和动态
- 同行业/竞争对手数据(用于比较)
- 技术数据(移动平均线、RSI、MACD,如可用)
搜索策略:
- - 使用股票代码 + 所需具体数据(例如:AAPL financial metrics 2024)
- 获取全面数据:搜索财报、投资者演示或SEC文件
- 获取技术数据:搜索AAPL technical analysis或使用金融数据网站
- 始终验证数据的时效性(优先使用最近季度的数据)
高质量来源:
- - Yahoo Finance、Google Finance、MarketWatch、Seeking Alpha、Bloomberg、CNBC
- 公司投资者关系页面
- SEC文件(10-K、10-Q)获取详细财务数据
- TradingView、StockCharts获取技术数据
分析类型
本技能支持四种分析类型。确定用户需要哪种类型:
- 1. 基本股票信息 - 包含关键指标的快速概览
- 基本面分析 - 深入分析业务、财务状况、估值
- 技术分析 - 图表形态、指标、趋势分析
- 综合报告 - 结合所有方法的完整分析
分析工作流程
1. 基本股票信息
使用时机: 用户询问快速概览或基本信息
步骤:
- 1. 搜索当前股票数据(价格、成交量、市值)
- 收集关键指标(市盈率、每股收益、营收增长、利润率)
- 获取52周范围和年初至今表现
- 查找近期新闻或重大动态
- 以简洁摘要格式呈现
输出格式:
- - 公司描述(1-2句话)
- 当前价格和交易指标
- 关键估值指标(表格)
- 近期表现
- 值得注意的近期新闻(如有)
2. 基本面分析
使用时机: 用户需要财务分析、估值评估或业务评估
步骤:
- 1. 收集全面的财务数据:
- 营收、盈利、现金流(3-5年趋势)
- 资产负债表指标(负债、现金、营运资本)
- 盈利能力指标(利润率、ROE、ROIC)
- 2. 阅读 references/fundamental-analysis.md 获取分析框架
- 3. 阅读 references/financial-metrics.md 获取指标定义和计算方法
- 4. 分析业务质量:
- 竞争优势
- 管理层业绩记录
- 行业地位
- 5. 进行估值分析:
- 计算关键比率(市盈率、PEG、市净率、EV/EBITDA)
- 与历史平均值比较
- 与同行业比较
- 估算公允价值范围
- 6. 识别风险:
- 公司特定风险
- 市场/宏观风险
- 财务数据中的警示信号
- 7. 生成输出 遵循 references/report-template.md 结构
关键分析:
- - 盈利能力趋势(利润率改善/下降)
- 现金流质量(自由现金流 vs 盈利)
- 资产负债表实力(负债水平、流动性)
- 增长可持续性
- 估值 vs 同行业和历史平均值
3. 技术分析
使用时机: 用户询问技术分析、图表形态或交易信号
步骤:
- 1. 收集技术数据:
- 当前价格和近期价格走势
- 成交量趋势
- 移动平均线(20日、50日、200日)
- 技术指标(RSI、MACD、布林带)
- 2. 阅读 references/technical-analysis.md 获取指标定义和形态
- 3. 识别趋势:
- 上升趋势、下降趋势或横盘整理
- 趋势强度
- 4. 定位支撑位和阻力位:
- 近期高点和低点
- 移动平均线水平
- 整数关口
- 5. 分析指标:
- RSI:超买(>70)或超卖(<30)
- MACD:交叉和背离
- 成交量:确认或背离
- 布林带:收缩或扩张
- 6. 识别图表形态:
- 反转形态(头肩顶、双顶/双底)
- 持续形态(旗形、三角形)
- 7. 生成技术展望:
- 当前趋势评估
- 需关注的关键水平
- 风险/回报分析
- 短期和中期展望
解读指南:
- - 用多个指标确认信号
- 考虑成交量进行验证
- 注意价格与指标之间的背离
- 始终识别风险水平(止损位)
4. 综合投资报告
使用时机: 用户要求详细报告、投资建议或完整分析
步骤:
- 1. 执行数据收集(如基本信息部分)
- 2. 执行基本面分析(遵循上述工作流程)
- 3. 执行技术分析(遵循上述工作流程)
- 4. 阅读 references/report-template.md 获取完整报告结构
- 5. 综合发现:
- 整合基本面和技术面见解
- 构建看涨和看跌情景
- 评估风险/回报
- 6. 生成建议:
- 买入/持有/卖出评级
- 目标价及时间框架
- 信心水平
- 入场策略
- 7. 创建格式化报告 遵循模板结构
报告必须包含:
- - 执行摘要及建议
- 公司概述
- 投资论点(看涨和看跌情景)
- 基本面分析部分
- 技术分析部分
- 估值分析
- 风险评估
- 催化剂和时间线
- 结论
股票比较分析
使用时机: 用户要求比较两只或多只股票(例如:比较AAPL和MSFT)
步骤:
- 1. 收集所有股票的数据:
- 对每只股票执行数据收集步骤
- 确保可比的时间框架
- 2. 阅读 references/fundamental-analysis.md 和 references/financial-metrics.md
- 3. 创建并排比较:
- 商业模式比较
- 财务指标表格(所有关键比率)
- 估值指标表格
- 增长率比较
- 盈利能力比较
- 资产负债表实力
- 4. 识别相对优势:
- 每家公司擅长的领域
- 量化优势
- 5. 技术比较:
- 相对强弱
- 动量比较
- 哪只股票技术面更优
- 6. 生成建议:
- 哪只股票更具吸引力及原因
- 考虑基本面和技述因素
- 投资组合配置建议
- 风险调整后回报评估
输出格式: 遵循 references/report-template.md 中的比较报告结构
输出指南
一般原则:
- - 使用表格呈现财务数据和比较(易于浏览)
- 加粗关键指标和发现
- 包含数据来源和日期
- 尽可能量化
- 同时呈现看