Token导航 LogoToken导航TokenDH.com
开发敏感数据clawhub未标认证来源可访问clear审计提醒

a-share-dcf-valuationA 股贴现现金流估值

Agent Skill

a-share-dcf-valuation 用于补充开发相关能力,适合在 OpenClaw 中需要让 Agent 承接开发相关任务时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

3,693

周安装

157

GitHub Stars

1

下载量

1,294
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:a-share-dcf-valuation(A 股贴现现金流估值)
来源仓库:https://github.com/laigen/a-share-dcf-valuation
安装命令:
openclaw skills install a-share-dcf-valuation
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install a-share-dcf-valuation

简介

基于 DCF 模型对 A 股上市公司进行估值分析,自动计算 WACC。

  • 支持保守、基本、乐观三种情景预测与财务数据自动抓取。
  • 适用于投资研究与价值评估场景,输出结构化分析报告。
  • 安装命令:openclaw skills install a-share-dcf-valuation,需股票代码作为输入。
  • 注意数据来源可靠性与模型假设合理性,建议交叉验证结果。

SKILL.md

name
a-share-dcf-valuation
description
DCF valuation modeling for A-share listed companies. Pass stock code to automatically fetch financial data, calculate WACC, run conservative/base/optimistic three-scenario DCF valuation, generate sensitivity analysis matrix, and output complete Markdown report (in Chinese). Applicable to any A-share listed company valuation analysis.

A-share DCF Valuation Modeling

Trigger Conditions

Use when user requests DCF (Discounted Cash Flow) valuation analysis for an A-share stock.

Environment Requirements

Required Environment Variables

VariableDescriptionHow to Obtain
TUSHARE_TOKENTushare API token (mandatory)Register at https://tushare.pro, get token from user center
OPENCLAW_WORKSPACEWorkspace root path (optional)Defaults to ~/.openclaw/workspace

Python Dependencies

PackageVersionPurpose
tushareLatestA-share financial data API
pandas≥1.0Data processing
numpy≥1.18Numerical calculations
scipy≥1.4Beta regression (stats module)

Setup Instructions

  1. Configure Tushare Token:
   # Add to ~/.bashrc or ~/.bash_profile
   export TUSHARE_TOKEN="your_token_here"
   source ~/.bashrc
  1. Install Python Dependencies:
   pip install tushare pandas numpy scipy
  1. Verify Setup:
   python3 -c "import tushare as ts; ts.set_token('$TUSHARE_TOKEN'); pro = ts.pro_api(); print(pro.stock_basic(ts_code='600519.SH'))"

Troubleshooting

ErrorCauseSolution
未设置 TUSHARE_TOKEN 环境变量Token not configuredAdd export to shell profile
Tushare API 获取失败Invalid token or network issueVerify token, check network
No module named 'tushare'Package not installedpip install tushare
Beta 回归数据不足Stock newly listedUse industry default Beta

Quick Start

User input: "对 贵州茅台 600519 做 DCF 估值"
→ Run: python3 scripts/a_share_dcf.py 600519.SH
→ Report saved to: reports/dcf_贵州茅台_YYYY-MM-DD.md

Valuation Methodology

Method: Two-stage FCFF (Free Cash Flow to Firm) discount model

Formulas:

  • FCFF = Operating Cash Flow - Capital Expenditure
  • WACC = We×Re + Wd×Rd×(1-T)
  • Terminal Value = FCFF_n × (1+g) / (WACC - g)
  • Equity Value = EV - Net Debt
  • Per-share Value = Equity Value / Total Shares

Three-Scenario Assumptions:

ScenarioWACCGrowth RatePerpetual Growth
ConservativeWACC + 3% (min 14%)50% of 3-year avg2%
BaseCalculated WACC80% of 3-year avg3%
OptimisticWACC - 3% (min 7%)100% of 3-year avg4%

Scenario Assumption Rationale

Conservative Scenario: Higher WACC reflects elevated risk premium; reduced growth rate accounts for potential downside from competition, regulation, or macro headwinds. Suitable for risk-averse investors.

Base Scenario: Uses calculated WACC from company-specific beta and capital structure; growth rate anchored to historical average but tempered for maturity trajectory. Represents most likely outcome under normal conditions.

Optimistic Scenario: Lower WACC assumes favorable risk environment; full historical growth reflects best-case execution. Appropriate for growth-oriented analysis or upside case.

Execution Steps

1. Determine Stock Code Format

Tushare uses XXXXXX.SH (Shanghai) or XXXXXX.SZ (Shenzhen) format:

# Auto conversion
if code.startswith('6'): 
    ts_code = f"{code}.SH"
elif code.startswith(('0', '3')):
    ts_code = f"{code}.SZ"

2. Run Valuation Script

cd $OPENCLAW_WORKSPACE && python3 skills/a-share-dcf-valuation/scripts/a_share_dcf.py <TS_CODE> [公司名]
# Example: python3 skills/a-share-dcf-valuation/scripts/a_share_dcf.py 600519.SH 贵州茅台

Note: $OPENCLAW_WORKSPACE defaults to ~/.openclaw/workspace. Use relative paths from workspace root for portability.

3. Check Output

  • Terminal displays real-time progress and key metrics
  • Markdown report saved to reports/dcf_{公司名}_{日期}.md
  • Verify report contains all required sections

4. Report to User

First provide summary conclusion, then report path:

## DCF 估值完成 — {公司名}

| 场景 | DCF每股价值 | vs 当前股价 |
|------|------------|------------|
| 保守 | ¥XX.XX     | -XX.X%     |
| 中性 | ¥XX.XX     | -XX.X%     |
| 乐观 | ¥XX.XX     | -XX.X%     |

