credit-financial-analysis
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "credit-financial-analysis" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-00b4265d5868dd0d0874535da90817b25795339a56d6bb9d0924a2f4a9e46f83. Verify the upstream source and version against https://skillhub.cn/skills/user_5f3400b5/credit-financial-analysis before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Credit and financial analysis tool: from raw balance sheet, income statement, and cash flow data, automatically calculate comprehensive financial ratios (e.g. current ratio, quick ratio, cash ratio, debt ratio, turnover ratios, ROE/ROA) and the Altman Z‑Score bankruptcy model, and output formatted analytical conclusions ready for credit reports. Trigger terms include: credit analysis, financial analysis, financial ratios, Z‑score, debt ratio, solvency analysis, corporate financial analysis, loan analysis.
Introduction source: third_party · user_5f3400b5 · 1.0.1 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Inputs and outputs
- ```python
- Testing
- Not tested
Browse files
Frontmatter
name: credit-financial-analysis
description: 信贷财务分析技能 — 基于资产负债表、利润表、现金流量表原始数据,自动计算全部财务比率(流动/速动/现金比率、资产负债率、周转率、ROE/ROA)和 Altman Z-Score 破产风险模型,输出可直接用于信贷报告的格式化分析结论。触发词:信贷分析、财务分析、财务比率、Z值、资产负债率、偿债能力分析、企业财务分析、贷款分析。Credit Financial Analysis — 信贷财务分析
Authors: Martin Yip, Jason Yu
概述
输入企业三大报表(资产负债表、利润表、现金流量表)的原始数据,自动计算全套财务比率并生成信贷报告可直接使用的分析结论。
快速开始
1. 获取数据
- 用户上传 Excel/CSV 格式的财务数据模板
- 或用户在对话中逐项提供财务数据(如:货币资金500万,应收800万...)
2. 数据录入
使用 scripts/fin_analysis.py 的 analyze_data() 函数将用户数据整理为结构化输入:
from scripts.fin_analysis import analyze_data, analyze_periods
# 单期分析
data = {
"label": "2024-12-31",
"cash": 5000000, # 货币资金
"short_term_investment": 0, # 短期投资
"notes_receivable": 0, # 应收票据
"accounts_receivable": 8000000, # 应收帐款
"bad_debt_reserve": 0, # 坏账准备
"prepayments": 0, # 预付账款
"inventory": 3000000, # 存货
"deferred_expenses": 0, # 待摊费用
"other_current_assets": 0, # 其他流动资产
"long_term_investment": 0, # 长期投资
"fixed_asset_cost": 15000000, # 固定资产原值
"accumulated_depreciation": 3000000, # 累计折旧
"impairment": 0, # 减值准备
"construction_in_progress": 0, # 在建工程
"intangible_assets": 0, # 无形资产
"long_term_deferred": 0, # 长期待摊费用
"deferred_tax_assets": 0, # 递延税项
"other_long_term_assets": 0, # 其他长期资产
"short_term_loan": 2000000, # 短期借款
"notes_payable": 0, # 应付票据
"accounts_payable": 4000000, # 应付帐款
"advance_from_customers": 0, # 预收货款
"wages_payable": 0, # 应付工资
"taxes_payable": 0, # 应交税金
"other_current_liabilities": 0, # 其他流动负债
"long_term_loan_due": 0, # 一年内到期借款
"long_term_loan": 0, # 长期借款
"long_term_payable": 0, # 长期应付款
"other_long_term_liabilities": 0, # 其他长期负债
"paid_in_capital": 10000000, # 实收资本
"capital_reserve": 5000000, # 资本公积
"surplus_reserve": 0, # 盈余公积
"retained_earnings": 3000000, # 未分配利润
"minority_interest": 0, # 少数股东权益
"sales": 50000000, # 销售收入
"cogs": 35000000, # 销售成本
"operating_expenses": 0, # 经营费用
"sales_tax_surcharge": 0, # 销售税金及附加
"selling_expenses": 2000000, # 营业费用
"admin_expenses": 1500000, # 管理费用
"finance_expenses": 500000, # 财务费用(含利息)
"other_income": 0, # 其他业务利润
"non_operating_income": 0, # 营业外收入
"non_operating_expenses": 0, # 营业外支出
"income_tax": 300000, # 所得税
"operating_cash_in": 0, # 经营现金流入
"operating_cash_out": 0, # 经营现金流出
"investing_cash_in": 0, # 投资现金流入
"investing_cash_out": 0, # 投资现金流出
"financing_cash_in": 0, # 筹资现金流入
"financing_cash_out": 0, # 筹资现金流出
"exchange_rate_impact": 0, # 汇率影响
}
result = analyze_data(data, data["label"])
3. 输出结果
# 信贷报告格式文本
print(result.to_report_text())
# JSON 结构供进一步处理
print(json.dumps(result.to_dict(), ensure_ascii=False, indent=2))
# 单值访问
result.roe # 权益报酬率 (float)
result.z_score # Altman Z值
result.z_judgment # 破产风险判断文案
4. 多期对比分析
periods = {
"2023-12-31": {"cash": 4000000, "sales": 45000000, ...},
"2024-12-31": {"cash": 5000000, "sales": 50000000, ...},
"2025-12-31": {"cash": 6000000, "sales": 55000000, ...},
}
results = analyze_periods(periods)
for r in results:
print(r.to_report_text())
计算指标清单
偿债能力
| 指标 | 公式 |
|---|---|
| 流动比率 | 流动资产 / 流动负债 |
| 速动比率 | (流动资产 - 存货) / 流动负债 |
| 现金比率 | (货币资金 + 短期投资) / 流动负债 |
| 资产负债率 | 总负债 / 总资产 |
| 杠杆率 | 总负债 / 股东权益 |
| 利息保障倍数 | EBIT / 财务费用 |
经营能力
| 指标 | 公式 |
|---|---|
| 存货周转率 | 销售成本 / 平均存货 |
| 应收帐款周转率 | 销售收入 / 应收帐款 |
| 应付帐款周转率 | 销售成本 / 应付帐款 |
| 总资产周转率 | 销售收入 / 总资产 |
盈利能力
| 指标 | 公式 |
|---|---|
| 毛利率 | (销售收入 - 销售成本) / 销售收入 |
| 营业利润率 | 营业利润 / 销售收入 |
| 销售净利率 | 净利润 / 销售收入 |
| ROA | 净利润 / 总资产 |
| ROE | 净利润 / 股东权益 |
Altman Z-Score 破产风险
- Z = 1.2X₁ + 1.4X₂ + 3.3X₃ + 0.6X₄ + 1.0X₅
- X₁ = 营运资本 / 总资产
- X₂ = 留存收益 / 总资产
- X₃ = EBIT / 总资产
- X₄ = 股权市场价值 / 总负债
- X₅ = 销售收入 / 总资产
- Z < 1.23: 即时破产风险
- 1.23 ≤ Z ≤ 2.9: 一年内破产概率95%,两年内70%
- Z > 2.9: 无破产风险
与原始模板的字段映射
原始单元格标签 → 脚本字段名:
资产负债表:
- 货币资金 →
cash - 短期投资 →
short_term_investment - 应收票据 →
notes_receivable - 应收帐款 →
accounts_receivable - 减:坏账准备 →
bad_debt_reserve - 预付账款 →
prepayments - 存货 →
inventory - 待摊费用 →
deferred_expenses - 其他应收款等 →
other_current_assets - 长期股权投资 →
long_term_investment - 固定资产原值 →
fixed_asset_cost - 减:累计折旧 →
accumulated_depreciation - 减值准备 →
impairment - 在建工程 →
construction_in_progress - 无形资产 →
intangible_assets - 长期待摊费用 →
long_term_deferred - 递延资产 →
deferred_tax_assets - 其他长期资产 →
other_long_term_assets - 短期借款 →
short_term_loan - 应付票据 →
notes_payable - 应付帐款 →
accounts_payable - 预收货款 →
advance_from_customers - 应付工资 →
wages_payable - 应交税金 →
taxes_payable - 其他应付款等 →
other_current_liabilities - 一年内到期借款 →
long_term_loan_due - 长期借款 →
long_term_loan - 长期应付款 →
long_term_payable - 其他长期负债 →
other_long_term_liabilities - 实收资本 →
paid_in_capital - 资本公积 →
capital_reserve - 盈余公积 →
surplus_reserve - 未分配利润 →
retained_earnings - 少数股东权益 →
minority_interest
利润表:
- 销售收入 →
sales - 销售成本 →
cogs - 经营费用 →
operating_expenses - 销售税金及附加 →
sales_tax_surcharge - 营业费用 →
selling_expenses - 管理费用 →
admin_expenses - 财务费用 →
finance_expenses - 其他业务利润 →
other_income - 营业外收入 →
non_operating_income - 营业外支出 →
non_operating_expenses - 所得税 →
income_tax
现金流量表:
- 经营性现金流入/出 →
operating_cash_in/operating_cash_out - 投资性现金流入/出 →
investing_cash_in/investing_cash_out - 筹资性现金流入/出 →
financing_cash_in/financing_cash_out - 汇率变动影响额 →
exchange_rate_impact
工作流程
- 读入数据 — 用户上传财务报表或逐项提供数据
- 构建输入 — 将数据按上述字段映射填入 dict
- 执行分析 — 调用
analyze_data()或analyze_periods() - 输出结果 — 向用户呈现
to_report_text()格式的信贷分析报告 - 解读 — 结合指标行业参考值和 Z-Score 判断给出专业解读
Current listing version
1.0.1
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 直接解决信贷分析高频刚需场景,自动计算全套财务比率和 Altman Z-Score 破产风险模型
- 输出可直接用于信贷报告的格式化分析结论,显著提升金融从业者工作效率
Highlights
- 触发词完整且精准,覆盖信贷分析、财务比率、Z值、偿债能力等多个关键术语
- 边界清晰,不易与其他 Skill 重叠
Areas to improve
-
缺少 When to Use 章节 Reported severity: Minor
文档未明确说明适用场景和使用时机
Recommendation: 建议补充 When to Use 章节,说明该 Skill 最适合在信贷审批、财务尽调等场景下使用
Highlights
- 结构清晰,包含概述、快速开始、计算指标清单、字段映射、工作流程
- 提供端到端代码示例和结构化输入说明,便于用户理解和使用
Areas to improve
-
未显式处理除零异常等边界情况 Reported severity: Minor
财务计算中可能出现除零(如流动负债为0时计算流动比率),但未在文档或代码中说明处理机制
Recommendation: 建议在 analyze_data 函数中增加除零保护和数据有效性校验,并在文档中说明异常处理逻辑
-
引用文件缺失 Reported severity: Minor
SKILL.md 引用了 scripts/fin_analysis.py 但未传入该文件
Recommendation: 请确保 scripts/fin_analysis.py 文件包含在 Skill 包内,或提供该文件的实现说明
Highlights
- 工具来源明确,参数定义清晰,覆盖主要财务指标计算
- 提供单期和多期分析接口,满足不同场景需求
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.