# Absolute Breadth Index

`D04-F01-A05` · Market Breadth and Internals → Advance/Decline Breadth · archetype `snapshot-evaluate` · difficulty 2/5 · verification **verified**

Full page: https://docs.thefintechbuilder.com/market-breadth-and-internals/advance-decline-breadth/absolute-breadth-index/
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 { evaluateAbsoluteBreadthIndex } from "fintech-algorithms/market-breadth-and-internals/advance-decline-breadth/absolute-breadth-index";
```

## Signature

```ts
evaluateAbsoluteBreadthIndex(request)
```

The absolute difference between advances and declines — direction discarded on purpose. It measures how *decisive* a session was, not which way, so it reads as an activity or conviction gauge rather than a directional signal.

## Parameters

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `request` | `{ decision_time: string; metric_variant: string; records: Record[] }` | yes | `metric_variant` selects the raw or normalised form; `decision_time` bounds which revisions are usable. |

## Returns

`{ session_date, venue_id, universe_id, universe_revision, comparison_basis, … }`

The index with the full provenance of the universe it was computed over, including the universe revision.

## Errors

- When the metric variant is unrecognised — reported as a status rather than thrown

## Complexity

Time `O(records)`, space `O(1)`.

## Worked example

This is the worked example published in the article, replayed by the test suite on every run. The output cannot drift.

### Input

`request`:

```json
{
  "decision_time": "2026-01-05T22:00:00Z",
  "metric_variant": "raw_issue_count",
  "records": [
    {
      "record_id": "ABI-R1",
      "revision": 1,
      "supersedes_record_id": null,
      "kind": "observation",
      "effective_at": "2026-01-05T21:00:00Z",
      "available_at": "2026-01-05T21:05:00Z",
      "is_final": true,
      "session_date": "2026-01-05",
      "venue_id": "SYNTH-X",
      "universe_id": "SYNTH-100",
      "universe_revision": "U1",
      "session_id": "regular",
      "calendar_id": "SYNTH-CAL",
      "comparison_basis": "comparable-prior-close"
    }
  ]
}
```

### Call

```ts
evaluateAbsoluteBreadthIndex(request)
```

### Returns

object with 12 fields: evaluation_state, publishable, reason_codes, record_id, revision, is_provisional, net_advances, absolute_breadth_index, …

```json
{
  "evaluation_state": "resolved",
  "publishable": true,
  "reason_codes": [],
  "record_id": "ABI-R1",
  "revision": 1,
  "is_provisional": false,
  "net_advances": 30,
  "absolute_breadth_index": 30,
  "mover_count": 90,
  "classified_count": 98,
  "coverage_ratio": 0.98,
  "breadth_state": "advances_imbalanced"
}
```

## Verification and provenance

Tier: **verified** (via input-expected).

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.1.
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/market-breadth-and-internals/advance-decline-breadth/absolute-breadth-index/
- Implementation source: https://github.com/IslamBaraka90/Fintech-Algorithms-Library/blob/main/src/market-breadth-and-internals/advance-decline-breadth/absolute-breadth-index/impl.ts
- Standalone repository: https://github.com/IslamBaraka90/Fintech-Absolute-Breadth-Index-Market-Breadth-algorithm
- Package on npm: https://www.npmjs.com/package/fintech-algorithms
- Domain index for agents: https://docs.thefintechbuilder.com/market-breadth-and-internals/llms.txt
