# Bank Fundamental Score

`D18-F10-A01` · Fundamental Analysis and Valuation → Sector-Specific Equity Scoring · archetype `record-transform` · difficulty 4/5 · verification **verified**

Full page: https://docs.thefintechbuilder.com/fundamental-analysis-and-valuation/sector-specific-equity-scoring/bank-fundamental-score/
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 { bankFundamentalScore } from "fintech-algorithms/fundamental-analysis-and-valuation/sector-specific-equity-scoring/bank-fundamental-score";
```

## Signature

```ts
bankFundamentalScore(data)
```

Scores a bank on eight banded prudential and profitability components, then subtracts 12.5 points for each declared minimum that the corresponding ratio falls below. Reports the pre-penalty score, the breach list and the penalty alongside the final score.

## Parameters

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `data` | `RecordValue` | yes | A plain object. `framework` must be the string `basel-iii-teaching-v1`. `weights` must be an object holding exactly `capital`, `leverage`, `short_liquidity`, `stable_funding`, `asset_quality`, `coverage`, `margin` and `efficiency`. The ratios read are `cet1_ratio`, `leverage_ratio`, `lcr`, `nsfr`, `npl_ratio`, `provision_coverage_ratio` and `cost_income_ratio`, all nonnegative, plus `net_interest_margin`, which may be negative. `minimums` must be an object supplying nonnegative `cet1_ratio`, `leverage_ratio`, `lcr` and `nsfr` floors. |

## Returns

`{ state: string; method: string; component_scores: Record<string, number>; weights: Record<string, number>; base_score: number; floor_breaches: string[]; penalty: number; fundamental_score: number; coverage_ratio: number; reason: string }`

`component_scores` holds the eight band scores on a 0-100 scale and `base_score` is their weighted sum. `floor_breaches` lists the ratios below their declared minimum, `penalty` is 12.5 times that count, and `fundamental_score` is `base_score` less the penalty clamped to [0, 100]. `state` is `prudential-floor-review` whenever there is any breach, otherwise the band of the final score: `strong-review-band` at 75 or more, `mixed-review-band` at 50 or more, `weak-review-band` below that. `method` is `bank-sector-score-v1` and `coverage_ratio` is 1.

## Errors

- When data is not a plain object — throws TypeError
- When framework is not a nonempty string, or a required ratio is not a finite number — throws TypeError
- When minimums is missing or is not an object — throws TypeError
- When framework is not basel-iii-teaching-v1 — throws RangeError
- When weights does not hold exactly the eight component names, or its values do not sum to 1 within 1e-9 — throws RangeError
- When a ratio required to be nonnegative is negative — 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
{
  "framework": "basel-iii-teaching-v1",
  "cet1_ratio": 0.12,
  "leverage_ratio": 0.05,
  "lcr": 1.25,
  "nsfr": 1.15,
  "npl_ratio": 0.025,
  "provision_coverage_ratio": 1.1,
  "net_interest_margin": 0.032,
  "cost_income_ratio": 0.48,
  "minimums": {
    "cet1_ratio": 0.045,
    "leverage_ratio": 0.03,
    "lcr": 1,
    "nsfr": 1
  },
  "weights": {
    "capital": 0.2,
    "leverage": 0.1,
    "short_liquidity": 0.1,
    "stable_funding": 0.1,
    "asset_quality": 0.15,
    "coverage": 0.1,
    "margin": 0.15,
    "efficiency": 0.1
  }
}
```

### Call

```ts
bankFundamentalScore(data)
```

### Returns

object with 10 fields: state, method, component_scores, weights, base_score, floor_breaches, penalty, fundamental_score, …

```json
{
  "state": "mixed-review-band",
  "method": "bank-sector-score-v1",
  "component_scores": {
    "capital": 71.4285714285714,
    "leverage": 66.66666666666669,
    "short_liquidity": 62.500000000000014,
    "stable_funding": 49.999999999999964,
    "asset_quality": 91.66666666666667,
    "coverage": 83.33333333333336,
    "margin": 73.33333333333333,
    "efficiency": 73.33333333333334
  },
  "weights": {
    "capital": 0.2,
    "leverage": 0.1,
    "short_liquidity": 0.1,
    "stable_funding": 0.1,
    "asset_quality": 0.15,
    "coverage": 0.1,
    "margin": 0.15,
    "efficiency": 0.1
  },
  "base_score": 72.6190476190476,
  "floor_breaches": [],
  "penalty": 0,
  "fundamental_score": 72.6190476190476,
  "coverage_ratio": 1,
  "reason": "package-bands-with-declared-prudential-minimums"
}
```

## Other exports

`calculate`, `insuranceFundamentalScore`, `reitFundamentalScore`, `utilityFundamentalScore`, `earlyStageLiquidityAndRunwayScore`, `cyclicalAndCommodityCycleNormalization`, `holdingCompanyLookThroughScore`, `sectorSpecificWeightCalibration`, `unsupportedScopeAndCoverageDecision`. 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/sector-specific-equity-scoring/bank-fundamental-score/
- Implementation source: https://github.com/IslamBaraka90/Fintech-Algorithms-Library/blob/main/src/fundamental-analysis-and-valuation/sector-specific-equity-scoring/bank-fundamental-score/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
