Unsupported-Scope and Coverage Decision
Install and import#
npm install fintech-algorithmsimport { unsupportedScopeAndCoverageDecision } from "fintech-algorithms/fundamental-analysis-and-valuation/sector-specific-equity-scoring/unsupported-scope-and-coverage-decision";Signature#
unsupportedScopeAndCoverageDecision(data)Decides whether a sector model may be used at all. It refuses an unknown sector or a mismatched framework outright, and otherwise audits each required field against the as-of date, classifying it as available, missing, stale or dated in the future before comparing coverage with the declared minimum.
Parameters#
| Name | Type | Notes |
|---|---|---|
data | RecordValue | A plain object. framework must be the string coverage-router-teaching-v1. sector and candidate_framework are nonempty strings; the routed sectors are bank, insurance, reit, utility, early-stage, cyclical and holding-company, each pinned to one framework and one required-field list. as_of is a YYYY-MM-DD string, minimum_coverage a number in (0, 1], and max_age_days a positive number truncated to an integer. facts is an array of objects, each with a unique nonempty name and a boolean value_present; a fact that is present must also carry knowledge_date and period_end as YYYY-MM-DD strings. |
Returns#
{ state: string; method: string; selected_model: string | null; coverage_ratio: number; available_fields: string[]; missing_fields: string[]; stale_fields: string[]; future_fields: string[]; required_field_count?: number; reasons: string[]; reason: string }
A required field is missing when absent or not present, lands in future_fields when its knowledge_date is after as_of, in stale_fields when as_of is more than max_age_days after its period_end, and in available_fields otherwise; coverage_ratio is the available share of the required list. state is abstain whenever any field is future-dated or coverage falls below minimum_coverage, supported at full coverage, and partial-review in between; selected_model carries the routed topic ID on the last two and null on abstention. reasons accumulates future-evidence, stale-evidence, missing-required-fields and coverage-below-minimum, defaulting to complete-current-coverage, and reason is its first element. The two early refusals return abstain with a zero coverage_ratio and a single reason of unsupported-sector or framework-mismatch, and omit required_field_count. method is sector-coverage-router-v1.
Errors#
- When data is not a plain object, or facts is not an array — throws TypeError
- When a fact is not an object, its name is not a nonempty string, or value_present is not a boolean — throws TypeError
- When as_of, or a knowledge_date or period_end on a present fact, is not a YYYY-MM-DD string — throws TypeError
- When framework is not coverage-router-teaching-v1 — throws RangeError
- When minimum_coverage is outside (0, 1], or max_age_days is not positive — throws RangeError
- When two facts share a name — throws RangeError
Complexity: time O(n),
space O(n).
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#
{
"framework": "coverage-router-teaching-v1",
"sector": "bank",
"candidate_framework": "basel-iii-teaching-v1",
"as_of": "2026-04-15",
"minimum_coverage": 0.75,
"max_age_days": 550,
"facts": [
{
"name": "cet1_ratio",
"value_present": true,
"knowledge_date": "2026-03-20",
"period_end": "2025-12-31"
},
{
"name": "leverage_ratio",
"value_present": true,
"knowledge_date": "2026-03-20",
"period_end": "2025-12-31"
},
{
"name": "lcr",
"value_present": true,
"knowledge_date": "2026-03-20",
"period_end": "2025-12-31"
}
]
}Call#
unsupportedScopeAndCoverageDecision(data)Returns#
object with 11 fields: state, method, selected_model, coverage_ratio, available_fields, missing_fields, stale_fields, future_fields, …
{
"state": "supported",
"method": "sector-coverage-router-v1",
"selected_model": "D18-F10-A01",
"coverage_ratio": 1,
"available_fields": [
"cet1_ratio",
"leverage_ratio",
"lcr",
"nsfr",
"npl_ratio",
"provision_coverage_ratio"
],
"missing_fields": [],
"stale_fields": [],
"future_fields": [],
"required_field_count": 8,
"reasons": ["complete-current-coverage"],
"reason": "complete-current-coverage"
}Other exports#
This module also exports
calculate, bankFundamentalScore, insuranceFundamentalScore, reitFundamentalScore, utilityFundamentalScore, earlyStageLiquidityAndRunwayScore, cyclicalAndCommodityCycleNormalization, holdingCompanyLookThroughScore, sectorSpecificWeightCalibration. 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#
- Basel Framework — Basel Committee on Banking Supervision
- Calculation of the Solvency Capital Requirement — European Parliament and Council via EIOPA Single Rulebook
- Nareit Funds From Operations White Paper — 2018 Restatement — Nareit
- Electric Industry Forms — Federal Energy Regulatory Commission
- Financial Reporting Manual — Management's Discussion and Analysis — U.S. Securities and Exchange Commission
- IFRS 12 Disclosure of Interests in Other Entities — International Accounting Standards Board
- Evidence boundary