Based on the user's investment preferences and areas of interest, scan market opportunities and recommend targets worth watching.
How to use
/scan- Default broad-spectrum scan (watch pool + market hotspots)/scan AI- Focused scan of AI-related opportunities/scan 半导体- Focused scan of the semiconductor sector/scan 趋势- Look for targets with clear recent trends
Execution steps
Step 1: Read user preferences
Read the following configuration files to understand the user's investment preferences:
股市信息/Config/Profile.md- Investment style, risk preference股市信息/Config/Watchlist.md- Areas of interest, exclusion list股市信息/Config/Holdings.md- Current holdings (to avoid duplicate recommendations)
Step 2: Determine the scan scope
- If the userhas not specifieda direction: perform abroad-spectrum scan = watch pool + industry/concept hotspots + capital flows
- If the userhas specifieda direction: focus only on the relevant industry/theme
Step 3: Obtain market data (core step)
Run the data acquisition script:
cd "股市信息" && python3 scripts/fetch_market_data.py
The script output includes:
indices: Major index dataholdings: Holdings quotes (including ETF/A-shares/Hong Kong stocks/funds, withtechnicals)watchlist: Watch pool quotes (from Watchlist.md, withwatch_reason/core_metrics/ideal_buy/status, withtechnicals)watchlist_meta: Summary of areas of interest and exclusion listmacro: Macroeconomic data (PMI, CPI, M2)north_flow: Northbound capital data (prefer the intraday real-time value of the day, may include a time field)sector: Industry/concept sector rankings (gains/losses, turnover, number of advancing stocks, leading stocks)fund_flow: Industry/concept capital flows (net inflow, leading stocks)news: Cailian Press real-time news flashes (replacing WebSearch)
Must strictly comply:
- Wait for the script to finish executing(about 1-2 minutes)
- Only use the data from the script's JSON output
- When the script fails, inform the user; fabricating data is prohibited
Step 3: Analyze based on the script data
Give priority to using the data output by the script for analysis:
-
Market hotspot judgment:
- From
indicesjudge the market style (large-cap/small- and mid-cap) - From
north_flowjudge foreign capital attitude (if time is included, note it as well) - From
newsnews flashes, extract the day's hotspot themes
- From
-
Industry/concept strength:
- From
sector.industry/sector.conceptidentify strong sectors and divergence - With
watchlist_meta.focus_industriesdo matching and trade-offs
- From
-
Capital confirmation:
- From
fund_flow.industry/fund_flow.conceptcheck the net inflow direction - If gains are among the top but capital turns negative → warn of the risk of fading heat
- From
-
Broad-spectrum candidate screening (when the user has not specified a direction):
- From
sector/fund_flowselect strong sectors - Prefer using sector leading stocks/related ETFs as candidates
- If there is only a name and no code, note "code needs further confirmation"
- From
-
Watch pool opportunity screening:
- From
watchlistView the watchlist targets' performance - Combine
technicalsto judge trend/position (trend、rsi14、price_percentile_1y) - Compare price changes and capital flows to identify signs of initiation or acceleration
- From
-
Macro environment analysis:
- From
macroobtain PMI/CPI and other data - Judge the position in the economic cycle
- From
Step 4: Supplementary search (only when necessary)
Only use WebSearch in the following situations:
- Need to learn the latest announcements of a specific company
- Need to look up the original policy text
- The user explicitly requests a search for certain information
WebSearch precautions:
- Search results may have timeliness errors and must be marked "Source: web search"
- Prioritize authoritative sources (CSRC, exchanges, company official websites)
- For price data, use script output as the standard and do not use search results
Step 5: Screening and analysis
Screening criteria(based on the user Profile):
- Matches the user's focus areas
- Not on the exclusion list
- Does not highly overlap with existing holdings
- Has a clear investment logic
- Broad-spectrum candidates need dual support from "industry strength + capital confirmation"
Analysis dimensions:
- Industry strength: sector ranking, number of gainers, concentration of leading stocks
- Capital confirmation: whether industry/concept net inflows are synchronized
- Technical structure: trend, position, overbought/oversold (
technicals) - Valuation level: whether the current valuation is reasonable
- Risk points: what are the main risks
- Trigger/invalidation conditions: executable entry and veto conditions
- Scorecard: form comparable recommendation priorities
Step 6: Generate the scan report
# 市场扫描报告 YYYY-MM-DD
## 扫描范围
未明确方向 → 关注池 + 市场广谱热点
明确方向 → 仅聚焦:XX
## 一、市场环境
### 指数表现
| 指数 | 点位 | 涨跌 | 判断 |
|------|------|------|------|
| 上证指数 | X | +X% | ... |
| 科创50 | X | +X% | 科技风格占优 |
### 宏观数据
- PMI: X(荣枯线上/下)
- CPI: X%(通胀温和/偏高)
- 北向资金:今日净流入/出 X亿(时间:HH:MM)
### 市场快讯摘要
(从脚本news数据提取与关注方向相关的3-5条)
- ...
## 二、行业与资金
### 行业强度榜(Top 5)
| 行业 | 涨幅 | 上涨/下跌家数 | 领涨股 | 备注 |
|------|------|---------------|--------|------|
| ... | ... | ... | ... | 与关注方向关联度 |
### 概念强度榜(Top 5)
| 概念 | 涨幅 | 上涨/下跌家数 | 领涨股 | 备注 |
|------|------|---------------|--------|------|
| ... | ... | ... | ... | 与关注方向关联度 |
### 行业资金流(Top 5)
| 行业 | 净流入 | 涨幅 | 领涨股 | 备注 |
|------|--------|------|--------|------|
| ... | ... | ... | ... | 资金与涨幅是否一致 |
### 概念资金流(Top 5)
| 概念 | 净流入 | 涨幅 | 领涨股 | 备注 |
|------|--------|------|--------|------|
| ... | ... | ... | ... | 资金与涨幅是否一致 |
## 三、机会推荐(最多3个)
### 推荐标的1(来源:关注池/广谱):[代码] [名称]
| 维度 | 分析 |
|------|------|
| **当前价格** | X.XX(来源:AKShare) |
| **板块强度** | 行业/概念排名、上涨家数、领涨股强度 |
| **资金确认** | 净流入/净流出是否与涨幅一致 |
| **行业逻辑** | ... |
| **近期催化** | ... |
| **估值水平** | ... |
| **技术面** | MA/RSI/1年位置等 |
| **风险点** | ... |
| **建议操作** | 观望/关注/可小仓位试探 |
| **理想买点** | 回调到X.XX可考虑(约-X%) |
| **止损位** | X.XX |
**评分卡(100分)**
| 维度 | 证据 | 分数 |
|------|------|------|
| 行业强度(25) | ... | ... |
| 资金确认(20) | ... | ... |
| 技术结构(20) | ... | ... |
| 估值/基本面(20) | ... | ... |
| 持仓互补(15) | ... | ... |
| **总分** | - | XX |
**触发条件**:
- ...
**失效条件**:
- ...
**为什么适合您**:
- 符合您对XX行业的关注
- 与您现有持仓的关联/互补关系
- 风险等级与您的承受能力匹配
### 推荐标的2:...
### 推荐标的3:...
## 四、关注池更新建议
基于本次扫描,建议更新您的关注池:
| 操作 | 标的 | 原因 |
|------|------|------|
| 新增 | XXX | ... |
| 移除 | XXX | ... |
| 调整态度 | XXX | 从"观望"改为"关注" |
## 五、趋势观察
### 正在形成的趋势
- ...
### 需要警惕的风险
- ...
## 六、下一步建议
1. 如果想深入了解某个标的 → `/analyze 代码`
2. 如果决定买入 → 执行后用 `/trade` 记录
---
*数据来源:AKShare(行情、宏观、板块、资金)、财联社(快讯)*
*扫描时间:YYYY-MM-DD HH:MM*
Step 7: Save the scan record
- Save to:
股市信息/Scan/YYYY-MM-DD-Scan.md - The file name matches the scan date, making it easy to review and compare
Step 8: Ask about follow-up actions
After the scan is complete, ask the user:
- Do you need an in-depth analysis of a recommended target?
- Do you want to update the watchlist?
- Do you want to adjust the focus areas?
Recommendation principles
- Quality first: Better to recommend fewer than to recommend indiscriminately, with a maximum of 3 recommendations each time
- Clear logic: Every recommendation must have a clear investment logic
- Risk warning: The risk points and stop-loss level must be stated
- Do not chase highs: Targets that have already risen sharply can only be observed, not recommended for entry
- Matches style: Recommendations must match the user's investment style (medium- to long-term, value + trend)
Data authenticity assurance (extremely important)
Data source priority
-
First priority: script output
- Price, price change, volume → must come from the script JSON
- Macro data (PMI/CPI/M2) → comes from the script JSON
- Northbound capital → comes from the script JSON
- Real-time news flashes → come from the news field of the script JSON
-
Second priority: configuration files
- User holdings → Holdings.md
- Focus areas → Watchlist.md
- Investment style → Profile.md
-
Third priority: WebSearch (use with caution)
- Only for information that cannot be obtained through scripts, such as original policy texts and company announcements
- Must be labeled "Source: Web Search"
- Price data shall be based on scripts
Prohibited Actions
- ProhibitedEstimating or assuming prices
- ProhibitedUsing outdated data from memory
- ProhibitedFabricating data when scripts fail
- ProhibitedConfusing data from different sources
Price Display Format
当前价格:X.XXX(来源:AKShare,获取时间:YYYY-MM-DD HH:MM)
Important Reminder
- This tool provides analysis and suggestions and does not constitute investment advice
- All investment decisions are made and borne by users themselves
- Recommended targets do not guarantee profit; investing involves risk