fintech-algorithms
Using a coding agent? Give it the skill: npx skills add IslamBaraka90/Fintech-Algorithms-Library What it does →

Data Quality

6 algorithms in Market Data Engineering.

In this family#

  1. Missing-Bar Gap Classifier contract

    Decides why a bar is missing: the session was closed, the instrument was halted, the feed dropped, or a sequence number was skipped. A gap is only a data-quality incident in some of those cases, and treating them alike produces alert fatigue.

    diagnoseGap(row)
  2. Feed-Latency Monitor contract

    Validates that a latency measurement is meaningful before any latency is computed from it. Subtracting timestamps written by two unsynchronised clocks produces a number, and that number means nothing.

    validateClockProfile(profile)
  3. Price-Source Consensus Check contract

    Reconciles quotes from several providers into one defensible price, or refuses to. Serious platforms never trust a single vendor, and two feeds never agree exactly — this is the layer that decides who is right.

    consensus(snapshot, policy)
  4. Schema-Drift Detector contract

    Compares two versions of a feed schema and classifies every change as compatible or breaking. Vendors rename and retype fields without announcement, and a silently renamed field is worse than an outage because nothing fails.

    detectSchemaDrift(baseline, candidate, policy)
  5. Point-in-Time Availability Guard contract

    Reconstructs what was actually knowable at a given moment, using each record's available_at rather than its observation_time. This is the guard that stops a backtest reading a figure hours before it was published.

    asOfSnapshot(records, knowledgeTime)
  6. Provider Adjustment-Basis Drift Detector contract

    Compares archived provider adjustment factors and isolates unexplained residual drift after newly knowable corporate actions.

    detectAdjustmentBasisDrift(input)

What they share#

Every topic here is a row-classify</code> or <code>snapshot-evaluate, so once you have called one the rest follow the same shape. Import paths differ only in the final segment:

ts
import { diagnoseGap } from "fintech-algorithms/market-data-engineering/data-quality/missing-bar-gap-classifier";
import { validateClockProfile } from "fintech-algorithms/market-data-engineering/data-quality/feed-latency-monitor";

Read them in the order above — the sequence is pedagogical, not alphabetical.

Where this sits#

Market Data Engineering collects 31 algorithms across 5 families. For the concept behind this family rather than the call signatures, see the concept guides.