DECCF · Cash Flow Modeler and Calculator

Business Metrics

deccf/domainpacks/business-metrics adds company metrics for accounts from the Business account plan. It depends on the accountplan pack. It creates metrics separately for each entity that owns Business-plan accounts, so a model does not need to use a particular company or account name.

The pack publishes the following KPI set:

MetricDefinition
Solidity(equity + untaxed reserves × (1 − company tax rate)) / total assets × 100
Profit margin(EBIT + positive financial income) / revenue × 100
Cash liquidity(current assets − inventory) / current liabilities × 100
Interest cover(EBIT + positive financial income) / financial expenses
Leverageadjusted liabilities / adjusted equity
Net debt / EBITDA(financial debt − cash) / EBITDA
Debt service coverage ratiocash flow from operations / (financial expenses + principal repayments)
Current ratiocurrent assets / current liabilities × 100
EBIT marginEBIT / revenue × 100
EBITDA marginEBITDA / revenue × 100
Return on assetsEBIT / total assets × 100
Return on equitynet income / equity × 100
Working capital / revenue(current assets − current liabilities) / revenue × 100
Asset turnoverrevenue / total assets
Total debt / EBITDAadjusted liabilities / EBITDA
Gross margin(revenue + cost of goods) / revenue × 100
Revenue growth(this 12-month revenue − prior 12-month revenue) / prior 12-month revenue × 100
Operating cash flow margincash flow from operations / revenue × 100
Inventory turnoverabs(cost of goods) / inventory
Receivables turnoverrevenue / receivables
Self-financing ratiocash flow from operations / abs(net investments), when net investments exceed 5 currency units
Cash flow coverage ratiocash flow from operations / (max(0, −net financial items) + principal repayments)
Debt servicePosted interest expense and principal repayment on tagged accounts, summed as positive money

For profit and loss calculations, a debit-minus-credit posting sum is negated. Income therefore contributes positively and costs negatively, matching the source KPI definitions. Balance values are normalized by account type: asset balances stay positive for debit balances, while liability and equity balances are negated from the ledger's debit-positive convention. Contra balances remain signed and reduce their parent totals.

The Business account plan carries the account-role tags used by these calculations. The tags follow the account-to-main-statement mappings in MainAccountDefinition: sales accounts, operating costs, finance income and expenses, tax, fixed and current assets, liabilities, equity, and debt accounts. The pack discovers plan accounts from both the model's accounts and account references in flow bookings, so stdaccount() accounts used directly by flows do not need to be repeated in accounts. References used only inside opaque callbacks still need to be declared there. The metric code reads only accounts owned by the company being measured. Period-closing postings are excluded from profit, loss, and balance-change calculations.

Periods, company tax, and unavailable ratios

Values are emitted each model period. Solidity, cash liquidity, leverage, and current ratio use period-end balances and can be calculated from the first period. Flow-based KPIs use a complete rolling year containing 365 daily, 52 weekly, 12 monthly, 4 quarterly, or 1 annual periods, according to the model calendar. Revenue growth compares two complete rolling years. Balance sheet amounts in those ratios are period-end balances; flow amounts cover the rolling year.

Annual results use the last KPI value in each owner's fiscal year. The owner's fiscalYearStartMonth attribute sets that boundary, defaulting to January. Debt service is a flow and is summed across the fiscal year.

Solidity and leverage account for tax on untaxed reserves. Set companyTaxRate on the company entity as a decimal from 0 to 1; the default is 0.206:

When a denominator is zero or the source definition requires a positive denominator, the metric is undefined for that period and serializes as null. The pack does not emit a large sentinel value for an unavailable KPI.

Using the pack

The Calculator's Business Forecast example enables Business Metrics by default. In a Node model, extract the pack into the model with extractPacks():

Each metric is named metric.domain.companymetrics.<metric>.<owner>. Its result series includes a display label and unit (percent, ratio, or money) as well as the period length, frequency, fiscal-year start month, and annual aggregation rule. undefined values are omitted from deterministic.metrics and appear as null in the time series.