Net Advances
Count Participation Without Hiding Data Gaps
Install and import
npm install fintech-algorithmsimport { calculateNetAdvances } from "fintech-algorithms/market-breadth-and-internals/advance-decline-breadth/net-advances";Signature
calculateNetAdvances(request)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
{
"session_date": "2026-01-05",
"session_id": "regular-close",
"session_timezone": "America/New_York",
"venue_id": "SYNTH:XNAS",
"universe_id": "SYNTH:ACTIVE-LISTINGS@2026-01-05",
"comparison_basis": "official-close-versus-source-adjusted-comparable-prior-close",
"corporate_action_policy": "provider-supplies-split-and-distribution-adjusted-prior-close;calculator-does-not-adjust",
"price_tolerance": 0.01,
"calculation_as_of": "2026-01-05T21:04:59Z",
"revisions": [
{
"revision_id": "SYNTH-R1",
"revision_sequence": 1,
"supersedes_revision_id": null,
"effective_at": "2026-01-05T21:00:00Z",
"available_at": "2026-01-05T21:05:00Z",
"is_final": false,
"members": [
{
"listing_id": "L-001",
"security_id": "SEC-001",
"ticker": "ALFA",
"state": "eligible",
"current_price": 101,
"prior_comparable_price": 100
},
{
"listing_id": "L-002",
"security_id": "SEC-002",
"ticker": "BRAV",
"state": "eligible",
"current_price": 51,
"prior_comparable_price": 50
},
{
"listing_id": "L-003",
"security_id": "SEC-003",
"ticker": "CRWN",
"state": "eligible",
"current_price": 12,
"prior_comparable_price": 11
}
]
},
{
"revision_id": "SYNTH-R2",
"revision_sequence": 2,
"supersedes_revision_id": "SYNTH-R1",
"effective_at": "2026-01-05T21:00:00Z",
"available_at": "2026-01-05T22:00:00Z",
"is_final": true,
"members": [
{
"listing_id": "L-001",
"security_id": "SEC-001",
"ticker": "ALFA",
"state": "eligible",
"current_price": 101,
"prior_comparable_price": 100
},
{
"listing_id": "L-002",
"security_id": "SEC-002",
"ticker": "BRAV",
"state": "eligible",
"current_price": 51,
"prior_comparable_price": 50
},
{
"listing_id": "L-003",
"security_id": "SEC-003",
"ticker": "CRWN",
"state": "eligible",
"current_price": 12,
"prior_comparable_price": 11
}
]
}
]
}Call
calculateNetAdvances(request)Returns
object with 25 fields: status, direction, metric, session_date, session_id, venue_id, universe_id, calculation_as_of, …
{
"status": "unsupported",
"direction": null,
"metric": "advances_minus_declines",
"session_date": "2026-01-05",
"session_id": "regular-close",
"venue_id": "SYNTH:XNAS",
"universe_id": "SYNTH:ACTIVE-LISTINGS@2026-01-05",
"calculation_as_of": "2026-01-05T21:04:59Z",
"selected_revision_id": null,
"selected_revision_sequence": null,
"selected_effective_at": null,
"selected_available_at": null,
"is_provisional": null,
"advances": null
}Showing 14 of 25 fields.
Diagrams
Calculation flow
Net Advances evidence and calculation flow
flowchart TD
A["Session, universe, identity, and price policy"] --> B["Select revision effective and available by query time"]
B --> C{"Unique revision chain and listing IDs?"}
C -- "No" --> D["ambiguous; net is null"]
C -- "Yes" --> E["Classify every point-in-time member"]
E --> F{"Missing or unclassified evidence?"}
F -- "Yes" --> G["incomplete; net is null"]
F -- "No" --> H["Reconcile A + D + U + X = N"]
H --> I{"Universe or movers empty?"}
I -- "Universe empty" --> J["empty_universe; net 0"]
I -- "No movers" --> K["no_movers; net 0"]
I -- "Movers present" --> L["ready; net = A - D"]
Revision lifecycle with two clocks
flowchart LR
S["Session close effective 21:00"] --> R1["R1 available 21:05"]
R1 --> Q1["21:30 query selects R1: 5 - 3 = +2"]
S --> R2["R2 correction available 22:00"]
R2 --> Q2["22:30 query selects R2: 4 - 4 = 0"]
R2 -. "Unavailable at 21:30" .-> N["Must not affect or appear in Q1"]
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
- R1 - Nasdaq A-D glossary
- R2 - Nasdaq Daily Market Summary definitions
- R3 - Nasdaq Daily Market Files and 2026 CSV
- R4 - Consolidated Tape System output specification
- R5 - FINRA TRACE End of Day Market Breadth correction
- R6 - NYSE Daily TAQ catalog and reference data
- Evidence boundary