← 返回 Skills 市场
samledger67-dotcom

Financial Ratio Analysis

作者 samledger67-dotcom · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ⚠ suspicious
242
总下载
0
收藏
1
当前安装
3
版本数
在 OpenClaw 中安装
/install financial-ratios
功能描述
Compute and report 25+ financial ratios (profitability, liquidity, leverage, efficiency, growth) from QBO data. Produces a 9-tab Excel workbook with traffic-...
使用说明 (SKILL.md)

Financial Ratio Analysis — SKILL.md


When to Use This Skill

Use when a user asks for:

  • Financial ratio analysis for a QBO-connected client
  • Profitability, liquidity, leverage, or efficiency metrics
  • DuPont decomposition or Altman Z-Score analysis
  • Month-over-month, QoQ, or YoY ratio comparison
  • Ratio benchmarking against industry averages
  • Trend analysis across 6 months of ratios
  • Trend reversal detection for any financial ratio
  • CDC (change data capture) on ratio movements

NOT for:

  • Bank reconciliation → use bank-reconciliation
  • P&L variance analysis (line-item drill-down) → use pl-deep-analysis
  • Cash flow forecasting → use cash-flow-forecast
  • AR collections aging → use ar-collections
  • Budget vs. actual → use budget-vs-actual

Quick Invocation

# Standard monthly ratio report
python3 scripts/pipelines/financial-ratios.py --slug sb-paulson --month 2026-03

# Custom output directory
python3 scripts/pipelines/financial-ratios.py --slug \x3Cclient-slug> --month 2026-03 --out ~/Desktop/reports

# QBO sandbox
python3 scripts/pipelines/financial-ratios.py --slug sb-paulson --month 2026-03 --sandbox

Unknown slugs use default thresholds and disable inventory/valuation ratios unless SOP file found.


What It Produces

Excel workbook saved to ~/Desktop (or --out path): FinancialRatios_{slug}_{YYYY_MM}.xlsx

Tab Contents
Ratio Summary All ratios with traffic lights, benchmarks, DuPont & Altman summary
Profitability Gross/Operating/Net margins, ROA, ROE, EBITDA margin + 6-mo trend
Liquidity Current/Quick/Cash ratios, Working capital + 6-mo trend
Leverage D/E, D/A, Interest coverage, Equity multiplier + 6-mo trend
Efficiency Asset/Inventory/Receivable/Payable turnover, DSO, DPO, CCC + 6-mo trend
Growth Revenue (MoM/QoQ/YoY), Expense, Net income growth + 6-mo trend
DuPont Analysis 3-factor + 5-factor ROE decomposition, 6-month component trend
Trends All ratios × 6 months with direction arrows + trend reversal flags
CDC Log Ratio changes vs. prior run with trend reversal detection

Ratio Categories

Profitability

Ratio Formula
Gross Margin % Gross Profit / Revenue × 100
Operating Margin % EBIT / Revenue × 100
Net Margin % Net Income / Revenue × 100
EBITDA Margin % EBITDA / Revenue × 100
ROA Net Income / Total Assets × 100
ROE Net Income / Total Equity × 100

Liquidity

Ratio Formula
Current Ratio Current Assets / Current Liabilities
Quick Ratio (Current Assets − Inventory) / Current Liabilities
Cash Ratio Cash / Current Liabilities
Working Capital Current Assets − Current Liabilities
Working Capital Ratio Working Capital / Total Assets × 100

Leverage

Ratio Formula
Debt-to-Equity Total Liabilities / Total Equity
Debt-to-Assets Total Liabilities / Total Assets
Interest Coverage EBIT / Interest Expense
Equity Multiplier Total Assets / Total Equity

Efficiency

Ratio Formula
Asset Turnover Revenue / Total Assets
Inventory Turnover COGS / Inventory (annualized)
Receivable Turnover Revenue / Accounts Receivable
DSO (Days Sales Outstanding) AR / (Revenue / Days)
Payable Turnover COGS / Accounts Payable
DPO (Days Payable Outstanding) AP / (COGS / Days)
Cash Conversion Cycle DSO + DIO − DPO

