A-share Stock Analysis
Overview
Use this skill to manage local A-share watchlists and generate structured trading recommendations through fixed scripts. The standard process does not only look at single-point real-time data; instead, it first checks positions, then judges trends and phases by combining historical and real-time market data, analyzes sectors and the top three strongest stocks within the sector, and finally outputs operational recommendations with process explanations.
Workflow
1. First Determine Request Type
Categorize the task into one of the following types:
- Watchlist Maintenance: Add, move, update, view or delete entries in local watchlists and position pools.
- Metadata Completion: Batch fill in stock abbreviations or concept sectors.
- Data Fetching: Obtain the latest individual stock information, sector leaders or risk events.
- Comprehensive Analysis: Output recommendations of Buy, Watch, Hold, Reduce Position or Sell combined with sector benchmarking and risk prompts.
2. Use Fixed Scripts
Prioritize running the scripts built into this skill, do not temporarily rewrite fetching logic:
scripts/watchlist_manager.py
- Maintain and
- Support to reverse-check stock codes based on names
- Support to automatically fill in stock abbreviations
- Support
enrich --auto-symbol --auto-name
to batch fill empty code and name fields
- When users correct concept sectors, directly write back to entries in
scripts/fetch_stock_profile.py
- Fetch individual stock information, market snapshots, latest fundamentals, capital flows and concept sectors
scripts/fetch_sector_leaders.py
- Parse the concept sectors that stocks belong to, and sort out the top three strongest benchmark stocks
scripts/fetch_risk_events.py
- Prioritize reading the day's risk cache; refresh future performance disclosures, recent financial report releases, share reduction announcements and negative news online when needed
scripts/refresh_daily_risks.py
- Batch refresh the daily risk cache of stock pools and write to local
-
- Summarize data from other scripts, generate fixed output structure and final recommendations
Do not invent another set of data paths unless the scripts are indeed missing required fields. When a script fails, clearly explain the failure point and missing data.
2.1 Fixed Execution Sequence for Comprehensive Analysis
When conducting position analysis, follow the sequence below without skipping steps:
- Check current positions
- Query historical market data of target stocks
- Query real-time market data of target stocks
- Judge trends, current phases and whether key abnormal movements occur by combining historical and real-time market data
- Query sector data of the target stocks and judge sector trends
- Query the top three strongest stocks in the same sector
- Analyze the historical trends and today's performance of these three stocks as horizontal references for the target stocks
- If financial reports have just been disclosed or there is an abnormal sharp drop, supplement with online searches to determine if there are signals of "falling short of expectations"
- Summarize the analysis process and give operational recommendations for each position
2.2 Daily Refresh of Risk Events
Risk prompts should be given as early as possible, rather than only providing explanations after a sharp drop.
- Refresh the risk cache of at least once per trading day
- Risk cache is saved to
data/risk_cache/<symbol>.json
by default
- Prioritize reading the day's cache when analyzing individual stocks; refresh online if the cache is missing
- Key points of refresh include:
- Whether there is a performance disclosure plan in the next few days
- Whether annual reports, quarterly reports or performance forecasts have just been released recently
- Whether there are share reduction announcements recently
- Whether there are obvious negative news recently
Recommended commands (paths below are relative to the root directory of this skill, i.e.,
):
python scripts/refresh_daily_risks.py --bucket positions
python scripts/fetch_risk_events.py 002837 --refresh --pretty
- Windows Task Scheduler can directly call in the plugin root directory
- You can also run
register_daily_refresh_task.ps1
in the plugin root directory to automatically create scheduled tasks at / every day
- Example registration commands:
powershell -NoProfile -ExecutionPolicy Bypass -File .\register_daily_refresh_task.ps1
- If a task with the same name already exists:
powershell -NoProfile -ExecutionPolicy Bypass -File .\register_daily_refresh_task.ps1 -Force
The following contents must be explicitly judged in Step 4:
- Current trend: Upward, oscillating, weakening or breaking below support
- Current phase: Initiation, main uptrend, acceleration, divergence, high-level oscillation, retreat, etc.
- Key abnormal movements: Sharp rise, sharp drop, sudden volume increase, volume increase with stagnant price, volume decrease with rebound, breaking below important moving averages, breaking through stage highs
If key abnormal movements occur, this signal must be explained separately, not just giving conclusions.
Auxiliary online searches are allowed and recommended in any of the following situations:
- Within 3 trading days before or after the financial report disclosure date
- Obvious large drop on the day, e.g.,
- Sharp drop with increased volume
- Users explicitly mention "performance falling short of expectations" or "financial report thunder"
The purpose of searching is not to replace market data, but to judge whether there is such additional information:
- Whether the financial report falls below market expectations
- Whether there are negative statements in performance bulletins, performance forecasts, annual reports or quarterly reports
- Whether the mainstream market interpretation attributes the day's sharp drop to financial reports falling short of expectations
3. Prioritize Local Coverage for Sectors
First check the
field in entries of
. If it is not filled, then parse the concept sector in real-time via
or
. When users explicitly correct concept sectors, directly write back to the entries via
.
3.1 Fill in Names First, Then Sectors
If users only provide stock names without codes, first use
to automatically reverse-check codes:
- Single entry addition:
- Batch completion:
If the
field of local entries is empty, prioritize using
to automatically fill in stock abbreviations:
- Single entry addition or update: or
- Batch completion:
If real-time completion of codes, names or sectors fails:
- Clearly explain the source of failure, such as or
- Retain existing local data, do not overwrite with guessed values
4. Output in Fixed Structure
When conducting comprehensive analysis, always output in the following order:
- Basic information of the target stock
- Historical market data and trend judgment
- Real-time market data and key abnormal movements
- Belonging concept sector and sector trend
- Benchmark table of the top three strongest stocks in the sector
- Reference of historical trends and today's performance of benchmark stocks
- Scores of technical aspects, fundamental aspects and risk aspects
- Recommended action: , , , ,
- Position recommendation
- Stop-loss and take-profit conditions
- Risk event prompts
- Brief conclusion
5. Conservatively Handle Failure Scenarios
If real-time data is incomplete or unavailable:
- Explain which script failed and which fields are missing.
- If users have provided data, it can be used, but must be clearly marked as user-provided.
- Do not give strong conclusions when sector benchmarking or risk events are unavailable.
- If fails to be parsed, must clearly prompt users whether to manually supplement sector information and re-run the analysis, cannot silently skip the sector link.
Data Files
This skill stores local status under
:
- : Watchlists and position pools
- : Daily risk scan results saved by stock
Reference Materials
Load these files as needed:
-
- Data source priorities, real-time data assumptions, and fallback methods for failures
-
- Local JSON layout and field descriptions
-
- Scoring rules for technical aspects, fundamental aspects and risk aspects
-
- Fixed benchmark table and conclusion structure