analyze-stock

Original🇨🇳 Chinese
Translated
1 scriptsChecked / no sensitive code detected

One-click comprehensive analysis of a stock/company. Collect data from five dimensions - stock price, news sentiment, industry comparison, market environment, and official company website - simultaneously through parallel sub-agents, then conduct cross-analysis, causal attribution, and trend prediction in the main thread, and output a standardized analysis report. Trigger words: Analyze XX stock, analyze TICKER, How is XX, Is XX worth buying? Supports A-shares and U.S. stocks.

8installs
Added on

NPX Install

npx skill4agent add jssfy/k-skills analyze-stock

SKILL.md Content (Chinese)

View Translation Comparison →

Analyze Stock — One-Click Comprehensive Stock Analysis

Enter the company name or stock ticker, and data from five dimensions will be automatically collected in parallel. A standard report will be output after comprehensive analysis.

When to Use

Triggered when the user requests the following operations:
  • "Analyze Tencent" / "Analyze Kweichow Moutai" / "Analyze 600519"
  • "analyze NVDA" / "analyze Tesla"
  • "How is XX stock performing?" / "Why has XX risen/fallen recently?"
  • "Help me check XX" / "Is XX worth buying?"

Phase 0: Parse Input

Identify the following information based on user input:
  1. Company Name and Stock Ticker
    • Use the ticker directly if provided by the user
    • If the user provides a company name, query the corresponding ticker via WebSearch
    • A-share ticker format: 6-digit number (600519, 000858)
    • U.S. stock ticker format: English letters (NVDA, AAPL, TSLA)
  2. Identify Market Type
    • 6-digit pure number → A-shares
    • English letters → U.S. stocks
    • Chinese company name with Chinese characters → A-shares
    • Others → U.S. stocks
  3. Determine Key Variables (Required by all subsequent Agents)
    • {ticker}
      : Stock ticker
    • {company_name}
      : Full company name
    • {company_name_en}
      : English company name (for U.S. stocks)
    • {market}
      : "A-shares" or "U.S. stocks"
    • {industry}
      : Belonging industry
    • {website}
      : Official company website URL
If the official website or industry cannot be determined, perform a quick WebSearch first, do not skip this step.

Phase 1: Parallel Data Collection (5 Subagents)

Key Requirement: The following 5 Tasks must be sent in the same message to ensure parallel execution.
Each Agent uses
subagent_type: "general-purpose"
.

Agent 1: Stock Price Data and Technical Indicators

description: "Collect {ticker} stock price data"
Prompt Template:
You are a stock price data analyst. Please obtain the stock price data of {company_name}({ticker}) for the last 7 trading days.

Tasks:
1. Use WebSearch to search "{ticker} stock price last 7 days {market}" to get the latest market data
2. Organize the following information:
   - Daily closing prices and price changes for the last 7 trading days
   - Cumulative price change over 7 days
   - Current price
   - Trading volume trend (increasing/decreasing/flat)
   - Key technical signals (if any: moving average bullish/bearish arrangement, RSI overbought/oversold, obvious support/resistance levels)
   - Comparison with the market's price change during the same period

Output Requirements:
- Return in a structured format
- Highlight: 7-day price change, volume-price coordination, key technical signals
- Keep within 500 words
- Do not provide investment advice
If it's A-shares and akshare is installed, you can additionally add the following instruction to the prompt:
If available, execute the following command to obtain accurate data:
python {baseDir}/scripts/data_fetcher.py --code {ticker} --data-type valuation

Agent 2: News Sentiment Analysis

description: "Search recent news about {company_name}"
Prompt Template:
You are a financial news analyst. Please search for important news and public opinion about {company_name}({ticker}) in the last 7 days.

Tasks:
1. Use WebSearch to search the following keywords (at least 2 different keyword combinations):
   - "{company_name} latest news" or "{company_name} latest news"
   - "{ticker} stock this week" or "{ticker} stock this week"
2. Select 3-5 most important news items from the search results
3. Use WebFetch to access at least 2 of the original news articles to verify content authenticity
4. Analyze the overall sentiment of public opinion

Output Requirements:
- List 3-5 key news items, each including: date, title, source, brief content (1-2 sentences)
- Overall sentiment judgment: Positive / Negative / Neutral, with reasons
- Identify whether there are major events (earnings release, policy changes, management changes, product launches, lawsuits, etc.)
- Keep within 600 words

Agent 3: Industry Comparison Analysis

description: "Analyze the {industry} industry situation"
Prompt Template:
You are an industry analyst. Please analyze the recent situation of the {industry} industry where {company_name}({ticker}) operates.

Tasks:
1. Use WebSearch to search:
   - "{industry} industry recent trends" or "{industry} industry trends"
   - "{company_name} competitors" or "{company_name} competitors"
2. Organize the following information:
   - Recent overall industry trend (rising/falling/stable)
   - Key factors affecting the industry (policies, technology, demand, etc.)
   - Recent stock price performance of 2-3 main competitors
   - General position of {company_name} in the industry

Output Requirements:
- Industry trend overview (2-3 sentences)
- Competitive landscape summary table: Company name, 7-day price change, key developments
- Relative strengths and weaknesses of the company (1-2 points)
- Keep within 500 words

Agent 4: Market Environment Analysis