Growth

Ratio Formula
Revenue Growth MoM (Current − Prior) /
Revenue Growth QoQ (Current − 3mo ago) /
Revenue Growth YoY (Current − 12mo ago) /
Expense Growth (Current Opex − Prior Opex) /
Net Income Growth (Current NI − Prior NI) /

Valuation (SOP-gated)

Ratio Formula
Revenue Multiple Enterprise Value / (Revenue × 12)
EBITDA Multiple Enterprise Value / (EBITDA × 12)

DuPont Analysis

Three-Factor Model

ROE = Net Margin × Asset Turnover × Equity Multiplier

Five-Factor Model

ROE = Tax Burden × Interest Burden × EBIT Margin × Asset Turnover × Equity Multiplier

Both models computed; trend shown for each component across 6 months.


Altman Z-Score

Bankruptcy risk indicator. Model selected automatically by entity_type in SOP config:

Model Used For Zones
Z' (Revised) Private/Services (default) Safe >2.9 | Grey 1.23-2.9 | Distress \x3C1.23
Z (Original) Manufacturing Safe >2.99 | Grey 1.81-2.99 | Distress \x3C1.81

Formula (Z' model): Z' = 0.717×(WC/TA) + 0.847×(RE/TA) + 3.107×(EBIT/TA) + 0.420×(BVE/TL) + 0.998×(Revenue/TA)


Traffic Light Scoring

Each ratio scores GREEN / YELLOW / RED based on thresholds configured per client SOP.

  • GREEN: Within healthy range
  • YELLOW: Watch — approaching threshold
  • RED: Action required

Thresholds are configured in CLIENT_CONFIGS within the script. Override by editing the dict or adding a client SOP file.


Trend Reversal Detection

The pipeline detects when a ratio reverses direction over the 6-month window:

  • Compares direction of first half vs. second half of history
  • Flags ⚡ Trend Reversal — Now Improving or ⚠ Trend Reversal — Now Declining
  • Flagged prominently in Trends tab and CDC Log

Client SOP Integration

Place a sop.md file at clients/{slug}/sop.md. The pipeline reads it to detect:

SOP Signal Effect
"POS collection" / "no accounts receivable" Disables AR ratios (DSO, receivable turnover)
"no inventory" / "service-based" Disables inventory ratios
"manufacturing" / "distribution" Switches to original Altman Z model
enterprise value: $X Enables valuation ratios (revenue/EBITDA multiples)
benchmark: {key} {value} Overrides specific benchmark values

Client Configuration

Add clients to CLIENT_CONFIGS in the script with:

  • ratios_enabled list (which ratios to compute/display)
  • thresholds dict per ratio: {"green": (min, max), "yellow": (min, max)}
  • benchmarks dict per ratio: Decimal values
  • entity_type: "services" or "manufacturing" (for Altman Z model)

QBO Data Pulled

Report Purpose
P&L (current month) Revenue, COGS, OpEx, Net Income, Interest, D&A
Balance Sheet (current month-end) Assets, Liabilities, Equity, Cash, AR, Inventory, AP
Cash Flow (current month) Operating/Investing/Financing cash flows
P&L (prior month) MoM growth ratios
P&L (3 months ago) QoQ growth ratio
P&L (12 months ago) YoY growth ratio
All of the above × 6 months Historical trend analysis

Total QBO calls: ~17 per run (6-month history + current + prior + QoQ + YoY)


CDC Cache

Cache stored at: .cache/financial-ratios/{slug}.json

Tracks:

  • All ratio values from prior run
  • Detects per-ratio changes (delta + % change)
  • Flags trend reversals when 6-month history available
  • Compares run-over-run for drift monitoring

Technical Notes

  • All financial math: Python Decimal (no floating-point errors)
  • Division-by-zero: returns ZERO, never crashes
  • Missing QBO lines: ZERO (safe fallback), does not inflate ratios
  • Inventory turnover: annualized (× 12 for monthly periods)
  • Interest coverage = 999.99 when no interest expense (signals no debt burden)
  • Altman Z-Score uses book value of equity (not market cap) for private company model
  • EBITDA = EBIT + D&A; EBIT = Net Income + Interest + Taxes
  • Operating margin uses EBIT as proxy for operating income if QBO doesn't separate it

Files

File Description
scripts/pipelines/financial-ratios.py Main pipeline script
skills/financial-ratios/SKILL.md This file
.cache/financial-ratios/{slug}.json CDC cache per client

安全使用建议
This skill's README tells the agent to run local Python pipeline scripts and read client SOP/config files, but the package contains no scripts and declares no QuickBooks credentials or config paths. Before installing or enabling it, ask the publisher: (1) where are the pipeline scripts (provide code or a trusted install method)? (2) how does it obtain QBO data — which credentials or integration does it use and where are they stored? (3) what filesystem paths (SOP/client configs) will it read or write? If you must test it, run it in an isolated environment or sandbox, and require explicit, least-privilege credentials (not broad system access). Do not provide production QBO credentials or sensitive client SOP files until you can inspect the actual code and confirm how secrets are used and stored.
功能分析
Type: OpenClaw Skill Name: financial-ratios Version: 1.0.2 The skill bundle contains metadata and documentation for a financial analysis tool designed to compute ratios from QuickBooks Online (QBO) data. The documentation (SKILL.md) describes legitimate financial logic, including DuPont analysis and Altman Z-Score calculations, and provides clear instructions for agent invocation without any signs of prompt injection, data exfiltration, or malicious intent.
能力评估
Purpose & Capability
The skill's stated purpose is to compute ratios from QuickBooks Online (QBO) data and produce Excel reports, which normally requires QBO credentials and local pipeline code. The registry entry declares no QBO credentials, no config paths, and the package contains no scripts; this mismatch suggests missing dependencies or unstated assumptions about where code/credentials live.
Instruction Scope
SKILL.md instructs running local Python scripts (scripts/pipelines/financial-ratios.py), reading CLIENT_CONFIGS and client SOP files, and writing Excel output to ~/Desktop and CDC logs. Those instructions reference filesystem paths and client config files that are not declared in the skill metadata and there are no bundled code files — the runtime scope is underspecified and could cause the agent to search for sensitive files or depend on external skills/infrastructure.
Install Mechanism
No install spec and no code files are included (instruction-only). This minimizes direct installation risk since nothing is downloaded or written by an installer, but shifts risk to whatever runtime environment or external scripts the instructions expect to find.
Credentials
To access QBO and produce the described outputs the skill would typically require API credentials (OAuth tokens or API keys) and access to client SOP/config files; none are declared. The absence of declared env vars or config path requirements is disproportionate to the skill's needs and makes it unclear where sensitive credentials must be provided or how they are protected.
Persistence & Privilege
always is false and the skill is user-invocable with normal autonomous invocation allowed. It does not request persistent installation or claim to modify other skills or system-wide settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install financial-ratios
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /financial-ratios 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
Updated SKILL.md
v1.0.1
Security cleanup: removed internal references, genericized examples
v1.0.0
Initial release
元数据
Slug financial-ratios
版本 1.0.2
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 3
常见问题

Financial Ratio Analysis 是什么?

Compute and report 25+ financial ratios (profitability, liquidity, leverage, efficiency, growth) from QBO data. Produces a 9-tab Excel workbook with traffic-... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 242 次。

如何安装 Financial Ratio Analysis?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install financial-ratios」即可一键安装,无需额外配置。

Financial Ratio Analysis 是免费的吗?

是的,Financial Ratio Analysis 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Financial Ratio Analysis 支持哪些平台?

Financial Ratio Analysis 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Financial Ratio Analysis?

由 samledger67-dotcom(@samledger67-dotcom)开发并维护,当前版本 v1.0.2。

💬 留言讨论