# Earnings-Quality Composite

`D18-F09-A06` · Fundamental Analysis and Valuation → Integrated Equity Scoring · archetype `record-transform` · difficulty 3/5 · verification **verified**

Full page: https://docs.thefintechbuilder.com/fundamental-analysis-and-valuation/integrated-equity-scoring/earnings-quality-composite/
Agent skill: `npx skills add IslamBaraka90/Fintech-Algorithms-Library` — https://docs.thefintechbuilder.com/guides/agent-skill/

## 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

```ts
earningsQualityComposite(data)
```

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

## Parameters

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `data` | `{ accrual_quality_score: number; cash_conversion_score: number; revenue_quality_score: number; manipulation_safety_score: number }` | yes | 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

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`:

```json
{
  "accrual_quality_score": 70,
  "cash_conversion_score": 82,
  "revenue_quality_score": 74,
  "manipulation_safety_score": 66
}
```

### Call

```ts
earningsQualityComposite(data)
```

### Returns

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

```json
{
  "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

`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.

## Verification and provenance

Tier: **verified** (via D).

The worked example below is the figure published in this algorithm's article, replayed and asserted by the test suite on every build. The arithmetic cannot drift without the build failing.

Both tiers guarantee the signature. Full explanation: https://docs.thefintechbuilder.com/guides/verification/

Generated from the docs.json payload shipped inside fintech-algorithms@0.13.0.
The signature and parameter list are checked against the compiled implementation at build time,
so a description that contradicts the code fails the build rather than reaching this file.

## Links

- Article (how it works, step by step): https://thefintechbuilder.com/fundamental-analysis-and-valuation/integrated-equity-scoring/earnings-quality-composite/
- Implementation source: https://github.com/IslamBaraka90/Fintech-Algorithms-Library/blob/main/src/fundamental-analysis-and-valuation/integrated-equity-scoring/earnings-quality-composite/impl.ts
- Package on npm: https://www.npmjs.com/package/fintech-algorithms
- Domain index for agents: https://docs.thefintechbuilder.com/fundamental-analysis-and-valuation/llms.txt