当前股价: ¥XXX.XX
完整报告: reports/dcf_{公司名}_{日期}.md

Important Notes

Data Source

  • Tushare is the sole data source (requires TUSHARE_TOKEN environment variable)
  • If Tushare fetch fails, inform user that data is unavailable; do not fabricate data

Beta Calculation

  • Use ~500 trading days (~2 years) regression against CSI 300 (000300.SH)
  • If regression R² < 0.1 or insufficient data, use industry default Beta:

- Tech/Semiconductor: 1.5 - Consumer/Healthcare: 0.8 - Financial/Banking: 1.0 - Cyclical/Manufacturing: 1.2 - Others: 1.2

WACC Parameters (Dynamic Calculation)

The following parameters are NOT hardcoded fixed values. They are dynamically determined with explicit data sources and rationale:

1. Risk-Free Rate (RF)

ApproachSourceValue Range
PrimaryChina 10-year Treasury yield1.8% - 4.5% (historical)
Reference中债估值~2.1% - 2.5% (2024-2025)
FallbackRecent 10Y bond average2.25% (default)

Method: Query public bond yield data; if unavailable, use recent reference value with explicit notation.

2. Equity Risk Premium (ERP)

Correct Terminology: ERP (Equity Risk Premium), not MRP (Market Risk Premium).

SourceERP Estimate
Damodaran (2024)6.5% for China
中金/中信研报5% - 8%
程晓明等学术研究6.0% - 7.5%
Historical calculation (A股20年平均收益率 - RF)5.5% - 7.0%

Industry Adjustment:

  • Tech/Semiconductor: +1.0% to 1.5%
  • Financial: -1.0%
  • Consumer/Healthcare: 0%

Method: Base ERP 6.5% + industry-specific risk adjustment.

3. Debt Cost (Rd)

ApproachFormula
PrimaryLPR 1Y + Credit Spread
LPR Reference3.1% (2025 1-year LPR)
Credit Spread0.5% - 1.5% based on rating
Company ProfileEstimated Rd
Low debt (<10%), strong credit3.6% (LPR + 0.5%)
Moderate debt (10-50%)4.0% (LPR + 0.9%)
High debt (>50%)5.0% (LPR + 1.9%)

Method: Estimate based on company's debt ratio and implied credit quality.

4. Tax Rate (Tax)

SourceRate
PrimaryActual effective tax rate from financial statements
High-tech enterprise15% (qualified)
General corporate25%

High-tech Identification Criteria:

  1. Industry: 电子、半导体、计算机、通信、医药生物、医疗器械、新能源、电力设备
  2. Gross margin > 30% (common indicator of tech companies)

Method: First attempt to extract actual tax rate from income statement; if unavailable, determine based on industry and gross margin characteristics.

Special Cases

  • Financial stocks (banks/insurers/brokers): Standard DCF not applicable (FCFF meaningless), use PB-ROE or DDM model, inform user
  • Loss-making companies: When FCFF is negative with no recovery signs, DCF not applicable, use alternative methods
  • **ST/*ST stocks**: Alert user to delisting risk

Report Quality

  • All amounts in "亿元" (100 million yuan)
  • Growth rates in percentage
  • Two decimal places
  • Annotate data source and timeliness
  • Must include disclaimer

Risk Disclosure (Dynamic Generation)

The "Risk Disclosure" section must be dynamically generated based on company and industry characteristics, NOT hardcoded. The script should:

  1. Industry-specific risks: Map company's industry to relevant risk factors
  2. Company-specific risks: Analyze financial data to identify company-level risks
  3. Model risks: Always include DCF sensitivity to WACC and perpetual growth
  4. Macro risks: General economic, interest rate, and policy risks

Industry Risk Mapping:

IndustryKey Risk Factors
科技/半导体技术迭代快、研发投入大、国际竞争、供应链风险
消费/食品饮料品牌溢价风险、消费降级、渠道变革
医药/医疗政策监管(集采)、研发失败、专利到期
金融/银行利率周期、信用风险、监管趋严
周期/制造经济周期敏感、产能过剩、环保政策
新能源/光伏技术路线竞争、产能扩张过快、补贴退坡
房地产/建材政策调控、去杠杆、销售疲软
互联网/传媒用户增长放缓、监管趋严、变现模式受限
交通运输油价波动、需求周期、基础设施投资
其他行业竞争格局变化、政策不确定性

Report Structure (Markdown, output in Chinese)

# DCF 估值报告 — {公司名} ({TS_CODE})

> 估值日期 | 当前股价 | 总市值 | PE | PB

## 一、公司基本面概览
- 公司简介
- 历史财务数据表(7年)
- 关键财务指标(最新年报)

## 二、WACC 计算
- 参数表格(Rf, Beta, MRP, Re, Rd, Tax, We, Wd, WACC)

## 三、三场景 DCF 估值
- 场景假设表(含设定依据说明)
- 估值结果表

## 四、敏感性分析
- WACC × 永续增长率 矩阵

## 五、关键假设
- 列出核心假设

## 六、风险提示(Dynamic)
- 根据公司行业特性、财务状况动态生成针对性风险提示

## 七、结论
- 估值区间
- 与当前股价对比
- 简要分析

> 免责声明

File Organization

All paths should be relative to the workspace root ($OPENCLAW_WORKSPACE or ~/.openclaw/workspace):

  • Script: skills/a-share-dcf-valuation/scripts/a_share_dcf.py
  • Report: reports/dcf_{公司名}_{YYYY-MM-DD}.md

Important: Avoid absolute paths like /home/laigen/ in the script. Use environment variable $OPENCLAW_WORKSPACE or relative paths for portability.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

88.23%
按下载量换算1,142

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills