Absolute Breadth Index
Install and import#
npm install fintech-algorithmsimport { evaluateAbsoluteBreadthIndex } from "fintech-algorithms/market-breadth-and-internals/advance-decline-breadth/absolute-breadth-index";Signature#
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 | Notes |
|---|---|---|
request | { decision_time: string; metric_variant: string; records: Record[] } | 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#
verified This is the worked example published in the article, replayed by the test suite on every run. The output cannot drift.
Input#
{
"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#
evaluateAbsoluteBreadthIndex(request)Returns#
object with 12 fields: evaluation_state, publishable, reason_codes, record_id, revision, is_provisional, net_advances, absolute_breadth_index, …
{
"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"
}Diagrams#
Calculation flow#
Absolute Breadth Index evidence and calculation flow
flowchart LR
A["Raw issue-count request"] --> B{"Supported variant?"}
B -- "No" --> U["Unsupported; ABI null"]
B -- "Yes" --> C["Keep records effective and available by decision time"]
C --> D{"Any causal record?"}
D -- "No" --> I["Incomplete; ABI null"]
D -- "Yes" --> E{"One identity and contiguous lineage?"}
E -- "No" --> M["Ambiguous; ABI null"]
E -- "Yes" --> F{"Current record complete and not cancelled?"}
F -- "No" --> I
F -- "Yes" --> G["Net Advances = A - D"]
G --> H["Raw ABI = absolute value of Net Advances"]
H --> R["Resolved; retain counts, sign, clocks, revision, finality"]
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#
- Schwab thinkorswim AdvanceDecline study
- TC2000 T2101 help
- Nasdaq Trader Daily Market Files
- Nasdaq Daily Market Summary definitions
- Nasdaq Trader 2026 annual CSV
- Evidence reconciliation