fintech-algorithms
Using a coding agent? Give it the skill: npx skills add IslamBaraka90/Fintech-Algorithms-Library What it does →

Accounting Financial-Health Composite

Install and import#

bash
npm install fintech-algorithms
ts
import { accountingFinancialHealthComposite } from "fintech-algorithms/fundamental-analysis-and-valuation/integrated-equity-scoring/accounting-financial-health-composite";

Signature#

accountingFinancialHealthComposite(data)

Blends four accounting pillar scores into one financial-health composite with fixed weights and shows what each pillar contributed.

Parameters#

NameTypeNotes
data{ profitability_score: number; cash_flow_score: number; liquidity_score: number; leverage_score: number }The four pillar scores — profitability_score, cash_flow_score, liquidity_score and leverage_score — each a finite number between 0 and 100.

Returns#

{ state: string; method: string; components: Record<string, number>; weights: Record<string, number>; contributions: Record<string, number>; financial_health_score: number; band: string; coverage: number }

components echoes the four inputs, weights gives 0.3 to profitability_score and cash_flow_score and 0.2 to liquidity_score and leverage_score, contributions is each score times its weight, and financial_health_score is their sum. band is strong at 75 or above, watch at 50 or above, otherwise weak; coverage is always 1.

Errors#

  • When any pillar score is not a finite number — throws TypeError
  • When any pillar score is below 0 or above 100 — throws RangeError

Complexity: time O(1), space O(1).

Worked example#

executed Captured by running this function on the input its own test provides. Real output of real code — but not asserted against a published figure.

Input#

data
{
  "profitability_score": 82,
  "cash_flow_score": 76,
  "liquidity_score": 68,
  "leverage_score": 72
}

Call#

accountingFinancialHealthComposite(data)

Returns#

object with 8 fields: state, method, components, weights, contributions, financial_health_score, band, coverage

{
  "state": "calculated",
  "method": "accounting-financial-health-weighted-composite",
  "components": {
    "profitability_score": 82,
    "cash_flow_score": 76,
    "liquidity_score": 68,
    "leverage_score": 72
  },
  "weights": {
    "profitability_score": 0.3,
    "cash_flow_score": 0.3,
    "liquidity_score": 0.2,
    "leverage_score": 0.2
  },
  "contributions": {
    "profitability_score": 24.599999999999998,
    "cash_flow_score": 22.8,
    "liquidity_score": 13.600000000000001,
    "leverage_score": 14.4
  },
  "financial_health_score": 75.4,
  "band": "strong",
  "coverage": 1
}

Other exports#

This module also exports calculate, pointInTimeStockScoringInputAssembly, stockScoringPeerCohortResolver, fundamentalMetricDirectionAndPeerNormalization, modelApplicabilityAndVariantRouter, earningsQualityComposite, dividendSafetyScore, balanceSheetResilienceScore, distressModelEnsemble, crossModelConflictAndDoubleCountingResolver, overallExplainableStockScore, scoreConfidenceMissingDataPenaltyAndAbstention, marketWideStockScreeningAndRanking, stockScoreHistoryMigrationAndChangeAttribution. Every module additionally exports run as an alias of its primary function, and a meta object carrying its catalog id, domain, family, shape and article URL.

Diagrams#

Accounting Financial-Health Composite — evidence clock
Accounting Financial-Health Composite — model anatomy
Accounting Financial-Health Composite — system map
Accounting Financial-Health Composite — threshold and interpretation
Accounting Financial-Health Composite — variant boundaries

How it works#

This page states the contract — how to call it correctly. The article explains the concept: why it works, and where it breaks.

Read the article →

References#

The rest of the Integrated Equity Scoring family#