Overview
This skill is used to comprehensively analyzeA-shares, Hong Kong stocks, US stocksand all markets supported by Eastmoney (futures, indices, ETFs, etc.), by simulating the Eastmoney homepage (https://www.eastmoney.com/default.html)的搜索框功能来搜索股票,从基本面、新闻面、资金面三个维度进行分析,最终给出投资建议。
Supported Markets
| Market | Code Prefix | Example |
|---|---|---|
| 🇨🇳 A-shares - Shanghai | sh / starts with 6 | sh600519 Kweichow Moutai |
| 🇨🇳 A-shares - Shenzhen | sz / starts with 0, 3 | sz300750 CATL |
| 🇨🇳 A-shares - Beijing Stock Exchange | bj / starts 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 Method:
- Output the complete analysis report in the conversation (Markdown format)
- Also generate a visualized HTML web report and save it to the user's working directory
Trigger Conditions
This skill should be used in the following situations:
- The user requests analysis of a certain stock (regardless of A-shares, Hong Kong stocks, or US stocks)
- The user asks whether a certain stock is worth investing in
- The user wants to know the buy/sell prices of a stock
- The user mentions stock research or stock analysis
- A-share keywords: A-share analysis, Shanghai and 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, China concept stocks, Apple AAPL, Tesla TSLA, Nvidia NVDA, Micron MU, Google GOOGL, Microsoft MSFT, Amazon AMZN, Meta, Alibaba BABA, Pinduoduo PDD, JD.com JD
- The user mentions Eastmoney and involves stock queries
- The user directly enters a stock code (such as: MU, AAPL, 00700, 600519)
Step 0: Eastmoney Login Guidance (Important!)
Why is login required?
Eastmoney.com imposes access rate limits on users who are not logged in, which may cause:
- Search results to load incompletely
- Some data pages to be inaccessible
- Requests to be restricted or return empty data
Login Guidance Process
Before starting the analysis,the user must first be guided to log in to Eastmoney:
Guidance script template:
📊 **股票分析准备**
为了获取完整、准确的股票数据,建议您先登录东方财富网账号。
**请按以下步骤操作:**
1. 🌐 点击打开东方财富主页:https://www.eastmoney.com/default.html
2. 🔐 点击页面右上角的【登录】按钮
3. ✅ 使用以下任一方式登录:
- 手机号 + 验证码
- 账号密码登录
- 微信/QQ扫码登录
4. 📢 登录成功后,请回复"已登录"或"继续分析"
**提示**:
- 如果没有账号,可以快速注册一个(免费)
- 登录后数据获取更稳定,分析结果更准确
- 如果选择不登录,部分数据可能获取不完整
---
请问您是否已经登录东方财富?
User Response Handling:
| User Reply | Handling Method |
|---|---|
| "Logged in" / "I have logged in" / "Continue" | Continue executing the subsequent analysis steps |
| "Not logged in" / "Don't want to log in" / "Skip" | Warn that the data may be incomplete, continue the analysis but note that the data may be limited |
| No clear reply | Ask again or by default continue the analysis |
Login status marker
In the final report, note the data acquisition status:
- ✅ Logged in: High data completeness
- ⚠️ Not logged in: Some data may be limited
⏱️ Request delay strategy (important!)
Why is delay needed?
East Money has rate-limiting protection against high-frequency requests. Consecutive rapid requests may cause:
- IP temporarily banned
- Returning empty data or error pages
- CAPTCHA interception
Delay rules
⚠️ Must comply: For each request to an East Money page,you must delay 1 secondbefore initiating the next request!
Execution method:
请求1 → 等待1秒 → 请求2 → 等待1秒 → 请求3 → ...
Applicable scenarios:
- When using
web_fetchto access any East Money page - Includes: search pages, quote pages, capital flow pages, F10 pages, announcement pages, news pages, etc.
Scenarios where delay is not needed:
- Using the
web_searchtool (this is a search engine, not direct access to East Money)
Implementation points
- Serial requests: Do not initiate multiple East Money page requests in parallel
- 1-second interval: After each
web_fetchEast Money URL, wait at least 1 second - Failed retry: If the request fails, wait 2 seconds and retry once
Analysis process
Step 1: Simulate searching for stocks in the search box on the East Money homepage
Core principle: Simulate the user entering a stock name in the search box on the East Money homepage https://www.eastmoney.com/default.html to search.
Search method: The search box on the East Money homepage actually passes the keywords entered by the user through URL parameters to the search service, in the format:
https://so.eastmoney.com/Web/s?keyword={股票名称或代码}
Operation steps:
- Use the
web_fetchtool to access the search URL:https://so.eastmoney.com/Web/s?keyword={用户输入的股票名称或代码} - Find the matching stock entry from the search results
- Extract the stock code and market identifier
- Obtain the stock detail page URL
If the search is rate-limited:
- Use the
web_searchtool to search "{stock name} stock code East Money" as an alternative - Or prompt the user to manually search on East Money and provide the stock code
Search examples for each market:
| Market | User input | Search URL | Detail page URL |
|---|---|---|---|
| 🇨🇳 A-shares | Kweichow Moutai | keyword=贵州茅台 |
quote.eastmoney.com/sh600519.html |
| 🇨🇳 A-shares | CATL | keyword=宁德时代 |
quote.eastmoney.com/sz300750.html |
| 🇭🇰 Hong Kong stocks | Tencent | keyword=腾讯 |
quote.eastmoney.com/hk/00700.html |
| 🇺🇸 US stocks | Apple/AAPL | keyword=AAPL |
quote.eastmoney.com/us/AAPL.html |
| 🇺🇸 US stocks | Micron/MU | keyword=MU |
quote.eastmoney.com/us/MU.html |
| 🇺🇸 US stocks | Alibaba | keyword=阿里巴巴 |
quote.eastmoney.com/us/BABA.html |
Step 2: Access the stock detail page to obtain basic information (core step!)
⚠️ Important: Current price, price change percentage, and other real-time market dataMust be obtained from East Money first! This is the most authoritative data source.
Based on the stock detail page URL obtained in Step 1, retrieve real-time market data.
🚀 Recommended approach: Use the Selenium script (can retrieve dynamic data)
Because East Money page data is loaded dynamically via JavaScript, it is recommended to use the Selenium script included with the skill to retrieve data:
# 港股示例
python scripts/fetch_stock.py 00700 --market hk --output json
# 美股示例
python scripts/fetch_stock.py MU --market us --output json
# A股示例
python scripts/fetch_stock.py 600519 --market sh --output json
The script outputs in JSON format:
{
"success": true,
"code": "00700",
"market": "HK",
"data": {
"name": "腾讯控股",
"price": "512.000",
"change": "-10.500",
"change_percent": "-2.01%",
"amount": "132.2亿",
"market_cap": "4.662万亿",
"pe": "25.67",
"pb": "19.95",
"turnover": "0.88%"
},
"source": "东方财富"
}
Script parameter descriptions:
| Parameter | Description | Example |
|---|---|---|
code |
Stock code | 00700, MU, 600519 |
--market / -m |
Market type | hk, us, sh, sz, bj, auto |
--output / -o |
Output format | json, text |
--timeout / -t |
Timeout (seconds) | 15 |
Alternative approach: Use web_fetch (may not be able to retrieve dynamic data)
If the Selenium script is unavailable, you can use web_fetch to access the page, but note:
- Page data is loaded dynamically via JS,
web_fetchcan only retrieve static HTML - Hong Kong stock/US stock pages may display "-" or empty values
- Need to combine with
web_searchto supplement data
Data that must be obtained from East Money (highest priority):
| Data item | Importance | Retrieval method | Remarks |
|---|---|---|---|
| ⭐ Current stock price | 🔴 Core | Selenium script / East Money detail page | Must obtain; if failed, must be noted |
| ⭐ Price change percentage | 🔴 Core | Selenium script / East Money detail page | Must obtain; if failed, must be noted |
| ⭐ Price change amount | 🔴 Core | Selenium script / East Money detail page | Must obtain; if failed, must be noted |
| Volume | Medium | Selenium script / East Money detail page | - |
| Turnover | Medium | Selenium script / East Money detail page | - |
| High price, low price | Medium | Selenium script / East Money detail page | - |
| Opening price | Medium | Selenium script / East Money detail page | - |
| Turnover rate, volume ratio, amplitude | Medium | Selenium script / East Money detail page | - |
| Total market capitalization, circulating market capitalization | Medium | Selenium script / East Money detail page | - |
| PE、PB | Medium | Selenium script / East Money detail page | - |
Detail page URL templates for each market:
| Market | URL format | Example |
|---|---|---|
| A-shares - Shanghai | https://quote.eastmoney.com/sh{代码}.html |
sh600519.html |
| A-shares - Shenzhen | https://quote.eastmoney.com/sz{代码}.html |
sz300750.html |
| A-shares - Beijing Stock Exchange | https://quote.eastmoney.com/bj{代码}.html |
bj830799.html |
| 🇭🇰 Hong Kong stocks | https://quote.eastmoney.com/hk/{代码}.html |
hk/00700.html |
| 🇺🇸 US stocks | https://quote.eastmoney.com/us/{代码}.html |
us/MU.html, us/AAPL.html |
⚠️ Important: Hong Kong stocks use the
/hk/path, US stocks use the/us/path! The oldunify/r/116.andunify/r/105.paths are no longer valid or stable!
Data Retrieval Failure Handling:
If the East Money page fails to load or data retrieval is incomplete:
- First, try using the Selenium script:
python scripts/fetch_stock.py {代码} -m {市场} - Try retrying once (after waiting 2 seconds)
- Use
web_searchSearch "{stock name} real-time stock price today's market" as a fallback - The data source status must be noted in the final report(see the Data Source Tracking section for details)
Step 3: Retrieve Fundamental Data
You need to further drill down to access the following pages to retrieve detailed financial data:
Stock Profile Page (F10):
https://emweb.securities.eastmoney.com/pc_hsf10/pages/index.html?type=web&code={市场代码}{股票代码}
Indicators to Retrieve:
| 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 Capability | Revenue year-over-year growth rate, net profit year-over-year growth rate, non-GAAP net profit growth rate |
| Financial Health | Debt-to-Asset ratio, current ratio, quick ratio, operating cash flow |
| Scale Indicators | Total market cap, float market cap, total share capital, float share capital |
Drill-down pages:
- Financial Analysis:
#/cwfx - Company Overview:
#/gsgk - Shareholder Research:
#/gdyj
Step 4: Retrieve News Data
Visit the following pages to collect news and announcement information:
Company Announcements:
https://data.eastmoney.com/notices/stock/{股票代码}.html
Stock News(using the search function):
https://so.eastmoney.com/news/s?keyword={股票名称}
Research Reports:
https://data.eastmoney.com/report/stock/{股票代码}.html
Key Points to Watch:
- Major announcements in the last 3 months (earnings forecasts, major contracts, shareholder changes, etc.)
- Industry policies and trends
- Institutional research report ratings and target prices
- Market sentiment and hot topics
Step 5: Retrieve Capital Flow Data
Visit the following pages to analyze capital flow:
Main Capital Flow:
https://data.eastmoney.com/zjlx/{股票代码}.html
Data to Retrieve:
| Indicator | Importance | Description |
|---|---|---|
| ⭐Main Net Ratio | 🔴 Core | Displayed directly on the page, e.g. "Main Net Ratio: 17.23%", no calculation needed |
| ⭐Today's Main Net Inflow | 🔴 Core | Net amount of main capital for the day |
| 5-day/10-day/20-day Main Net Inflow | Medium | Medium- to long-term capital trend |
| Extra-large order net ratio, large order net ratio | Medium | Capital structure analysis |
| Medium order net ratio, small order net ratio | Low | Retail capital movement |
⚠️ Key Focus:Main Net Ratiois the core indicator of the capital flow score, read directly from the "Real-time Capital Flow" section on the page, no need to calculate it yourself!
Page Location: To the right of the "Today's Main Net Inflow" value, displayed as a percentage (e.g., 17.23%)
Northbound Capital Holdings:
https://data.eastmoney.com/hsgtcg/stock.html?scode={股票代码}
Margin Trading and Securities Lending:
https://data.eastmoney.com/rzrq/detail/{股票代码}.html
Step 6: Technical Analysis Reference (Optional Drill-down)
Obtain technical indicators from the detail page for supporting judgment:
Indicators to watch:
- Current price position relative to the 52-week high and low
- Moving average system (5/10/20/60/120/250-day moving averages)
- Support and resistance levels
- Trading volume change trend
- 10-day gainand20-day gain(period gain/loss)
Methods for obtaining 10-day/20-day gains
⚠️ East Money web version and Tonghuashun web versionneither directly displays10-day and 20-day gain data. Tonghuashun only provides 5-day/3-month/1-year gains, and the East Money quote center supports 60-day and year-to-date gains, but the 10-day/20-day gains need to be calculated manually.
Calculation formula:
N日涨幅 = (当前收盘价 / N个交易日前收盘价 - 1) × 100%
Data acquisition methods(sorted by priority):
-
Method 1: Selenium script to obtain K-line data(recommended)
- Obtain the daily K-line data for the most recent 30 trading days from the East Money individual stock K-line page
- Take the closing prices from 10 and 20 trading days ago and substitute them into the formula for calculation
-
Method 2: East Money K-line API
https://push2his.eastmoney.com/api/qt/stock/kline/get?secid={市场代码}.{股票代码}&fields1=f1,f2,f3,f4,f5,f6&fields2=f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61&klt=101&fqt=1&end=20500101&lmt=25klt=101represents daily K-line,lmt=25obtains the most recent 25 trading days- In the returned data, f51=date, f52=open price, f53=closing price
- Take the closing prices of the 11th-to-last entry (10 days ago) and the 21st-to-last entry (20 days ago) for calculation
-
Method 3: web_search supplement
- Search "{stock name} historical stock price in the last 20 days" to obtain recent price data
- Calculate the gain manually
Display of 10-day/20-day gains in the report:
| Gain indicator | Value | Meaning | Signal judgment |
|---|---|---|---|
| 10-day gain | {10-day gain}% | Short-term (about 2 weeks) stock price momentum | >10% short-term strong; <-10% short-term weak |
| 20-day gain | {20-day gain}% | Medium-short-term (about 1 month) stock price trend | >20% medium-term strong; <-15% medium-term weak |
Gain signal judgment criteria:
| 10-day gain | 20-day gain | Comprehensive judgment |
|---|---|---|
| >15% | >25% | 🔴 Short-term gain too large, beware of chasing highs |
| 5%~15% | 10%~25% | 🟠 In an upward trend, watch sustainability |
| -5%~5% | -10%~10% | 🟡 Consolidating, wait for direction selection |
| -15%~-5% | -25%~-10% | 🟢 In a pullback, watch for a stabilization opportunity at support levels |
| <-15% | <-25% | ⚫ Major pullback, watch for risk or oversold rebound opportunity |
Technical score supplementary rules(impact of 10-day/20-day gains on the score):
| Condition | Score adjustment | Description |
|---|---|---|
| 10-day gain >5% and 20-day gain >10% | +1 point | Both short- and medium-term gains are rising, trend is improving |
| 10-day gain <-10% or 20-day gain <-20% | -1 point | Short- or medium-term major pullback, trend is weakening |
| 10-day gain >20% | -1 point (risk deduction) | Short-term gain too large, there is pullback risk |
Step 6.5: M&A and restructuring analysis (conditional trigger)
⚠️ Trigger Conditions: When it is discovered that the company has an ongoing or recently announced merger, restructuring, or acquisition matter,this step must be executed。
Identify M&A Matters
In Step 4 (News Analysis), if the following keywords are found, M&A analysis is triggered:
| Trigger Keywords | Examples |
|---|---|
| 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 a backdoor listing" |
Obtain M&A Target Data
Key data of the target company that needs to be obtained through search:
Use web_search to search for the following information:
搜索关键词:
1. "{收购标的名称} 营收 净利润 毛利率 财务数据"
2. "{收购标的名称} 估值 PE 行业"
3. "{收购方公司} 收购 {标的名称} 方案 对价 比例"
4. "{收购方公司} 并购 重组 进展 最新公告"
Target Company Data That Must Be Obtained:
| Data Item | Importance | Description |
|---|---|---|
| ⭐ Target Company Revenue | 🔴 Core | Revenue for the most recent year/most recent period |
| ⭐ Target Company Net Profit | 🔴 Core | Net profit attributable to the parent for the most recent year/most recent period |
| ⭐ Target Company Gross Margin | 🔴 Core | Gross margin of the main business |
| ⭐ Acquisition Ratio | 🔴 Core | Proposed equity acquisition ratio (e.g., 100%, 51%, 30%, etc.) |
| ⭐ Acquisition Consideration | 🔴 Core | Total transaction amount |
| ⭐ Share Price on Announcement Date | 🔴 Core | Closing price on the day of the first acquisition announcement (used to calculate the increase since the announcement) |
| Target Company Valuation | High | Transaction valuation (appraised value) |
| Payment Method | High | Cash/share/mixed payment |
| Performance Commitment | High | Future performance committed by the target party (net profit commitment) |
| Target Industry | Medium | Industry and competitive position |
| M&A Progress Stage | Medium | Preliminary plan/draft/under review/completed |
| Goodwill Amount | Medium | Acquisition consideration - target net assets = goodwill |
Obtain the Closing Price on the Announcement Date and Calculate the Increase Since the Announcement
Purpose: To intuitively show the market's actual reaction and the extent of share price changes after the M&A announcement is released.
Obtaining Method:
- Determine the date of the first M&A announcement (e.g., the release date of the "Plans to acquire XX Company" announcement)
- Use
web_searchto search "{company name} {announcement date} closing price share price" to obtain the closing price on the announcement date - Or look up the closing price for the corresponding date from East Money's historical K-line data
Calculation Formula:
公告日至今涨幅 = (当前股价 - 公告日收盘价) / 公告日收盘价 × 100%
Present in the report:
- Add three new rows to the M&A overview table: "Announcement Date", "Closing Price on Announcement Date", "Gain Since Announcement"
- When the gain is positive, mark it green (🟢); when the gain exceeds 50%, mark it orange (🟡 warning of overheating); when the gain exceeds 100%, mark it red (🔴 severe overheating)
M&A Valuation Calculation Model
Core Formula:
1. 并表后预期营收 = 收购方当前营收 + 标的营收 × 收购比例
2. 并表后预期净利润 = 收购方当前净利润 + 标的净利润 × 收购比例
3. 并表后预期毛利 = 收购方当前毛利 + 标的毛利 × 收购比例
4. 并表后预期毛利率 = 并表后预期毛利 / 并表后预期营收
5. 并表后预期EPS = 并表后预期净利润 / 并购后总股本
(若为股份支付:并购后总股本 = 原总股本 + 增发股份数)
(若为现金支付:并购后总股本 = 原总股本)
6. 基于行业PE的预期市值 = 并表后预期净利润 × 行业/可比公司PE
7. 基于当前PE的预期市值 = 并表后预期净利润 × 公司当前PE
8. 预期股价(行业PE法) = 预期市值(行业PE) / 并购后总股本
9. 预期股价(当前PE法) = 预期市值(当前PE) / 并购后总股本
10. 股价涨幅空间 = (预期股价 - 当前股价) / 当前股价 × 100%
Valuation Scenario Analysis(all three scenarios must be calculated simultaneously):
| Scenario | PE Value | Description |
|---|---|---|
| 🟢 Optimistic Scenario | Target industry high PE (75th percentile) | Good market sentiment, high target growth |
| 🟡 Neutral Scenario | Target industry median PE (50th percentile) | Normal market environment |
| 🔴 Conservative Scenario | Target industry low PE (25th percentile) or acquirer's current PE taken at the low end | Market downturn, integration risk |
Performance Commitment Valuation Method(if there is a performance commitment):
承诺期预期利润 = 业绩承诺净利润(通常3年)
承诺期预期PE = 行业合理PE
承诺完成后预期市值 = 承诺净利润 × 承诺期PE
M&A Synergy Effect Assessment
| Synergy Type | Assessment Points | Bonus/Penalty |
|---|---|---|
| Revenue Synergy | Whether the target's business is complementary to the acquirer's and whether cross-selling is possible | +1~+2 points |
| Cost Synergy | Whether management/procurement/operating costs can be reduced after the merger | +1 point |
| Technology Synergy | Whether the target possesses core technologies that the acquirer lacks | +1~+2 points |
| Industry Position | Whether market share/industry ranking improves after the merger | +1 point |
| Integration Risk | Cultural differences, management retention, customer churn risk | -1~-2 points |
| Goodwill Risk | The higher the goodwill/net assets ratio, the greater the risk | -1~-3 points |
| Payment Method Risk | Large proportion of cash payment → higher liabilities; large proportion of additional issuance → EPS dilution | -1~-2 points |
Impact of M&A Analysis on Scoring
M&A analysis results need to adjust the original score:
Fundamental Score Adjustment:
- Expected revenue growth after M&A > 30%: Fundamentals +1~+2 points
- Expected net profit growth after M&A > 50%: Fundamentals +2 points
- Gross margin improvement after M&A > 5 percentage points: Fundamentals +1 point
- Goodwill/net assets > 50%: Fundamentals -1~-2 points
- Target net profit is negative: Fundamentals -2 points
News Score Adjustment:
- M&A receives regulatory approval/progresses smoothly: News +1~+2 points
- M&A has uncertainty/risk of rejection: News -1~-2 points
- There is a performance commitment and it is credible: News +1 point
M&A Analysis Output Requirements
In the final report, a separate "M&A and Restructuring Analysis" section needs to be added, including:
- M&A Overview: Brief description of the transaction plan (target, consideration, proportion, payment method, announcement date, stock price on announcement date, gain since announcement)
- Target Company Profile: Main business, revenue, net profit, gross margin, industry
- Post-Consolidation Valuation Calculation: Detailed calculations under three scenarios (optimistic/neutral/conservative)
- Stock Price Upside Potential: Expected upside range based on valuation calculation
- Synergy Effect Assessment: List of positive/negative factors
- M&A Risk Disclosure: Core risks such as goodwill, integration, and approval
- Adjustment of M&A Matters to the Comprehensive Score: Clearly mark additions and deductions
Step 6.6: Abnormal Movement Monitoring Analysis (A-shares only)
⚠️ Scope of Application: Only applies to A-shares (Shanghai and Shenzhen Main Boards, ChiNext, STAR Market, Beijing Stock Exchange); this rule does not apply to Hong Kong stocks/U.S. stocks.
Core Value: Before an abnormal movement is triggered, the stock price usually stalls or even pulls back. By calculating the distance between the current deviation value and the abnormal movement threshold, it is possible to provide early warning of the "upside ceiling" and assist sell/take-profit decisions.
Core Concept of Abnormal Movement: Deviation Value
Abnormal movement determination is not simply the accumulation of price changes, but the calculation ofthe deviation value between the individual stock and the corresponding benchmark index, excluding the impact of overall market fluctuations.
Deviation Value Calculation Formula:
偏离值 = 个股区间涨跌幅 - 对应基准指数区间涨跌幅
Benchmark Index Comparison Table:
| Board | Benchmark Index | Index Code |
|---|---|---|
| Shanghai Main Board (60xxxx) | Shanghai Composite Index | sh000001 |
| Shenzhen Main Board (00xxxx) | Shenzhen Composite Index | sz399106 |
| ChiNext (30xxxx) | ChiNext Composite Index | sz399102 |
| STAR Market (688xxx) | STAR 50 Index | sh000688 |
| Beijing Stock Exchange (8xxxxx/4xxxxx) | BSE 50 Index | bj899050 |
Criteria for Determining Abnormal Fluctuation (Ordinary Abnormal Movement)
| Board | Statistical Period | Trigger Condition (cumulative deviation value of closing price change) | Special Circumstances |
|---|---|---|---|
| Shanghai and Shenzhen Main Boards | 3 consecutive trading days | ≥ ±20% | ST/*ST stocks are ≥ ±12% |
| ChiNext | 3 consecutive trading days | ≥ ±30% | - |
| STAR Market | 3 consecutive trading days | ≥ ±30% | - |
| Beijing Stock Exchange | Most recent 3 trading days with transactions | ≥ ±40% | The statistical window shall not exceed 20 trading days |
Supplementary Trigger Conditions for Shanghai and Shenzhen Main Boards (Turnover Rate Abnormal Movement):
- Within 3 consecutive trading days, the ratio of the average daily turnover rate to the average daily turnover rate of the previous 5 trading days reaches 30 times
- And the cumulative turnover rate within these 3 trading days reaches 20%
Criteria for Determining Severe Abnormal Fluctuation
| Trigger Scenario | Shanghai and Shenzhen Main Board Standards | ChiNext/STAR Market Standards |
|---|---|---|
| Frequency Trigger | Within 10 consecutive trading days, same-direction abnormal fluctuation occurs 4 times | Within 10 consecutive trading days, same-direction abnormal fluctuation occurs 3 times |
| Amplitude Trigger (10 days) | Cumulative deviation value ≥ +100% or ≤ -50% | Same as left |
| Amplitude Trigger (30 days) | Cumulative deviation ≥ +200% or ≤ -70% | Same as above |
Data Acquisition Methods
Data to Be Acquired:
| Data Item | Acquisition Method | Description |
|---|---|---|
| Closing prices of the individual stock over the most recent 3 trading days | K-line API / Selenium | Used to calculate the interval price change of the individual stock |
| Closing prices of the benchmark index over the most recent 3 trading days | K-line API | Used to calculate the interval price change of the index |
| Closing prices of the individual stock over the most recent 10/30 trading days | K-line API | Used to calculate severe abnormal fluctuation indicators |
| Closing prices of the benchmark index over the most recent 10/30 trading days | K-line API | Used to calculate severe abnormal fluctuation indicators |
| ST/*ST designation | East Money detail page / F10 | Determine whether special thresholds apply |
| Daily turnover rate (most recent 8 trading days) | K-line API / detail page | Required only for Shanghai and Shenzhen main boards, used for turnover rate abnormal fluctuation determination |
Acquire benchmark index data via K-line API:
# 上证指数
https://push2his.eastmoney.com/api/qt/stock/kline/get?secid=1.000001&fields1=f1,f2,f3,f4,f5,f6&fields2=f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61&klt=101&fqt=1&end=20500101&lmt=35
# 深证综指
https://push2his.eastmoney.com/api/qt/stock/kline/get?secid=0.399106&fields1=f1,f2,f3,f4,f5,f6&fields2=f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61&klt=101&fqt=1&end=20500101&lmt=35
# 创业板综指
https://push2his.eastmoney.com/api/qt/stock/kline/get?secid=0.399102&fields1=f1,f2,f3,f4,f5,f6&fields2=f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61&klt=101&fqt=1&end=20500101&lmt=35
# 科创50
https://push2his.eastmoney.com/api/qt/stock/kline/get?secid=1.000688&fields1=f1,f2,f3,f4,f5,f6&fields2=f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61&klt=101&fqt=1&end=20500101&lmt=35
Abnormal Fluctuation Analysis Calculation Process
Step 1: Determine the board and corresponding threshold
if 股票代码.startswith('60') → 沪深主板,阈值20%,基准=上证指数
elif 股票代码.startswith('00') → 沪深主板,阈值20%,基准=深证综指
elif 股票代码.startswith('30') → 创业板,阈值30%,基准=创业板综指
elif 股票代码.startswith('688') → 科创板,阈值30%,基准=科创50
elif 股票代码.startswith('8') or 股票代码.startswith('4') → 北交所,阈值40%,基准=北证50
如果是 ST/*ST 且为沪深主板 → 阈值改为12%
Step 2: Calculate the 3-day deviation
个股3日涨跌幅 = (今日收盘价 / 3个交易日前收盘价 - 1) × 100%
指数3日涨跌幅 = (今日指数收盘 / 3个交易日前指数收盘 - 1) × 100%
3日偏离值 = 个股3日涨跌幅 - 指数3日涨跌幅
Step 3: Calculate the abnormal fluctuation distance (core output)
异动阈值距离 = 板块阈值 - |当前3日偏离值|
异动触发进度 = |当前3日偏离值| / 板块阈值 × 100%
Step 4: Calculate the 10-day/30-day deviation (severe abnormal fluctuation indicators)
个股10日涨跌幅 = (今日收盘价 / 10个交易日前收盘价 - 1) × 100%
指数10日涨跌幅 = (今日指数收盘 / 10个交易日前指数收盘 - 1) × 100%
10日偏离值 = 个股10日涨跌幅 - 指数10日涨跌幅
30日偏离值同理
Abnormal Fluctuation Warning Levels
| 3-day deviation progress | Warning Level | Meaning | Suggestion |
|---|---|---|---|
| ≥100% | 🔴 Abnormal fluctuation triggered | Has reached the abnormal fluctuation standard | The company will issue an announcement; short-term stock price is highly likely to stall/pull back; taking profits is recommended |
| 80%-99% | 🟠 Approaching abnormal fluctuation | Only one step away from triggering abnormal fluctuation | Upside is extremely limited; strongly recommend reducing positions/taking profits |
| 60%-79% | 🟡 Abnormal fluctuation alert | Deviation is relatively large; close attention is needed | Watch the next day's movement; if it continues to rise sharply, abnormal fluctuation may be triggered |
| 40%-59% | 🟢 Mild deviation | Some deviation but still far from abnormal fluctuation | Hold normally; watch for the risk of accelerating gains |
| <40% | ⚪ Safe range | Deviation is small; abnormal fluctuation risk is low | No need to worry about abnormal fluctuation restrictions |
Severe abnormal fluctuation warning:
| Indicator | Warning Condition | Description |
|---|---|---|
| 10-day deviation | ≥ +80% (only 20% from the +100% threshold) | Approaching the severe abnormal fluctuation upper limit |
| 10-day deviation | ≤ -40% (only 10% from the -50% threshold) | Approaching the severe abnormal fluctuation lower limit |
| 30-day deviation | ≥ +160% (only 40% from the +200% threshold) | Approaching the severe abnormal fluctuation upper limit |
| 30-day deviation | ≤ -56% (only 14% from the -70% threshold) | Approaching the severe abnormal fluctuation lower limit |
Impact of Abnormal Fluctuation Analysis on Scoring
Technical Score Adjustment:
| Condition | Score Adjustment | Description |
|---|---|---|
| 3-day deviation progress ≥ 100% (triggered) | -2 points | Abnormal movement triggered, extremely high risk of short-term pullback |
| 3-day deviation progress 80%-99% (approaching) | -1.5 points | Upside potential severely limited |
| 3-day deviation progress 60%-79% (warning) | -1 point | Risk of triggering abnormal movement |
| 10-day deviation ≥ +80% or ≤ -40% | -1 point (additional) | Approaching severe abnormal movement |
| 30-day deviation ≥ +160% or ≤ -56% | -1 point (additional) | Approaching severe abnormal movement |
Impact on investment recommendations:
| Abnormal movement status | Adjustment to buy recommendation |
|---|---|
| 🔴 Abnormal movement triggered | Clearly mark "not suitable for chasing gains in the short term"; entry price should be after the abnormal movement pullback |
| 🟠 Approaching abnormal movement | Mark "upside potential limited"; target price should consider the abnormal movement ceiling |
| 🟡 Abnormal movement warning | Mark "pay attention to abnormal movement risk"; take-profit level may be appropriately lowered |
Abnormal movement analysis output requirements
After the technical analysis section in the report, add a "Abnormal Movement Monitoring" sub-section, including:
- Sector information: sector, abnormal movement threshold, benchmark index, ST designation
- 3-day deviation analysis: stock 3-day change, index 3-day change, deviation, abnormal movement progress, warning level
- Severe abnormal movement monitoring: 10-day/30-day deviation, distance to severe abnormal movement threshold
- Abnormal movement ceiling estimate: based on the current deviation, estimate the maximum upside potential for the stock when abnormal movement is triggered
- Regulatory measure reminders: explanations of information disclosure, trading suspension review, dragon-tiger list disclosure, etc. after triggering
Abnormal movement ceiling estimation formula:
剩余异动空间 = 板块阈值 - 当前3日偏离值
异动天花板价格 = 当前股价 × (1 + 剩余异动空间/100)
(注意:此为极端估算,实际中指数也会变动)
⚠️ Notes:
- Stocks without price limit restrictions (first day of new stock listing, first day of resumption of listing, etc.) are not included in abnormal movement calculation
- If the index fluctuates significantly, situations such as "stock hits limit up but abnormal movement is not triggered" or "stock does not hit limit up but abnormal movement is triggered" may occur
- Abnormal movement analysis is for auxiliary reference and should not be the sole basis for selling
Step 7: Comprehensive analysis and recommendations
Conduct a comprehensive assessment based on all the above data:
Scoring system
| Dimension | Weight | Assessment points |
|---|---|---|
| Fundamentals | 35% | Whether PE/PB is reasonable, ROE level, growth, profitability, financial health |
| News | 20% | Whether there are major positive/negative factors, industry policies, earnings expectations, institutional ratings |
| Capital flows | 35% | Main force net ratio (core indicator), main force capital trends, northbound capital increases/decreases, margin balance trends |
| Technical | 10% | Trend judgment, support and resistance levels, volume-price coordination |
⚠️ Important notes: The weight of capital flow has been increased to 35%, among which "main force net ratio" is the core evaluation indicator, read directly from the East Money page (no calculation required), and can directly reflect the market's main force attitude for the day.
Scoring Criteria
Fundamental Scoring (out of 10 points):
- PE lower than industry average and ROE > 15%: +3 points
- Net profit growth rate > 20%: +2 points
- Gross margin > 30%: +2 points
- Debt-to-asset ratio < 50%: +2 points
- Healthy cash flow: +1 point
News Scoring (out of 10 points):
- Major positive announcement: +3 points
- Institutional rating is Buy/Overweight: +2 points
- Favorable industry policy: +2 points
- No negative public opinion: +2 points
- Positive performance expectations: +1 point
Capital Flow Scoring (out of 10 points):
| Indicator | Condition | Score | Description |
|---|---|---|---|
| ⭐Main force net ratio | >10% | +4 points | Core indicator, read directly from the page, reflecting the main force attitude for the day |
| ⭐Main force net ratio | 5%-10% | +3 points | Main force clearly entering |
| ⭐Main force net ratio | 0%-5% | +2 points | Main force small inflow |
| ⭐Main force net ratio | -5%-0% | +1 point | Main force small outflow |
| ⭐Main force net ratio | <-5% | +0 points | Main force clear outflow |
| 5-day main force net inflow | > 100 million | +2 points | Medium-term capital trend |
| Northbound capital | Increasing holdings | +2 points | Foreign capital attitude |
| Super-large order net inflow | Positive | +1 point | Institutional capital movement |
| Turnover rate | 3%-8% | +1 point | Moderate trading activity |
Main force net ratio data source:
页面:https://data.eastmoney.com/zjlx/{股票代码}.html
位置:实时资金流向区域 → "今日主力净流入"右侧
格式:如 "主力净比:17.23%"
✅ Read page data directly, no manual calculation required!
Interpretation of Capital Flow Scoring:
- 8-10 points: Main force strongly entering, short-term bullish
- 6-8 points: Main force moderately inflow, worth watching
- 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 clearly withdrawing, avoid
Investment Recommendation Levels
| Overall Score | Recommendation Level |
|---|---|
| 8-10 points | Strongly Recommend |
| 6-8 points | Recommend Buy |
| 4-6 points | Wait and See |
| 2-4 points | Operate Cautiously |
| 0-2 points | Recommend Avoid |
Buy and Sell Price Calculation
Buy Price:
- Entry price: current price × 0.95-0.98 (enter on a 5%-2% pullback)
- Add-on price: near support level or moving average support level
Target Price:
- Refer to institutional target price
- PE valuation method: reasonable PE × forecast EPS
- Near resistance level
Stop-loss price:
- Breaks below support level
- Usually set at 92%-95% of the buy price
Step 8: Generate visualized HTML report (must be executed)
After the analysis is complete,a visualized HTML webpage report must be generatedand saved to the user's working directory.
HTML report requirements
-
File naming:
{股票代码}_{股票名称}_分析报告_{日期}.html- Example:
603618_杭电股份_分析报告_20260226.html
- Example:
-
Save location: the user's current working directory
-
Report content: consistent with the Markdown report content, but presented as a visualized webpage
-
Use template: use
assets/report_template.htmlas the HTML template
HTML report features
- 📊 Visualized charts: use progress bars and gauges to display scores
- 🎨 Beautiful styling: modern UI design, responsive layout
- 📱 Print support: can be printed directly or exported to PDF
- 🔗 Interactive links: includes quick links to relevant East Money pages
Generation process
- Read the
assets/report_template.htmltemplate - Fill the analysis data into the template
- Use the
write_to_filetool to save the HTML file - Use the
preview_urltool to preview in the browser (optional)
Output format
After the analysis is complete, reports need to be output in two formats:
1. Command-line output (Markdown format)
Output the 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 sentiment
- Capital flow analysis: main 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 warning
2. Visualized webpage report (HTML format)
Use the assets/report_template.html template to generate a visualized webpage:
- Generate and save the HTML file
- Inform the user of the file save location
- Provide a preview link (if feasible)
Drill-down strategy
During the analysis process, access each subpage in depth as needed:
登录引导 → 主页搜索 → 搜索结果页 → 股票详情页 → 下钻各数据页面 → 生成报告
↓
┌───────────────┼───────────────┐
↓ ↓ ↓
F10资料页 资金流向页 公告新闻页
↓ ↓ ↓
财务分析 主力追踪 研究报告
股东研究 北向资金
公司概况 融资融券
↓
┌─────────┴─────────┐
↓ ↓
Markdown报告 HTML报告
(命令行输出) (文件保存)
📊 Data source tracking (important!)
Why is data source tracking needed?
To ensure the transparency and credibility of the report,the source status of each data item must be displayed in the final report:
- Users can clearly know which data comes from East Money (authoritative source)
- Users can identify which data is supplemented through search engines
- Users can understand which data failed to be obtained or was not obtained
Data source status definitions
| Status | Identifier | Description |
|---|---|---|
| ✅ East Money | [东财] |
Successfully retrieved from Eastmoney |
| 🔄 Search supplement | [搜索] |
Eastmoney retrieval failed, supplemented via search engine |
| ❌ Retrieval failed | [失败] |
Unable to retrieve this data |
| ⚪ Not referenced | [未获取] |
Did not attempt to retrieve this data |
Core data source requirements
The following datamust be preferentially retrieved from Eastmoney, and the source status must be indicated in the report:
| Data item | Eastmoney URL | Priority |
|---|---|---|
| Current stock price | Detail page quote.eastmoney.com |
🔴 Required |
| Change percentage/Change amount | Detail page | 🔴 Required |
| Total market capitalization | Detail page | 🔴 Required |
| PE/PB | Detail page | High |
| Turnover rate | Detail page | Medium |
| Main force net inflow | data.eastmoney.com/zjlx/ |
High |
| Main force net ratio | data.eastmoney.com/zjlx/ |
High |
| Financial indicators (ROE, etc.) | F10 information page | Medium |
| Announcements and news | Announcement/News page | Medium |
Data source display format in the report
In both the HTML report and the Markdown report, a "Data Source Status" section must be added:
Example: Data source status table
## 📡 数据来源状态
| 数据项 | 来源 | 状态 |
|--------|------|------|
| 当前股价 | 东方财富 | ✅ 成功 |
| 涨跌幅 | 东方财富 | ✅ 成功 |
| 总市值 | 东方财富 | ✅ 成功 |
| PE/PB | 东方财富 | ✅ 成功 |
| 主力净流入 | 东方财富 | ✅ 成功 |
| 主力净比 | 东方财富 | ✅ 成功 |
| 财报数据 | 搜索引擎 | 🔄 补充 |
| 分析师目标价 | 搜索引擎 | 🔄 补充 |
| 机构持仓 | - | ❌ 失败 |
> 📊 数据完整度:80% | 东财数据占比:60%
Notes
- Login priority: Before each analysis, first guide the user to log in to Eastmoney to avoid rate limiting
- Search accuracy: If the stock name is ambiguous, multiple results may be returned, and it is necessary to confirm whether it is the stock the user wants
- Data timeliness: Stock data changes in real time, and the analysis results are based on the data at the time of retrieval
- Page access: Some pages may require multiple visits to retrieve complete data
- Alternative plan: If access to Eastmoney is restricted, use
web_searchas a supplementary data source - Dual output: A Markdown report and an HTML report must both be output
- Data source annotation: A data source status table must be displayed in the report so that users can clearly understand data reliability
- Market code reference table:
| Market | URL path format | Example URL |
|---|---|---|
| 🇨🇳 A-shares - Shanghai Stock Exchange | quote.eastmoney.com/sh{代码}.html |
sh600519.html |
| 🇨🇳 A-shares - Shenzhen Stock Exchange | quote.eastmoney.com/sz{代码}.html |
sz300750.html |
| 🇨🇳 A-shares - Beijing Stock Exchange | quote.eastmoney.com/bj{代码}.html |
bj830799.html |
| 🇭🇰 Hong Kong stocks | quote.eastmoney.com/hk/{代码}.html |
hk/00700.html |
| 🇺🇸 US stocks | quote.eastmoney.com/us/{代码}.html |
us/MU.html, us/AAPL.html |
⚠️ Important: The old
unify/r/116.(Hong Kong stocks) andunify/r/105.(US stocks) paths are no longer valid! Please use the new/hk/and/us/paths!
-
Special notes for Hong Kong and US stocks:
- Hong Kong stocksuse the
quote.eastmoney.com/hk/{代码}.htmlpath - US stocksuse the
quote.eastmoney.com/us/{代码}.htmlpath - Hong Kong and US stocks may not have a complete F10 profile page; use
web_searchto supplement fundamental data - Hong Kong and US stock capital flow data may differ in format from A-shares and need to be handled flexibly
- US stock tickers are English letters (e.g., AAPL, MU, TSLA), while Hong Kong stocks are numbers (e.g., 00700)
- Hong Kong stocksuse the
-
Common US Stock Ticker 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