Based onmacro-industry-individual stockthree-layer analysis framework, data-driven professional investment analysis.
How to use
/analyze 588000 # 分析ETF
/analyze 002594 # 分析A股
/analyze 00700 # 分析港股
/analyze 比亚迪 # 用名称也可以
Core investment framework
┌─────────────────────────────────────────────────┐
│ 投资分析框架 │
├─────────────────────────────────────────────────┤
│ 1. 宏观环境(大势)20分 │
│ ├─ 市场周期:牛市/熊市/震荡 │
│ ├─ 指数趋势:沪深300 vs MA20 │
│ ├─ 资金环境:北向资金流向 │
│ └─ 市场情绪:涨跌比例 │
├─────────────────────────────────────────────────┤
│ 2. 行业分析(中观)20分 │
│ ├─ 板块强弱:相关板块排名 │
│ ├─ 资金流向:板块净流入 │
│ ├─ 相对强度:ETF横向对比 │
│ └─ 政策催化:行业政策动向 │
├─────────────────────────────────────────────────┤
│ 3. 个股分析(微观)60分 │
│ ├─ 趋势:均线排列+多周期共振 │
│ ├─ 动能:MACD+RSI │
│ ├─ 量价:量比+量价配合+背离 │
│ └─ 位置:ATR止损+支撑压力 │
├─────────────────────────────────────────────────┤
│ 4. 交易策略 │
│ ├─ 买点:理想/激进价位 │
│ ├─ 止损:ATR动态止损 │
│ └─ 目标:压力位参考 │
└─────────────────────────────────────────────────┘
Data source priority
| Priority | Source | Purpose |
|---|---|---|
| 1 | fetch_full_analysis.py |
Full set of macro + industry + technical data |
| 2 | User configuration file | Holdings, focus directions, investment style |
| 3 | WebSearch | Used only forFinancial reports, announcements, research reports |
Prohibited actions
- ❌ Use WebSearch to obtain price data
- ❌ Fabricate technical indicators
- ❌ Skip analysis when the script fails
- ❌ Vague judgments without data support
Execution steps
Step 1: Run the complete analysis script (mandatory)
cd "股市信息" && python3 scripts/fetch_full_analysis.py <代码>
Hong Kong stocks:
cd "股市信息" && python3 scripts/fetch_full_analysis.py 00700 --market hk
Step 2: Interpret the script output
Core modules output by the script:
| Module | Field | Description |
|---|---|---|
| Macro | macro.indices |
Major index gains and losses |
macro.market_trend |
Bull market/bear market/range-bound judgment | |
macro.north_flow |
Northbound capital flows | |
macro.market_sentiment |
Advancers/decliners ratio | |
| Industry | sector.related_sectors |
Performance of related sectors |
sector.sector_flow |
Sector capital inflows | |
sector.etf_comparison |
ETF horizontal comparison | |
sector.relative_strength |
Leading/lagging in gains/lagging in declines | |
| Technical | technical.trend |
Moving average trend |
technical.macd |
MACD status | |
technical.rsi |
RSI overbought/oversold | |
technical.atr |
ATR stop-loss reference | |
technical.volume |
Volume-price coordination | |
| Score | score |
Comprehensive score on a 100-point scale |
Step 3: Read the user configuration
股市信息/Config/Holdings.md → 是否已持有
股市信息/Config/Watchlist.md → 关注方向
股市信息/Config/Profile.md → 投资风格
Step 4: WebSearch supplement (only when necessary)
Use only in the following situations:
- The company's latest financial report
- Recent major announcements
- Institutional research reports/target prices
Sources and dates must be indicated
Detailed explanation of the analysis framework
1. Macro environment analysis (20 points)
Script output macro fields:
{
"market_trend": {
"cycle": "牛市",
"cycle_score": 2,
"hs300_vs_ma20": 1.51
},
"north_flow": {
"5d_total": 150.5,
"consecutive_days": 3,
"direction": "流入",
"signal": "外资积极"
},
"market_sentiment": {
"up_ratio": 65.2,
"sentiment": "偏乐观"
}
}
Market cycle judgment rules:
| Condition | Cycle | Score |
|---|---|---|
| CSI 300 > MA20 and 60-day gain > 0 | Bull market | +12 |
| CSI 300 < MA20 and 60-day decline > 10% | Bear market | +4 |
| Other | Range-bound | +8 |
Northbound capital signal:
| 5-day cumulative | Direction | Score |
|---|---|---|
| > 5 billion | Continuous inflow | +8 |
| < -5 billion | Continuous outflow | +2 |
| Other | Neutral | +4 |
2. Industry analysis (20 points)
Script output sector fields:
{
"related_sectors": [
{"name": "半导体概念", "change": 2.34, "turnover": 5.95},
{"name": "存储芯片", "change": 1.13, "turnover": 4.27}
],
"sector_flow": [
{"name": "半导体概念", "net_flow": 38.8亿, "net_ratio": 0.88}
],
"etf_comparison": [
{"code": "159995", "name": "芯片ETF", "change": 1.16},
{"code": "588000", "name": "科创50ETF", "change": -0.38}
],
"relative_strength": "跟跌"
}
Relative strength judgment:
| ETF vs peers | Relative strength | Score |
|---|---|---|
| Gain ranking in the top 30% | Leading gains | +15 |
| Gain close to average | Following gains | +10 |
| Gain ranking in bottom 30% | Following declines | +5 |
Sector fund flows:
| Related sector net inflow | Signal | Score |
|---|---|---|
| Mostly inflow | High sector heat | +5 |
| Mostly outflow | Sector cooling off | +0 |
III. Individual Stock Technical Analysis (60 points)
Trend Analysis (25 points)
{
"trend": {
"status": "多头排列",
"score": 2
}
}
| Moving average status | Score |
|---|---|
| Bullish alignment (MA5>MA10>MA20>MA60) | +25 |
| Leaning bullish (price>MA20) | +15 |
| Tangled | +10 |
| Bearish alignment | +5 |
Momentum Indicators (15 points)
{
"macd": {"signal": "多头"},
"rsi": {"value": 65, "signal": "中性"}
}
| MACD status | Score |
|---|---|
| Golden cross/bullish | +10 |
| Death cross/bearish | +5 |
| RSI status | Score |
|---|---|
| Neutral (30-70) | +5 |
| Overbought (>70) or oversold (<30) | +3 |
Volume-Price Analysis (10 points)
{
"volume": {
"ratio": 0.87,
"vol_price": "量价平稳"
}
}
| Volume-price relationship | Score |
|---|---|
| Rising with increased volume | +10 |
| Stable volume and price | +6 |
| Rising with reduced volume | +4 |
| Falling with increased volume | +2 |
ATR Stop-Loss (10 points)
{
"atr": {
"value": 0.0382,
"stop_loss": 1.4966,
"stop_loss_pct": -4.86
}
}
Stop-loss suggestion:
- Conservative: 1x ATR
- Standard: 2x ATR → Use
stop_loss - Aggressive: 3x ATR
Comprehensive Scoring System
| Dimension | Full score | Evaluation content |
|---|---|---|
| Macro | 20 | Market cycle + northbound funds |
| Industry | 20 | Relative strength + sector funds |
| Technical | 60 | Trend + momentum + volume-price + position |
| Total score | 100 |
Score grades:
| Score | Grade | Suggestion |
|---|---|---|
| 80-100 | Strong | Can actively participate |
| 65-79 | Leaning strong | Can moderately participate |
| 50-64 | Neutral | Mainly wait and see |
| 35-49 | Leaning weak | Cautious |
| 0-34 | Weak | Avoid |
Report template
# [代码] [名称] 深度分析
**分析时间**:YYYY-MM-DD HH:MM
**数据来源**:AKShare v3.0
**分析框架**:宏观-行业-个股
---
## 快速摘要
| 层级 | 判断 | 得分 |
|------|------|------|
| 宏观环境 | 牛市/熊市/震荡 | XX/20 |
| 行业强度 | 领涨/跟涨/跟跌 | XX/20 |
| 技术形态 | 多头/空头/震荡 | XX/60 |
| **综合** | **强势/偏强/中性/偏弱/弱势** | **XX/100** |
---
## 一、宏观环境(大势)
### 市场周期
- 沪深300:XXXX (+X.X%)
- vs MA20:+X.X%
- 判断:**牛市/熊市/震荡**
### 北向资金
- 今日净流入:XX亿
- 5日累计:XX亿
- 连续流入/流出:X天
- 信号:外资积极/观望/撤退
### 市场情绪
- 上涨家数:XXXX
- 下跌家数:XXXX
- 涨跌比:X:X
- 情绪:乐观/中性/悲观
**宏观得分**:XX/20
---
## 二、行业分析(中观)
### 相关板块表现
| 板块 | 涨跌 | 换手 |
|------|------|------|
| XX | +X.X% | X.X% |
### 板块资金流向
| 板块 | 净流入 | 占比 |
|------|--------|------|
| XX | XX亿 | X.X% |
### ETF横向对比
| ETF | 涨跌 | 相对强度 |
|-----|------|----------|
| 目标ETF | X.X% | 领涨/跟跌 |
| 同类ETF | X.X% | |
**行业得分**:XX/20
---
## 三、技术分析(微观)
### 趋势
- 均线排列:多头/空头/纠缠
- MA5/10/20/60位置
### MACD
- DIF: X.XXX
- DEA: X.XXX
- 状态:多头/空头/金叉/死叉
### RSI
- 数值:XX
- 状态:超买/超卖/中性
### 量价
- 量比:X.XX
- 量价配合:健康/警惕/观望
**技术得分**:XX/60
---
## 四、综合评分
| 维度 | 得分 | 满分 | 明细 |
|------|------|------|------|
| 宏观 | XX | 20 | [detail] |
| 行业 | XX | 20 | [detail] |
| 技术 | XX | 60 | [detail] |
| **总分** | **XX** | 100 | **等级** |
---
## 五、交易策略
### ATR动态止损
- 当前ATR:X.XXX (X.X%)
- **建议止损**:X.XX (-X.X%)
### 操作建议
| 场景 | 价格 | 说明 |
|------|------|------|
| 理想买点 | X.XX | 回调到支撑位 |
| 激进买点 | X.XX | 突破确认 |
| 止损位 | X.XX | 2倍ATR |
| 目标位 | X.XX | 压力位附近 |
### 适合您吗
- ✅/❌ 宏观环境支持
- ✅/❌ 行业处于上升周期
- ✅/❌ 技术形态健康
- ✅/❌ 符合您的投资风格
---
*数据来源:AKShare*
*免责声明:本分析基于历史数据,不构成投资建议*
Save and record
Save report
股市信息/Analysis/[代码]-[名称].md
Update Insight.md
Record the core recommendations in the adoption tracking table.
ETF vs individual stock differences
| Item | ETF | Individual stock |
|---|---|---|
| Fund flows | None (look at sector) | Yes |
| Valuation data | None | Yes |
| Financial data | None | Yes |
| Dragon-Tiger List | None | Yes |
| Constituent stocks | Yes | None |
| Analysis focus | Macro + industry + trend | Comprehensive analysis |
Important reminder
- The macro environment determines the direction - Even the best stocks cannot escape a decline in a bear market
- Industry strength determines excess returns - Picking the right industry is more important than picking the right stock
- Technical analysis determines buy and sell points - Even if bullish, wait for the right position
- Stop-loss is the last line of defense - Always set a stop-loss to control risk
- Scores are for reference, not for decision-making - Must be combined with qualitative judgment
Version History
| Version | Date | Update Content |
|---|---|---|
| v1.0 | 2026-01 | Basic Technical Analysis |
| v2.0 | 2026-01 | Added volume-price analysis, multi-timeframe trends, ATR stop-loss |
| v3.0 | 2026-01 | Complete three-layer framework: macro + industry + individual stocks |