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

Earnings-Quality Composite

Install and import#

bash
npm install fintech-algorithms
ts
import { earningsQualityComposite } from "fintech-algorithms/fundamental-analysis-and-valuation/integrated-equity-scoring/earnings-quality-composite";

Signature#

earningsQualityComposite(data)

Blends four earnings-quality pillar scores into one composite with fixed weights and shows what each pillar contributed.

Parameters#

NameTypeNotes
data{ accrual_quality_score: number; cash_conversion_score: number; revenue_quality_score: number; manipulation_safety_score: number }The four pillar scores — accrual_quality_score, cash_conversion_score, revenue_quality_score and manipulation_safety_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>; earnings_quality_score: number; band: string; coverage: number }

components echoes the four inputs, weights gives 0.3 to accrual_quality_score, 0.25 to cash_conversion_score and revenue_quality_score, and 0.2 to manipulation_safety_score, contributions is each score times its weight, and earnings_quality_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
{
  "accrual_quality_score": 70,
  "cash_conversion_score": 82,
  "revenue_quality_score": 74,
  "manipulation_safety_score": 66
}

Call#

earningsQualityComposite(data)

Returns#

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

{
  "state": "calculated",
  "method": "earnings-quality-weighted-composite",
  "components": {
    "accrual_quality_score": 70,
    "cash_conversion_score": 82,
    "revenue_quality_score": 74,
    "manipulation_safety_score": 66
  },
  "weights": {
    "accrual_quality_score": 0.3,
    "cash_conversion_score": 0.25,
    "revenue_quality_score": 0.25,
    "manipulation_safety_score": 0.2
  },
  "contributions": {
    "accrual_quality_score": 21,
    "cash_conversion_score": 20.5,
    "revenue_quality_score": 18.5,
    "manipulation_safety_score": 13.200000000000001
  },
  "earnings_quality_score": 73.2,
  "band": "watch",
  "coverage": 1
}

Other exports#

This module also exports calculate, pointInTimeStockScoringInputAssembly, stockScoringPeerCohortResolver, fundamentalMetricDirectionAndPeerNormalization, modelApplicabilityAndVariantRouter, accountingFinancialHealthComposite, 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#

Earnings-Quality Composite — evidence clock
Earnings-Quality Composite — model anatomy
Earnings-Quality Composite — system map
Earnings-Quality Composite — threshold and interpretation
Earnings-Quality 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#