description: "Analyze the current market environment"
Prompt Template:
You are a macro market analyst. Please analyze the current global market environment, focusing on market factors related to {company_name}({ticker}).

Tasks:
1. Use WebSearch to search the latest market data:
   - Recent trends of major indices: {If A-shares: "Shanghai Composite Index, Shenzhen Component Index, ChiNext Index this week"; If U.S. stocks: "S&P 500 NASDAQ Dow Jones this week"}
   - "VIX index today" (Volatility Index)
   - Recent major macro events or central bank dynamics
2. Evaluate:
   - Market trend direction: Rising / Falling / Volatile
   - Market sentiment: Risk-on (risk-seeking) / Risk-off (risk-averse)
   - VIX level and its implication
   - Whether there are major macro events impacting the market

Output Requirements:
- One-sentence summary of the market environment
- 7-day performance of major indices (price change)
- VIX level and volatility judgment
- 1-2 key factors affecting the current market
- Keep within 400 words

Agent 5: Official Website and Announcement Information

description: "Crawl {company_name} official website information"
Prompt Template:
You are a corporate information researcher. Please obtain the latest official updates of {company_name}({ticker}).

Tasks:
1. Use WebFetch to access the company's official website: {website}
   - Check if there are latest announcements or news on the homepage
2. Use WebSearch to search "{company_name} investor relations" or "{company_name} investor relations"
   - Look for recent announcements, earnings summaries, performance forecasts
3. If it's a listed company, search for recent announcements:
   - A-shares: "{company_name} announcement Juchao Information"
   - U.S. stocks: "{company_name} SEC filing" or "{company_name} earnings"

Output Requirements:
- Latest official company developments (products, strategies, personnel, etc.)
- Key data from the latest earnings report/performance (if available)
- Summary of recent important announcements (if any)
- Keep within 400 words
- If the official website is inaccessible, state the situation and rely on search results

Phase 2: Comprehensive Analysis (Main Thread)

Wait for all 5 Agents to return results, then complete the following analysis in the main thread.

Step 1: Information Summary

Integrate the results of the 5 Agents to identify:
  • Consistent signals between dimensions (e.g., rising stock price + positive news + upward industry trend = strong bullish signal)
  • Contradictory signals between dimensions (e.g., rising stock price but negative news = potential risks may exist)

Step 2: Causal Attribution

Analyze the reasons for stock price changes in the last 7 days, sorted by influence:
  1. Direct driving factors: Company-level events (earnings, announcements, products, public opinion)
  2. Industry transmission factors: Industry policies, changes in competitive landscape
  3. Market environment factors: Market trend, capital flow, macro events

Step 3: Trend Prediction

Based on the above analysis, provide:
  • Short-term outlook (1-2 weeks): Consider technical signals + upcoming events
  • Medium-term outlook (1-3 months): Consider fundamentals + industry trends
  • Main risk points: Factors that may lead to trend reversal

Phase 3: Output Report

Output the final report in the following format:
markdown
# {company_name} ({ticker}) Comprehensive Analysis Report

> Analysis Date: {date} | Analysis Period: Last 7 Trading Days | Market: {market}

## One-Sentence Summary

{Summarize the current situation and core judgment in one sentence}

---

## I. Stock Price Overview

| Indicator | Value |
|------|------|
| Current Price | ¥/$XXX |
| 7-Day Price Change | +/-X.XX% |
| Corresponding Market | +/-X.XX% |
| Trading Volume Trend | Increasing/Decreasing/Flat |
| Technical Signals | XXX |

## II. Analysis of Stock Price Change Reasons

### Direct Driving Factors
1. ...

### Industry Transmission Factors
1. ...

### Market Environment Factors
1. ...

## III. Recent Important News

| Date | Event | Impact |
|------|------|------|
| ... | ... | Positive/Negative/Neutral |

Sentiment Tendency: **Positive/Negative/Neutral**

## IV. Industry Comparison

| Company | 7-Day Price Change | Key Developments |
|------|---------|---------|
| {company_name} | ... | ... |
| Competitor A | ... | ... |
| Competitor B | ... | ... |

## V. Market Environment

- Market Trend: ...
- Market Sentiment: Risk-on / Risk-off
- VIX: XX (Low/Normal/High/Extremely High Volatility)
- Key Macro Factors: ...

## VI. Trend Outlook

### Short-Term (1-2 Weeks)
- ...

### Medium-Term (1-3 Months)
- ...

### Main Risks
1. ...
2. ...

---

> Disclaimer: This report is automatically generated by AI, for reference only, and does not constitute any investment advice. Investment involves risks, and decisions should be made cautiously.
Also save the report as a file:
{company_name}-analysis-{date}.md
in the current working directory.

Error Handling

  • Agent timeout or failure: If an Agent fails to return results, mark the dimension as "Data Missing" in the report, and analyze the remaining dimensions as usual
  • Unrecognizable stock ticker: Prompt the user to confirm the ticker or company name
  • akshare not installed (A-shares): Degrade to using only WebSearch to obtain data
  • Official website inaccessible: Skip crawling the official website and rely on search engine results

Notes

  • Strictly limit the output word count of each Agent to prevent main thread context overflow
  • The comprehensive analysis phase focuses on cross-correlation, not simple listing
  • Causal analysis should distinguish between "correlation" and "causality"
  • Trend predictions must clearly indicate uncertainty