Stock Analyzer - Global Comprehensive Stock Analysis Tool
Overview
This skill is used for comprehensive analysis of
A-shares, Hong Kong stocks, US stocks and all markets supported by Eastmoney (futures, indices, ETFs, etc.). It searches for stocks by simulating the search box function on the Eastmoney homepage (
https://www.eastmoney.com/default.html), conducts analysis from three dimensions: fundamentals, news, and capital flows, and finally provides investment suggestions.
Supported Markets
| Market | Code Prefix | Example |
|---|
| 🇨🇳 A-shares - Shanghai | sh / starting with 6 | sh600519 Kweichow Moutai |
| 🇨🇳 A-shares - Shenzhen | sz / starting with 0, 3 | sz300750 CATL |
| 🇨🇳 A-shares - Beijing Stock Exchange | bj / starting with 8, 4 | bj830799 |
| 🇭🇰 Hong Kong Stocks | hk / 116. | 00700 Tencent Holdings |
| 🇺🇸 US Stocks - Nasdaq | 105. | 105.AAPL Apple |
| 🇺🇸 US Stocks - NYSE | 106. | 106.BABA Alibaba |
| 🇺🇸 US Stocks - Others | 107. | 107.XXX |
Output Methods:
- Output the complete analysis report in the conversation (Markdown format)
- Generate a visual HTML web report simultaneously and save it to the user's working directory
Trigger Conditions
This skill should be used in the following situations:
- Users request analysis of a certain stock (regardless of A-shares, Hong Kong stocks, US stocks)
- Users ask whether a certain stock is worth investing in
- Users want to know the buy/sell prices of a stock
- Users mention stock research, stock analysis
- A-share Keywords: A-share analysis, Shanghai-Shenzhen stocks, ChiNext, STAR Market, Beijing Stock Exchange
- Hong Kong Stock Keywords: Hong Kong stock analysis, Hang Seng Index, Tencent, Meituan, Xiaomi, BYD Company
- US Stock Keywords: US stock analysis, Nasdaq, S&P 500, Dow Jones, Chinese concept stocks, Apple AAPL, Tesla TSLA, NVIDIA NVDA, Micron MU, Google GOOGL, Microsoft MSFT, Amazon AMZN, Meta, Alibaba BABA, Pinduoduo PDD, JD.com JD
- Users mention Eastmoney and involve stock inquiries
- Users directly enter stock codes (e.g.: MU, AAPL, 00700, 600519)
Step 0: Eastmoney Login Guide (Important!)
Why Login is Required?
Eastmoney has access restrictions for unlogged users, which may lead to:
- Incomplete search results
- Inaccessible partial data pages
- Request restrictions or empty data returns
Login Guide Process
Before starting the analysis, you must guide the user to log in to Eastmoney:
Guide Script Template:
📊 **Stock Analysis Preparation**
To obtain complete and accurate stock data, it is recommended that you log in to your Eastmoney account first.
**Please follow these steps:**
1. 🌐 Click to open the Eastmoney homepage: https://www.eastmoney.com/default.html
2. 🔐 Click the [Login] button in the upper right corner of the page
3. ✅ Log in using any of the following methods:
- Mobile phone number + verification code
- Account and password login
- WeChat/QQ QR code login
4. 📢 After successful login, please reply "Logged in" or "Continue analysis"
**Tips**:
- If you don't have an account, you can register one quickly (free of charge)
- Data acquisition is more stable and analysis results are more accurate after login
- If you choose not to log in, some data may be incomplete
---
Have you logged in to Eastmoney?
User Response Handling:
| User Response | Handling Method |
|---|
| "Logged in" / "Already logged in" / "Continue" | Proceed with subsequent analysis steps |
| "Not logged in" / "Don't want to log in" / "Skip" | Prompt that data may be incomplete, continue analysis but mark that data may be restricted |
| No clear response | Ask again or proceed with analysis by default |
Login Status Marking
Mark the data acquisition status in the final report:
- ✅ Logged in: High data completeness
- ⚠️ Not logged in: Some data may be restricted
⏱️ Request Delay Strategy (Important!)
Why Delay is Required?
Eastmoney has rate-limiting protection for high-frequency requests. Continuous rapid requests may lead to:
- Temporary IP ban
- Empty data returns or error pages
- CAPTCHA interception
Delay Rules
⚠️ Must be followed: After each request to an Eastmoney page, must wait 1 second before initiating the next request!
Implementation Method:
Request 1 → Wait 1 second → Request 2 → Wait 1 second → Request 3 → ...
Applicable Scenarios:
- When using to access any Eastmoney page
- Including: search pages, market pages, capital flow pages, F10 pages, announcement pages, news pages, etc.
Scenarios That Don't Require Delay:
- Using the tool (this is a search engine, not direct access to Eastmoney)
Implementation Key Points
- Serial Requests: Do not initiate multiple Eastmoney page requests in parallel
- 1-second Interval: Wait at least 1 second after each of an Eastmoney URL
- Retry on Failure: If a request fails, wait 2 seconds and retry once
Analysis Process
Step 1: Simulate Stock Search in Eastmoney Homepage Search Box
Core Principle: Simulate users entering stock names in the search box on the Eastmoney homepage
https://www.eastmoney.com/default.html to search.
Search Method:
The search box on the Eastmoney homepage actually passes the keywords entered by users to the search service through URL parameters, with the format:
https://so.eastmoney.com/Web/s?keyword={stock name or code}
Operation Steps:
- Use the tool to access the search URL:
https://so.eastmoney.com/Web/s?keyword={stock name or code entered by user}
- Find the matching stock entry from the search results
- Extract the stock code and market identifier
- Obtain the stock detail page URL
If Search is Rate-Limited:
- Use the tool to search "{stock name} stock code Eastmoney" as an alternative
- Or prompt the user to manually search on Eastmoney and provide the stock code
Search Examples for Each Market:
| Market | User Input | Search URL | Detail Page URL |
|---|
| 🇨🇳 A-shares | Kweichow Moutai | | quote.eastmoney.com/sh600519.html
|
| 🇨🇳 A-shares | CATL | | quote.eastmoney.com/sz300750.html
|
| 🇭🇰 Hong Kong Stocks | Tencent | | quote.eastmoney.com/hk/00700.html
|
| 🇺🇸 US Stocks | Apple/AAPL | | quote.eastmoney.com/us/AAPL.html
|
| 🇺🇸 US Stocks | Micron/MU | | quote.eastmoney.com/us/MU.html
|
| 🇺🇸 US Stocks | Alibaba | | quote.eastmoney.com/us/BABA.html
|
Step 2: Access Stock Detail Page to Obtain Basic Information (Core Step!)
⚠️ Important: Real-time market data such as current price, price change percentage, etc. must be obtained from Eastmoney first! This is the most authoritative data source.
Obtain real-time market data based on the stock detail page URL obtained in Step 1.
🚀 Recommended Method: Use Selenium Script (Can Obtain Dynamic Data)
Since Eastmoney page data is dynamically loaded via JavaScript, it is recommended to use the Selenium script built into the skill to obtain data:
bash
# Hong Kong stock example
python scripts/fetch_stock.py 00700 --market hk --output json
# US stock example
python scripts/fetch_stock.py MU --market us --output json
# A-share example
python scripts/fetch_stock.py 600519 --market sh --output json
Script Output JSON Format:
json
{
"success": true,
"code": "00700",
"market": "HK",
"data": {
"name": "腾讯控股",
"price": "512.000",
"change": "-10.500",
"change_percent": "-2.01%",
"amount": "13.22B",
"market_cap": "4.662T",
"pe": "25.67",
"pb": "19.95",
"turnover": "0.88%"
},
"source": "Eastmoney"
}
Script Parameter Description:
| Parameter | Description | Example |
|---|
| Stock code | , , |
| / | Market type | , , , , , |
| / | Output format | , |
| / | Timeout (seconds) | |
Alternative Method: Use web_fetch (May Not Obtain Dynamic Data)
If the Selenium script is unavailable, you can use
to access the page, but note:
- Page data is dynamically loaded via JS, can only obtain static HTML
- Hong Kong/US stock pages may display "-" or empty values
- Need to supplement data with
Data That Must Be Obtained from Eastmoney (Highest Priority):
| Data Item | Importance | Acquisition Method | Remarks |
|---|
| ⭐ Current Stock Price | 🔴 Core | Selenium script / Eastmoney detail page | Must obtain, mark if failed |
| ⭐ Price Change Percentage | 🔴 Core | Selenium script / Eastmoney detail page | Must obtain, mark if failed |
| ⭐ Price Change Amount | 🔴 Core | Selenium script / Eastmoney detail page | Must obtain, mark if failed |
| Trading Volume | Medium | Selenium script / Eastmoney detail page | - |
| Trading Value | Medium | Selenium script / Eastmoney detail page | - |
| Highest Price, Lowest Price | Medium | Selenium script / Eastmoney detail page | - |
| Opening Price | Medium | Selenium script / Eastmoney detail page | - |
| Turnover Rate, Volume Ratio, Amplitude | Medium | Selenium script / Eastmoney detail page | - |
| Total Market Cap, Free Float Market Cap | Medium | Selenium script / Eastmoney detail page | - |
| PE, PB | Medium | Selenium script / Eastmoney detail page | - |
Detail Page URL Template for Each Market:
| Market | URL Format | Example |
|---|
| A-shares - Shanghai | https://quote.eastmoney.com/sh{code}.html
| |
| A-shares - Shenzhen | https://quote.eastmoney.com/sz{code}.html
| |
| A-shares - Beijing Stock Exchange | https://quote.eastmoney.com/bj{code}.html
| |
| 🇭🇰 Hong Kong Stocks | https://quote.eastmoney.com/hk/{code}.html
| |
| 🇺🇸 US Stocks | https://quote.eastmoney.com/us/{code}.html
| , |
⚠️
Important: Hong Kong stocks use the
path, US stocks use the
path! The old paths
(Hong Kong stocks) and
(US stocks) are invalid or unstable!
Data Acquisition Failure Handling:
If access to Eastmoney pages fails or data acquisition is incomplete:
- Prioritize using the Selenium script:
python scripts/fetch_stock.py {code} -m {market}
- Try retrying once (after waiting 2 seconds)
- Use to search "{stock name} real-time stock price today's market" as an alternative
- Must mark the data source status in the final report (see Data Source Tracking section)
Step 3: Obtain Fundamental Data
Need to further access the following pages to obtain detailed financial data:
Stock Information Page (F10):
https://emweb.securities.eastmoney.com/pc_hsf10/pages/index.html?type=web&code={market code}{stock code}
Indicators to Obtain:
| Category | Indicators |
|---|
| Valuation Indicators | Price-to-Earnings Ratio (PE-TTM/Dynamic/Static), Price-to-Book Ratio (PB), Price-to-Sales Ratio (PS) |
| Profitability | ROE (Return on Equity), Gross Margin, Net Margin, EPS (Earnings Per Share) |
| Growth Ability | YoY Revenue Growth Rate, YoY Net Profit Growth Rate, YoY Non-recurring Net Profit Growth Rate |
| Financial Health | Asset-Liability Ratio, Current Ratio, Quick Ratio, Operating Cash Flow |
| Scale Indicators | Total Market Cap, Free Float Market Cap, Total Shares Outstanding, Free Float Shares |
Drill-Down Pages:
- Financial Analysis:
- Company Overview:
- Shareholder Research:
Step 4: Obtain News Data
Access the following pages to collect news and announcement information:
Company Announcements:
https://data.eastmoney.com/notices/stock/{stock code}.html
Stock News (Using Search Function):
https://so.eastmoney.com/news/s?keyword={stock name}
Research Reports:
https://data.eastmoney.com/report/stock/{stock code}.html
Key Focus Points:
- Major announcements in the last 3 months (performance forecasts, major contracts, shareholder changes, etc.)
- Industry policies and trends
- Institutional ratings and target prices
- Market sentiment and hot topics
Step 5: Obtain Capital Flow Data
Access the following pages to analyze capital flows:
Main Force Capital Flow:
https://data.eastmoney.com/zjlx/{stock code}.html
Data to Obtain:
| Indicator | Importance | Description |
|---|
| ⭐Main Force Net Ratio | 🔴 Core | Displayed directly on the page, e.g., "Main Force Net Ratio: 17.23%", no calculation needed |
| ⭐Today's Main Force Net Inflow | 🔴 Core | Main force capital net amount of the day |
| 5-day/10-day/20-day Main Force Net Inflow | Medium | Medium- and long-term capital trends |
| Super Large Order Net Ratio, Large Order Net Ratio | Medium | Capital structure analysis |
| Medium Order Net Ratio, Small Order Net Ratio | Low | Retail capital trends |
⚠️ Key Focus: Main Force Net Ratio is the core indicator for capital flow scoring, read directly from the "Real-time Capital Flow" section of the page, no manual calculation required!
Page Location: To the right of the "Today's Main Force Net Inflow" value, displayed as a percentage (e.g.: 17.23%)
Northbound Capital Holdings:
https://data.eastmoney.com/hsgtcg/stock.html?scode={stock code}
Margin Trading and Short Selling:
https://data.eastmoney.com/rzrq/detail/{stock code}.html
Step 6: Technical Reference (Optional Drill-Down)
Obtain technical indicators from the detail page to assist judgment:
Key Indicators:
- Current price position relative to 52-week high and low
- Moving average system (5/10/20/60/120/250-day moving averages)
- Support and resistance levels
- Trading volume change trends
Step 6.5: M&A and Restructuring Analysis (Conditional Trigger)
⚠️ Trigger Condition: When it is found that the company has ongoing or recently announced M&A, restructuring, or acquisition matters, this step must be executed.
Identify M&A Matters
In Step 4 (news analysis), if the following keywords are found, trigger M&A analysis:
| Trigger Keywords | Example |
|---|
| Acquisition, M&A, Restructuring | "Plans to acquire 100% equity of XX company" |
| Major Asset Purchase | "Major Asset Purchase Report" |
| Tender Offer | "Initiates a full tender offer" |
| Merger, Absorption Merger | "Plans to merge with XX company" |
| Strategic Investment, Equity Acquisition | "Plans to acquire XX% equity for XX billion yuan" |
| Backdoor Listing | "XX company plans to backdoor list" |
Obtain M&A Target Data
Key Data of Target Company to Obtain via Search:
Use
to search for the following information:
Search Keywords:
1. "{Acquisition target name} revenue net profit gross margin financial data"
2. "{Acquisition target name} valuation PE industry"
3. "{Acquirer company} acquisition {target name} plan consideration percentage"
4. "{Acquirer company} M&A restructuring progress latest announcement"
Must-Obtain Data of Target Company:
| Data Item | Importance | Description |
|---|
| ⭐ Target Company Revenue | 🔴 Core | Revenue in the latest year/latest period |
| ⭐ Target Company Net Profit | 🔴 Core | Net profit attributable to parent in the latest year/latest period |
| ⭐ Target Company Gross Margin | 🔴 Core | Gross margin of main business |
| ⭐ Acquisition Percentage | 🔴 Core | Proposed equity acquisition percentage (e.g., 100%, 51%, 30%, etc.) |
| ⭐ Acquisition Consideration | 🔴 Core | Total transaction amount |
| ⭐ Announcement Date Stock Price | 🔴 Core | Closing price on the first announcement date of the acquisition (used to calculate the price change since the announcement) |
| Target Company Valuation | High | Transaction valuation (assessment value) |
| Payment Method | High | Cash/Stock/Mixed payment |
| Performance Commitment | High | Future performance (net profit commitment) promised by the target |
| Target Industry | Medium | Industry and competitive position |
| M&A Progress Stage | Medium | Proposal/Draft/Under Approval/Completed |
| Goodwill Amount | Medium | Acquisition consideration - target net assets = goodwill |
Obtain Announcement Date Stock Price and Calculate Price Change Since Announcement
Purpose: Intuitively display the actual market reaction and stock price change range after the M&A announcement is released.
Acquisition Method:
- Determine the first M&A announcement date (e.g., the release date of the "Plans to acquire XX company" announcement)
- Use to search "{Company name} {Announcement date} closing price stock price" to obtain the closing price on the announcement date
- Or find the closing price on the corresponding date from Eastmoney K-line historical data
Calculation Formula:
Price change since announcement = (Current stock price - Announcement date closing price) / Announcement date closing price × 100%
Display in Report:
- Add three rows: "Announcement Date", "Announcement Date Closing Price", "Price Change Since Announcement" to the M&A overview table
- Mark green (🟢) when the change is positive, orange (🟡 Warning of overheating) when the change exceeds 50%, red (🔴 Severe overheating) when the change exceeds 100%
M&A Valuation Calculation Model
Core Formulas:
1. Expected revenue after consolidation = Acquirer's current revenue + Target's revenue × Acquisition percentage
2. Expected net profit after consolidation = Acquirer's current net profit + Target's net profit × Acquisition percentage
3. Expected gross profit after consolidation = Acquirer's current gross profit + Target's gross profit × Acquisition percentage
4. Expected gross margin after consolidation = Expected gross profit after consolidation / Expected revenue after consolidation
5. Expected EPS after consolidation = Expected net profit after consolidation / Total shares outstanding after M&A
(If stock payment: Total shares outstanding after M&A = Original total shares + Number of newly issued shares)
(If cash payment: Total shares outstanding after M&A = Original total shares)
6. Expected market cap based on industry PE = Expected net profit after consolidation × Industry/peer company PE
7. Expected market cap based on current PE = Expected net profit after consolidation × Company's current PE
8. Expected stock price (Industry PE method) = Expected market cap (Industry PE) / Total shares outstanding after M&A
9. Expected stock price (Current PE method) = Expected market cap (Current PE) / Total shares outstanding after M&A
10. Stock price upside potential = (Expected stock price - Current stock price) / Current stock price × 100%
Valuation Scenario Analysis (Must calculate all three scenarios simultaneously):
| Scenario | PE Value | Description |
|---|
| 🟢 Optimistic Scenario | High PE of target industry (75th percentile) | Good market sentiment, high-growth target |
| 🟡 Neutral Scenario | Median PE of target industry (50th percentile) | Normal market environment |
| 🔴 Conservative Scenario | Low PE of target industry (25th percentile) or lower current PE of acquirer | Market downturn, integration risks |
Performance Commitment Valuation Method (If there is a performance commitment):
Expected profit during commitment period = Committed net profit (usually 3 years)
Expected PE during commitment period = Reasonable industry PE
Expected market cap after commitment completion = Committed net profit × Expected PE during commitment period
M&A Synergy Evaluation
| Synergy Type | Evaluation Points | Score Adjustment |
|---|
| Revenue Synergy | Whether target business complements acquirer, cross-selling possible | +1~+2 points |
| Cost Synergy | Whether management/purchase/operation costs can be reduced after merger | +1 point |
| Technology Synergy | Whether target has core technology that acquirer lacks | +1~+2 points |
| Industry Position | Whether market share/industry ranking improves after M&A | +1 point |
| Integration Risk | Cultural differences, management retention, customer churn risks | -1~-2 points |
| Goodwill Risk | Higher goodwill/net asset ratio means greater risk | -1~-3 points |
| Payment Method Risk | Large proportion of cash payment → increased liabilities; large proportion of issuance → EPS dilution | -1~-2 points |
Impact of M&A Analysis on Scoring
The results of M&A analysis need to adjust the original score:
Fundamental Score Adjustment:
- Expected revenue growth after M&A > 30%: +1~+2 points to fundamentals
- Expected net profit growth after M&A > 50%: +2 points to fundamentals
- Gross margin increase after M&A > 5 percentage points: +1 point to fundamentals
- Goodwill/net asset > 50%: -1~-2 points to fundamentals
- Target net profit is negative: -2 points to fundamentals
News Score Adjustment:
- M&A approved by regulators/progressing smoothly: +1~+2 points to news
- M&A has uncertainty/risk of rejection: -1~-2 points to news
- There is a performance commitment and it is credible: +1 point to news
M&A Analysis Output Requirements
In the final report, a separate "M&A and Restructuring Analysis" section must be added, including:
- M&A Overview: Brief description of the transaction plan (target, consideration, percentage, payment method, announcement date, announcement date closing price, price change since announcement)
- Target Company Profile: Main business, revenue, net profit, gross margin, industry
- Post-consolidation Valuation Calculation: Detailed calculation of three scenarios (optimistic/neutral/conservative)
- Stock Price Upside Potential: Expected upside range based on valuation calculation
- Synergy Evaluation: List of score add/subtract items
- M&A Risk Warning: Core risks such as goodwill, integration, approval
- Adjustment of Comprehensive Score by M&A Matters: Clearly mark the score changes
Step 7: Comprehensive Analysis and Recommendations
Conduct a comprehensive evaluation based on all the above data:
Scoring System
| Dimension | Weight | Evaluation Points |
|---|
| Fundamentals | 35% | Whether PE/PB is reasonable, ROE level, growth, profitability, financial health |
| News | 20% | Whether there are major positive/negative news, industry policies, performance expectations, institutional ratings |
| Capital Flow | 35% | Main Force Net Ratio (core indicator), main force capital trends, northbound capital changes, margin trading balance trends |
| Technicals | 10% | Trend judgment, support and resistance levels, volume-price coordination |
⚠️ Important Note: The weight of capital flow is increased to 35%, among which "Main Force Net Ratio" is the core evaluation indicator, read directly from the Eastmoney page (no calculation needed), which can directly reflect the attitude of the day's market main force.
Scoring Standards
Fundamentals Score (Full Score 10):
- PE lower than industry average and ROE>15%: +3 points
- Net profit growth rate>20%: +2 points
- Gross margin>30%: +2 points
- Asset-liability ratio<50%: +2 points
- Healthy cash flow: +1 point
News Score (Full Score 10):
- Major positive announcements: +3 points
- Institutional rating is Buy/Overweight: +2 points
- Favorable industry policies: +2 points
- No negative public opinion: +2 points
- Positive performance expectations: +1 point
Capital Flow Score (Full Score 10):
| Indicator | Condition | Score | Description |
|---|
| ⭐Main Force Net Ratio | >10% | +4 points | Core indicator, read directly from the page, reflects the day's main force attitude |
| ⭐Main Force Net Ratio | 5%-10% | +3 points | Main force obviously involved |
| ⭐Main Force Net Ratio | 0%-5% | +2 points | Main force slightly inflowing |
| ⭐Main Force Net Ratio | -5%-0% | +1 point | Main force slightly outflowing |
| ⭐Main Force Net Ratio | <-5% | +0 points | Main force obviously outflowing |
| 5-day Main Force Net Inflow | >100M | +2 points | Medium-term capital trend |
| Northbound Capital | Increased holdings | +2 points | Foreign capital attitude |
| Super Large Order Net Inflow | Positive | +1 point | Institutional capital trend |
| Turnover Rate | 3%-8% | +1 point | Moderate trading activity |
Main Force Net Ratio Data Source:
Page: https://data.eastmoney.com/zjlx/{stock code}.html
Location: Real-time Capital Flow section → Right of "Today's Main Force Net Inflow"
Format: e.g., "Main Force Net Ratio: 17.23%"
✅ Read directly from the page, no manual calculation needed!
Capital Flow Score Interpretation:
- 8-10 points: Main force strongly involved, bullish in the short term
- 6-8 points: Main force moderately inflowing, worth attention
- 4-6 points: Neutral capital flow, need to combine with other dimensions
- 2-4 points: Signs of main force outflow, cautious
- 0-2 points: Main force obviously withdrawing, avoid
Investment Recommendation Levels
| Comprehensive Score | Recommendation Level |
|---|
| 8-10 points | Strong Buy |
| 6-8 points | Buy |
| 4-6 points | Hold |
| 2-4 points | Cautious Operation |
| 0-2 points | Sell |
Buy/Sell Price Calculation
Buy Price:
- Initial position price: Current price × 0.95-0.98 (build position when retrace 5%-2%)
- Add position price: Near support level or moving average support level
Target Price:
- Refer to institutional target prices
- PE valuation method: Reasonable PE × Predicted EPS
- Near resistance level
Stop Loss Price:
- Break below support level
- Usually set to 92%-95% of the buy price
Step 8: Generate Visual HTML Report (Must Execute)
After analysis is completed, must generate a visual HTML web report and save it to the user's working directory.
HTML Report Requirements
-
File Naming:
{stock code}_{stock name}_Analysis_Report_{date}.html
- Example:
603618_Hangdian_Shares_Analysis_Report_20260226.html
-
Save Location: User's current working directory
-
Report Content: Consistent with the Markdown report content, but presented in a visual web format
-
Template Usage: Use
assets/report_template.html
as the HTML template
HTML Report Features
- 📊 Visual Charts: Use progress bars and dashboards to display scores
- 🎨 Beautiful Style: Modern UI design, responsive layout
- 📱 Print Support: Can be directly printed or exported to PDF
- 🔗 Interactive Links: Contains quick links to relevant Eastmoney pages
Generation Process
- Read the
assets/report_template.html
template
- Fill the analysis data into the template
- Use the tool to save the HTML file
- Use the tool to preview in the browser (optional)
Output Formats
After analysis is completed, two formats of reports need to be output:
1. Command Line Output (Markdown Format)
Output a complete investment analysis report according to the
assets/report_template.md
template format, including:
- Basic Information: Stock code, name, industry, market cap, etc.
- Fundamental Analysis: Valuation, profitability, growth, financial health
- News Analysis: Announcements, news, research reports, public opinion
- Capital Flow Analysis: Main force capital, northbound capital, margin trading
- Technical Reference: Price position, moving averages, support and resistance
- Comprehensive Investment Recommendation: Score, conclusion, buy price, target price, stop loss price
- Risk Warnings
2. Visual Web Report (HTML Format)
Generate a visual web page using the
assets/report_template.html
template:
- Generate and save the HTML file
- Inform the user of the file save location
- Provide a preview link (if feasible)
Drill-Down Strategy
During analysis, access various sub-pages in depth as needed:
Login Guide → Homepage Search → Search Results Page → Stock Detail Page → Drill-Down to Various Data Pages → Generate Report
↓
┌───────────────┼───────────────┐
↓ ↓ ↓
F10 Information Page Capital Flow Page Announcement & News Page
↓ ↓ ↓
Financial Analysis Main Force Tracking Research Reports
Shareholder Research Northbound Capital
Company Overview Margin Trading
↓
┌─────────┴─────────┐
↓ ↓
Markdown Report HTML Report
(Command Line Output) (File Save)
📊 Data Source Tracking (Important!)
Why Track Data Sources?
To ensure the transparency and credibility of the report, must display the source status of each data item in the final report:
- Users can clearly know which data comes from Eastmoney (authoritative source)
- Users can identify which data is supplemented by search engines
- Users can understand which data failed to be obtained or was not obtained
Data Source Status Definitions
| Status | Identifier | Description |
|---|
| ✅ Eastmoney | | Successfully obtained from Eastmoney.com |
| 🔄 Search Supplement | | Failed to obtain from Eastmoney, supplemented by search engine |
| ❌ Acquisition Failed | | Cannot obtain this data |
| ⚪ Not Referenced | | Did not attempt to obtain this data |
Core Data Source Requirements
The following data must be obtained from Eastmoney first, and the source status must be marked in the report:
| Data Item | Eastmoney URL | Priority |
|---|
| Current Stock Price | Detail page | 🔴 Must |
| Price Change Percentage/Price Change Amount | Detail page | 🔴 Must |
| Total Market Cap | Detail page | 🔴 Must |
| PE/PB | Detail page | High |
| Turnover Rate | Detail page | Medium |
| Main Force Net Inflow | | High |
| Main Force Net Ratio | | High |
| Financial Indicators (ROE, etc.) | F10 Information Page | Medium |
| Announcements & News | Announcement/News Page | Medium |
Data Source Display Format in Report
In both HTML and Markdown reports, must add a "Data Source Status" section:
Example: Data Source Status Table
markdown
## 📡 Data Source Status
|--------|------|------|
| Current Stock Price | Eastmoney | ✅ Success |
| Price Change Percentage | Eastmoney | ✅ Success |
| Total Market Cap | Eastmoney | ✅ Success |
| PE/PB | Eastmoney | ✅ Success |
| Main Force Net Inflow | Eastmoney | ✅ Success |
| Main Force Net Ratio | Eastmoney | ✅ Success |
| Financial Report Data | Search Engine | 🔄 Supplement |
| Analyst Target Price | Search Engine | 🔄 Supplement |
| Institutional Holdings | - | ❌ Failed |
> 📊 Data Completeness: 80% | Eastmoney Data Proportion: 60%
Notes
- Login Priority: Guide the user to log in to Eastmoney before each analysis to avoid rate limiting
- Search Accuracy: If the stock name is ambiguous, multiple results may be returned, need to confirm whether it is the stock the user wants
- Data Timeliness: Stock data changes in real time, analysis results are based on data at the time of acquisition
- Page Access: Some pages may need to be accessed multiple times to obtain complete data
- Alternative Plan: If access to Eastmoney is restricted, use as a supplementary data source
- Dual Output: Must output both Markdown and HTML reports simultaneously
- Data Source Labeling: Must display the data source status table in the report, so that users can clearly understand data reliability
- Market Code Comparison Table:
| Market | URL Path Format | Example URL |
|---|
| 🇨🇳 A-shares - Shanghai | quote.eastmoney.com/sh{code}.html
| |
| 🇨🇳 A-shares - Shenzhen | quote.eastmoney.com/sz{code}.html
| |
| 🇨🇳 A-shares - Beijing Stock Exchange | quote.eastmoney.com/bj{code}.html
| |
| 🇭🇰 Hong Kong Stocks | quote.eastmoney.com/hk/{code}.html
| |
| 🇺🇸 US Stocks | quote.eastmoney.com/us/{code}.html
| , |
⚠️
Important: The old paths
(Hong Kong stocks) and
(US stocks) are invalid! Please use the new
and
paths!
-
Special Instructions for Hong Kong and US Stocks:
- Hong Kong Stocks use the
quote.eastmoney.com/hk/{code}.html
path
- US Stocks use the
quote.eastmoney.com/us/{code}.html
path
- Hong Kong and US stocks may not have complete F10 information pages, need to use to supplement fundamental data
- Capital flow data for Hong Kong and US stocks may be in a different format from A-shares, need to handle flexibly
- US stock codes are letters (e.g., AAPL, MU, TSLA), Hong Kong stock codes are numbers (e.g., 00700)
-
Common US Stock Code Quick Reference:
- AAPL (Apple) / MSFT (Microsoft) / GOOGL (Google) / AMZN (Amazon)
- TSLA (Tesla) / NVDA (NVIDIA) / MU (Micron) / AMD (AMD)
- META (Meta) / NFLX (Netflix) / BABA (Alibaba) / PDD (Pinduoduo) / JD (JD.com)
Reference Materials
- Detailed URL templates and data parsing guide:
references/eastmoney_guide.md
- Markdown report template:
assets/report_template.md
- HTML report template:
assets/report_template.html