Skip to content
Back to skills

A Share Valuation Band

ASecurity

A股估值分位/历史估值区间分析。当用户说"估值分位"、"历史估值"、"估值贵不贵"、"XX现在贵吗"、"估值百分位"、"PE分位"、"PB分位"、"估值区间"、"历史PE"、"valuation band"时触发。基于 cn-stock-data 历史行情和财务数据,计算个股或指数当前估值在历史区间中的分位数位置,判断估值高低。支持研报风格(formal)和快速判断风格(brief)。不适用于 DCF 估值(用 a-share-dcf)或可比公司(用 a-share-comps)。

  • 232 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 7, 2026
toolspythonbash

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 7, 2026

npx -y skills add aifinlab/FinClaw --skill a-share-valuation-band --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of A Share Valuation Band?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for A Share Valuation Band
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aifinlab-a-share-valuation-band/badge)](https://www.skillsdirectory.com/skills/aifinlab-a-share-valuation-band)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: a-share-valuation-band
description: A股估值分位/历史估值区间分析。当用户说"估值分位"、"历史估值"、"估值贵不贵"、"XX现在贵吗"、"估值百分位"、"PE分位"、"PB分位"、"估值区间"、"历史PE"、"valuation band"时触发。基于 cn-stock-data 历史行情和财务数据,计算个股或指数当前估值在历史区间中的分位数位置,判断估值高低。支持研报风格(formal)和快速判断风格(brief)。不适用于 DCF 估值(用 a-share-dcf)或可比公司(用 a-share-comps)。
---

# A股估值分位/历史估值区间分析

## 数据源

```bash
SCRIPTS="$SKILLS_ROOT/cn-stock-data/scripts"

# 近3-5年K线(计算历史估值区间)
python "$SCRIPTS/cn_stock_data.py" kline --code [CODE] --freq daily --start [3年前日期]

# 当前行情(最新PE/PB)
python "$SCRIPTS/cn_stock_data.py" quote --code [CODE]

# 财务数据(历史ROE/利润等)
python "$SCRIPTS/cn_stock_data.py" finance --code [CODE]
```

补充:通过 web 搜索获取指数 PE/PB 历史数据(如沪深300 PE历史中位数)。

## Workflow

### Step 1: 确定标的
- 识别个股代码或指数代码
- 默认时间窗口:近 3 年(formal 风格可扩展至 5/10 年)

### Step 2: 数据获取
- 拉取历史日K线 + 当前行情报价
- 拉取财务数据获取历史利润/净资产(计算历史 PE/PB 序列)
- 指数标的可通过 web 搜索补充历史估值数据

### Step 3: 估值分位计算
- **PE(TTM) 百分位** = (低于当前值的交易日数 / 有效总交易日数) x 100%
- **PB 百分位** = 同上方法
- 可选:PS、EV/EBITDA 百分位
- 同时输出:最小值、25%分位、中位数、75%分位、最大值、当前值

### Step 4: 区间判断
| 百分位区间 | 判断 | 含义 |
|-----------|------|------|
| 0-20% | 极度低估 | 历史底部区域,长期配置价值高 |
| 20-40% | 偏低估 | 低于历史均值,具备安全边际 |
| 40-60% | 合理区间 | 接近历史中枢,估值中性 |
| 60-80% | 偏高估 | 高于历史均值,注意风险 |
| 80-100% | 极度高估 | 历史顶部区域,风险收益比差 |

### Step 5: 输出

## 风格

| 维度 | formal | brief |
|------|--------|-------|
| 输出 | 完整估值分位报告 | 一句话结论 + 核心数据 |
| 指标 | PE + PB + PS 多维度 | 仅核心 1-2 个指标 |
| 历史对比 | 近 3/5/10 年分别计算 | 仅近 3 年 |
| 图表 | 提供估值带数据(可画图) | 无 |
| 篇幅 | 500-800 字 | 50-100 字 |

## 关键规则

1. **异常值处理**:PE < 0(亏损)不计入分位计算;PE > 200 可选剔除
2. **周期股警告**:周期股底部利润极低导致 PE 反而最高,不宜用 PE 分位;改用 PB + 产能利用率判断
3. **基本面变化**:公司重大重组/业务转型后,历史分位参考价值降低,需注明
4. **时间窗口敏感**:必须注明计算区间(近 3 年 vs 近 5 年结果可能差异很大)
5. **指数优于个股**:指数估值分位的均值回归特性更强,参考价值更高
6. **行业适配**:银行用 PB,科技/SaaS 用 PS,消费用 PE,周期用 PB
7. **输出必须包含**:当前值、百分位排名、历史区间(min/median/max)、判断结论

## 使用示例

### 示例 1: 基本使用

```python
# 调用 skill
result = run_skill({
    "param1": "value1",
    "param2": "value2"
})
```

### 示例 2: 命令行使用

```bash
python scripts/run_skill.py --input data.json
```

Files in this skill

  • SKILL.md3.4 KB
  • references/valuation-band-guide.md7.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…