Overall Explainable Stock Score
Install and import#
npm install fintech-algorithmsimport { overallExplainableStockScore } from "fintech-algorithms/fundamental-analysis-and-valuation/integrated-equity-scoring/overall-explainable-stock-score";Signature#
overallExplainableStockScore(data)Blends the six pillar scores into a single overall stock score with fixed weights and keeps every pillar's contribution visible.
Parameters#
| Name | Type | Notes |
|---|---|---|
data | { financial_health_score: number; earnings_quality_score: number; dividend_safety_score: number; balance_sheet_resilience_score: number; distress_safety_score: number; valuation_score: number } | The six pillar scores, each a finite number between 0 and 100. financial_health_score, earnings_quality_score, dividend_safety_score and balance_sheet_resilience_score are the like-named keys emitted by the composites earlier in this family; distress_safety_score and valuation_score are supplied by the caller. |
Returns#
{ state: string; method: string; components: Record<string, number>; weights: Record<string, number>; contributions: Record<string, number>; overall_stock_score: number; band: string; coverage: number }
components echoes the six inputs and weights gives 0.24 to financial_health_score, 0.18 each to earnings_quality_score and balance_sheet_resilience_score, 0.16 to distress_safety_score, 0.14 to dividend_safety_score and 0.10 to valuation_score. contributions is each score times its weight and overall_stock_score 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#
{
"financial_health_score": 78,
"earnings_quality_score": 73,
"dividend_safety_score": 87,
"balance_sheet_resilience_score": 75,
"distress_safety_score": 77,
"valuation_score": 64
}Call#
overallExplainableStockScore(data)Returns#
object with 8 fields: state, method, components, weights, contributions, overall_stock_score, band, coverage
{
"state": "calculated",
"method": "explainable-six-pillar-stock-score",
"components": {
"financial_health_score": 78,
"earnings_quality_score": 73,
"dividend_safety_score": 87,
"balance_sheet_resilience_score": 75,
"distress_safety_score": 77,
"valuation_score": 64
},
"weights": {
"financial_health_score": 0.24,
"earnings_quality_score": 0.18,
"dividend_safety_score": 0.14,
"balance_sheet_resilience_score": 0.18,
"distress_safety_score": 0.16,
"valuation_score": 0.1
},
"contributions": {
"financial_health_score": 18.72,
"earnings_quality_score": 13.139999999999999,
"dividend_safety_score": 12.180000000000001,
"balance_sheet_resilience_score": 13.5,
"distress_safety_score": 12.32,
"valuation_score": 6.4
},
"overall_stock_score": 76.26,
"band": "strong",
"coverage": 1
}Other exports#
This module also exports
calculate, pointInTimeStockScoringInputAssembly, stockScoringPeerCohortResolver, fundamentalMetricDirectionAndPeerNormalization, modelApplicabilityAndVariantRouter, accountingFinancialHealthComposite, earningsQualityComposite, dividendSafetyScore, balanceSheetResilienceScore, distressModelEnsemble, crossModelConflictAndDoubleCountingResolver, 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#
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.
References#
- Value Investing: The Use of Historical Financial Statement Information to Separate Winners from Losers — Joseph D. Piotroski
- The Detection of Earnings Manipulation — Messod D. Beneish
- Financial Ratios, Discriminant Analysis and the Prediction of Corporate Bankruptcy — Edward I. Altman
- Beginners' Guide to Financial Statements — U.S. Securities and Exchange Commission
- Conceptual Framework for Financial Reporting — International Accounting Standards Board
- Evidence boundary