← Back to Skills Marketplace
Forecast Valuation
by
cgxxxxxxxxxxxx
· GitHub ↗
· v1.0.0
· MIT-0
77
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install forecast-valuation
Description
专业财务预测与估值模型生成器。结合高盛 DCF 标准与 Wind Evaluator 框架,自动生成完整三表预测、DCF 估值、相对估值、敏感性分析和 Football Field 估值区间。
README (SKILL.md)
Forecast & Valuation Skill
专业财务预测与估值模型生成器,融合高盛 DCF 估值标准与 Wind Evaluator 专业框架。
功能特性
📊 核心功能
| 模块 | 功能描述 |
|---|---|
| 历史报表 | 自动导入/手动录入 5-10 年历史财务数据 |
| 基本假设 | 收入驱动、成本结构、资本配置、营运资本假设 |
| 三表预测 | 利润表/资产负债表/现金流量表 5 年预测,自动配平 |
| 财务分析 | 比率分析、杜邦分析、趋势分析 |
| DCF 估值 | WACC 计算、自由现金流折现、终值计算 |
| 敏感性分析 | WACC vs g 矩阵、龙卷风图、情景分析 |
| 相对估值 | 可比公司筛选、PE/PB/EV/EBITDA 倍数分析 |
| Football Field | 多方法估值区间可视化 |
✨ 核心优势
- 专业标准 - 融合高盛 DCF 框架 + Wind Evaluator 完整性
- 自动配平 - 资产负债表自动平衡检查
- 智能筛选 - 自动筛选 8-12 家可比公司
- 数据接口 - 支持 Gangtise/Tushare 自动获取财务数据
- 质量检验 - 预测合理性自动检验
使用方法
基本用法
# 生成完整财务预测与估值模型
python3 scripts/build_forecast.py "福耀玻璃" "600660.SH"
# 指定输出路径
python3 scripts/build_forecast.py "福耀玻璃" "600660.SH" --output "福耀玻璃_估值模型.xlsx"
# 仅生成 DCF 估值
python3 scripts/build_dcf.py "福耀玻璃" --wacc 9.5 --terminal_growth 2.0
# 仅生成可比公司分析
python3 scripts/build_comps.py "福耀玻璃" --industry "汽车零部件"
参数选项
python3 scripts/build_forecast.py \x3C公司名称> \x3C股票代码> [选项]
选项:
--output, -o 输出文件路径
--years, -y 预测年数(默认:5)
--wacc WACC(默认:自动计算)
--terminal-growth, -g 永续增长率(默认:2.0%)
--peers, -p 可比公司列表(逗号分隔)
--industry, -i 行业分类(用于自动筛选可比公司)
--data-source, -d 数据来源(gangtise/tushare/manual)
--upload, -u 上传到百度网盘
模型结构
生成的 Excel 模型包含以下工作表:
1️⃣ 封面
- 公司基本信息
- 股票代码、所属行业
- 报告日期、分析师
- 主营业务结构
2️⃣ 历史报表 (简化)
- 5-10 年历史利润表
- 5-10 年历史资产负债表
- 5-10 年历史现金流量表
- 关键财务指标
3️⃣ 基本假设
收入驱动因素
- 销量增速、单价增速
- 产品结构变化
- 区域收入分布
利润率假设
- 毛利率、各项费用率
- 有效税率
资本配置
- 资本开支/收入
- 折旧摊销/收入
- 分红比例
营运资本假设
- 应收账款周转天数
- 存货周转天数
- 应付账款周转天数
4️⃣ 利润表预测 (5 年)
- 营业收入预测
- 成本结构预测
- 三项费用预测
- 净利润预测
- EPS 预测
5️⃣ 资产负债表预测 (5 年)
- 流动资产预测
- 固定资产预测
- 负债预测
- 股东权益预测
- 配平检查(自动)
6️⃣ 现金流量表预测 (5 年)
- 经营活动现金流
- 投资活动现金流
- 融资活动现金流
- 自由现金流 (FCF)
7️⃣ 财务分析
- 盈利能力(ROE/ROA/ROIC)
- 偿债能力(资产负债率/利息保障倍数)
- 营运能力(周转率)
- 杜邦分析
8️⃣ DCF 估值
- WACC 详细计算(CAPM + 债务成本)
- 自由现金流预测
- 终值计算(永续增长法 + 退出倍数法)
- 企业价值 → 股权价值
- 每股价值
9️⃣ DCF 敏感性分析
- WACC vs 永续增长率 矩阵
- 每股价值敏感性
- 情景分析(乐观/基准/悲观)
🔟 可比公司估值
- 8-12 家可比公司筛选
- 估值倍数对比(PE/PB/EV/EBITDA/P/FCF/PEG)
- 行业平均/中位数/分位数
- 溢价/折价分析
1️⃣1️⃣ 相对估值
- PE 估值法
- PB 估值法
- EV/EBITDA 估值法
- 综合估值区间
1️⃣2️⃣ Football Field
- 多方法估值区间可视化
- DCF 区间
- 相对估值区间
- 当前股价位置
- 目标价区间
1️⃣3️⃣ 预测合理性检验
- 收入增速 vs 行业增速
- 利润率趋势合理性
- 资本开支与折旧匹配
- 营运资本变动合理性
数据来源
| 数据项 | 来源 |
|---|---|
| 历史财务数据 | Gangtise / Tushare / 手动录入 |
| 一致预期 | Gangtise / Wind / Choice |
| 可比公司数据 | Tushare / 手动录入 |
| 无风险利率 | 10 年期国债收益率(自动获取) |
| 市场风险溢价 | 默认 7.0%(可配置) |
| Beta 系数 | 自动计算(2 年周收益率) |
配置
配置文件 config.json:
{
"GANGTISE_ACCESS_KEY": "your_access_key",
"GANGTISE_SECRET_KEY": "your_secret_key",
"TUSHARE_TOKEN": "your_tushare_token",
"DATA_SOURCE": "gangtise",
"OUTPUT_DIR": "/root/.openclaw/workspace",
"UPLOAD_TO_BAIDU": false,
"WACC_DEFAULT": {
"risk_free_rate": 2.5,
"market_risk_premium": 7.0,
"cost_of_debt": 4.5,
"tax_rate": 15.0
},
"VALUATION_DEFAULT": {
"terminal_growth": 2.0,
"exit_ev_ebitda": 12.0
}
}
输出格式
- 字体: Times New Roman / 宋体
- 小数位: 1 位(百分比 0.0%)
- 千位分隔符: 启用
- 金额单位: 百万元(可配置)
- 数字格式: #,##0.0
示例
福耀玻璃估值模型
python3 scripts/build_forecast.py "福耀玻璃" "600660.SH" \
--output "福耀玻璃_财务预测与估值_20260320.xlsx" \
--years 5 \
--industry "汽车零部件"
生成模型包含:
- 2021A-2025A 历史数据
- 2026E-2030E 财务预测
- DCF 估值:55.0 HKD
- 可比公司 PE 平均:19.6x
- Football Field 目标价区间:52-62 HKD
- 评级:买入
质量检验
模型自动生成预测合理性检验报告:
| 检验项 | 标准 | 状态 |
|---|---|---|
| 收入增速 vs 行业 | ≤行业增速 1.5x | ✅ |
| 毛利率趋势 | 波动≤5% | ✅ |
| 资本开支/折旧 | 1.0-2.0x | ✅ |
| 营运资本/收入 | 稳定或改善 | ✅ |
| 资产负债率 | ≤70% | ✅ |
依赖
- Python 3.8+
- openpyxl
- pandas
- requests
- numpy
故障排除
数据获取失败
# 检查配置
python3 scripts/configure.py
# 测试连接
python3 scripts/test_connection.py
# 使用手动录入模式
python3 scripts/build_forecast.py "公司" "代码" --data-source manual
资产负债表不平
- 检查"配平检查"工作表
- 常见原因:留存收益计算错误、现金作为配平项
- 模型自动使用"现金及等价物"作为配平项
可比公司数据缺失
# 手动指定可比公司
python3 scripts/build_comps.py "福耀玻璃" \
--peers "信义玻璃,旗滨集团,南玻 A"
版本历史
| 版本 | 日期 | 更新内容 |
|---|---|---|
| 1.0.0 | 2026-03-20 | 初始版本,融合高盛 DCF 标准与 Wind Evaluator 框架 |
相关 Skill
financial-model- 基础财务建模gangtise-kb- 刚投知识库数据接口tushare-finance- Tushare 金融数据接口
反馈
- 问题报告:GitHub Issues
- 功能建议:SkillHub 评论
Usage Guidance
Things to consider before installing or running this skill:
- The main functionality (creating Excel valuation models) is implemented in the included build_forecast.py; that matches the description. However the README/SKILL.md references other helper scripts (build_dcf.py, build_comps.py, test_connection.py) that are not present. Ask the author for the missing scripts or avoid commands that call them.
- The configure.py will prompt you to enter API keys and will save them into a local config.json file inside the skill directory. If you provide real API keys, they will be stored on disk in plaintext — consider using temporary/test keys, storing secrets in a secure location, or editing the script to read from protected environment variables instead.
- The script defaults OUTPUT_DIR to /root/.openclaw/workspace. Running as a non-root user may fail or will create files under /root; check and change OUTPUT_DIR before running if needed.
- The code uses network-capable libraries (requests) and SKILL.md says it will fetch market data (10-year yield) and pull from Gangtise/Tushare. Review the remaining (truncated) portions of build_forecast.py to confirm which external endpoints it contacts, and whether any endpoints are unexpected. Run the code in a sandboxed environment (isolated VM or container) if you cannot verify those calls first.
- No automated installer downloads code from arbitrary URLs (good), but because this skill comes from an unknown source (no homepage) you should inspect the complete scripts locally before executing them. If you decide to use the skill, prefer manual credential handling (do not reuse high-value production keys) and limit file permissions on config.json (chmod 600) or move secrets into environment variables/secret manager.
Capability Analysis
Type: OpenClaw Skill
Name: forecast-valuation
Version: 1.0.0
The skill bundle is a financial modeling tool designed to generate Excel-based valuation reports. The core logic in `scripts/build_forecast.py` uses the `openpyxl` library to construct a workbook with standard financial sheets (DCF, Income Statement, etc.) using hardcoded templates and formulas. While the documentation in `SKILL.md` and `README.md` mentions advanced features like API integration (Gangtise/Tushare) and cloud uploads (Baidu Netdisk) that are not present in the provided code, there is no evidence of malicious intent, data exfiltration, or security vulnerabilities. The `scripts/configure.py` script standardly manages API keys in a local `config.json` file.
Capability Assessment
Purpose & Capability
Name/description (financial forecasting & valuation) align with the included scripts: build_forecast.py and configure.py implement Excel model generation and a configuration prompt for data-source API keys (Gangtise/Tushare). Dependencies listed (pandas, openpyxl, requests, numpy) are appropriate for the task. Minor mismatch: SKILL.md lists extra functionality (build_dcf.py, build_comps.py, test_connection.py, upload-to-Baidu) that are referenced but not present in the file manifest.
Instruction Scope
SKILL.md instructs running multiple helper scripts (build_dcf.py, build_comps.py, test_connection.py) and an upload option, but only build_forecast.py and configure.py are bundled. configure.py prompts for and writes API keys into a config.json in the repo root — this is within the skill's operational scope but is a credential-handling decision that broadens the runtime data surface. The instructions assume network access to fetch market data (e.g., risk-free rate) but the provided code is truncated, so exact network calls are not fully visible.
Install Mechanism
No install spec is provided (instruction-only plus a couple of scripts). This is low-risk in terms of automatic downloads or arbitrary code fetch during install. The runtime will execute bundled Python scripts, which will write files locally; there is no external installer URL or archive to review.
Credentials
The skill declares no required environment variables, yet its configuration and code expect API credentials (GANGTISE_ACCESS_KEY, GANGTISE_SECRET_KEY, TUSHARE_TOKEN) to be stored in config.json. Storing secrets in a local JSON file (by default saved in the skill tree) is a security consideration and is inconsistent with the declared empty requires.env. The number and kind of credentials requested are proportionate to the described data sources, but the storage method and missing explicit declare of required secrets are concerning.
Persistence & Privilege
The skill does not request elevated platform privileges and always:false. It writes a config.json into the skill directory and writes output to a hard-coded OUTPUT_DIR (/root/.openclaw/workspace) by default — that may be surprising for some environments and could create files under /root. It does not request to modify other skills or system-wide settings.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install forecast-valuation - After installation, invoke the skill by name or use
/forecast-valuation - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
forecast-valuation 1.0.0
- 首发版本,融合高盛 DCF 估值标准与 Wind Evaluator 框架
- 自动生成完整三表预测、DCF 估值、相对估值、敏感性分析及 Football Field 可视化
- 支持历史数据导入、可比公司自动筛选、核心财务假设自定义
- Excel 模型含 13 大工作表,内嵌估值结果、合理性检验与可视化
- 集成 Gangtise/Tushare 数据接口及自动配平、质量检测功能
Metadata
Frequently Asked Questions
What is Forecast Valuation?
专业财务预测与估值模型生成器。结合高盛 DCF 标准与 Wind Evaluator 框架,自动生成完整三表预测、DCF 估值、相对估值、敏感性分析和 Football Field 估值区间。 It is an AI Agent Skill for Claude Code / OpenClaw, with 77 downloads so far.
How do I install Forecast Valuation?
Run "/install forecast-valuation" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Forecast Valuation free?
Yes, Forecast Valuation is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Forecast Valuation support?
Forecast Valuation is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Forecast Valuation?
It is built and maintained by cgxxxxxxxxxxxx (@cgxxxxxxxxxxxx); the current version is v1.0.0.
More Skills