# Market Data Engineering — fintech-algorithms > 31 algorithms in 5 families, sliced out of the > fintech-algorithms reference. Zero-dependency TypeScript: plain arrays and objects in, > plain values out. This file covers D01 only. D01 · 31 topics · 5 families · 7 verified Install: npm install fintech-algorithms Agent skill (install it rather than re-deriving this file): npx skills add IslamBaraka90/Fintech-Algorithms-Library what it is: https://docs.thefintechbuilder.com/guides/agent-skill/ Source: fintech-algorithms@0.12.0 · payload schema 2.0.0 Reference payload: https://docs.thefintechbuilder.com/reference/payload.json Version endpoint: https://docs.thefintechbuilder.com/version.json Domain page: https://docs.thefintechbuilder.com/market-data-engineering/ Full index (324 topics across 13 domains): https://docs.thefintechbuilder.com/llms.txt Verification tiers: - verified — the worked example is the figure published in the algorithm's article, replayed and asserted by the test suite on every run. The arithmetic cannot drift without the build failing. Treat the numbers as reproducible. - contract — the module loads, the entry point is callable and its declared signature matches the compiled code. The example is real captured output, but no independently published figure asserts it. Treat the shape as reliable and the numbers as unattested. Full explanation: https://docs.thefintechbuilder.com/guides/verification/ Each entry: name — signature — archetype — verification tier — docs URL From the docs URL, mechanically: import subpath — swap the https://docs.thefintechbuilder.com/ prefix for fintech-algorithms/ and drop the trailing slash markdown page — append index.md; same contract as the HTML page, a fraction of the bytes ## D01-F01 — Bar Construction https://docs.thefintechbuilder.com/market-data-engineering/bar-construction/ - Time Bars — `constructBars(trades, config)` — tape-aggregate — verified — https://docs.thefintechbuilder.com/market-data-engineering/bar-construction/time-bars/ - Tick Bars — `constructBars(trades, config)` — tape-aggregate — verified — https://docs.thefintechbuilder.com/market-data-engineering/bar-construction/tick-bars/ - Volume Bars — `constructBars(trades, config)` — tape-aggregate — verified — https://docs.thefintechbuilder.com/market-data-engineering/bar-construction/volume-bars/ - Dollar Bars — `constructBars(trades, config)` — tape-aggregate — verified — https://docs.thefintechbuilder.com/market-data-engineering/bar-construction/dollar-bars/ - Tick-Imbalance Bars — `constructBars(trades, config)` — tape-aggregate — verified — https://docs.thefintechbuilder.com/market-data-engineering/bar-construction/tick-imbalance-bars/ - Volume-Imbalance Bars — `constructBars(trades, config)` — tape-aggregate — verified — https://docs.thefintechbuilder.com/market-data-engineering/bar-construction/volume-imbalance-bars/ - Tick-Run Bars — `constructBars(trades, config)` — tape-aggregate — verified — https://docs.thefintechbuilder.com/market-data-engineering/bar-construction/tick-run-bars/ ## D01-F02 — Cleaning and Validation https://docs.thefintechbuilder.com/market-data-engineering/cleaning-and-validation/ - OHLC Consistency Validator — `validateBars(bars, config)` — row-classify — contract — https://docs.thefintechbuilder.com/market-data-engineering/cleaning-and-validation/ohlc-consistency-validator/ - Hampel Bad-Tick Filter — `hampelFilter(values, options)` — record-transform — contract — https://docs.thefintechbuilder.com/market-data-engineering/cleaning-and-validation/hampel-bad-tick-filter/ - Median Absolute Deviation Outlier Filter — `madOutliers(values, threshold, scale, minimumSamples)` — record-transform — contract — https://docs.thefintechbuilder.com/market-data-engineering/cleaning-and-validation/median-absolute-deviation-outlier-filter/ - Stale-Quote Detector — `detectStaleQuotes(events, config)` — row-classify — contract — https://docs.thefintechbuilder.com/market-data-engineering/cleaning-and-validation/stale-quote-detector/ - Duplicate-Trade Resolver — `resolveTrades(input)` — row-classify — contract — https://docs.thefintechbuilder.com/market-data-engineering/cleaning-and-validation/duplicate-trade-resolver/ - Crossed/Locked Market Detector — `classifyMarkets(quotes, options)` — row-classify — contract — https://docs.thefintechbuilder.com/market-data-engineering/cleaning-and-validation/crossed-locked-market-detector/ ## D01-F03 — Time Synchronization https://docs.thefintechbuilder.com/market-data-engineering/time-synchronization/ - Previous-Tick Interpolation — `previousTick(observations, requests, maxStalenessMs)` — record-transform — contract — https://docs.thefintechbuilder.com/market-data-engineering/time-synchronization/previous-tick-interpolation/ - Linear Quote Interpolation — `linearQuoteInterpolation(quotes, targets, maxGapMs)` — record-transform — contract — https://docs.thefintechbuilder.com/market-data-engineering/time-synchronization/linear-quote-interpolation/ - Refresh-Time Sampling — `refreshTimeSample(observations, requiredInstruments, maxStalenessMs)` — record-transform — contract — https://docs.thefintechbuilder.com/market-data-engineering/time-synchronization/refresh-time-sampling/ - Exchange-Calendar Alignment — `validateCalendar(bundle)` — row-classify — contract — https://docs.thefintechbuilder.com/market-data-engineering/time-synchronization/exchange-calendar-alignment/ - Asynchronous Return Alignment — `classifyIntervalPair(left, right)` — row-classify — contract — https://docs.thefintechbuilder.com/market-data-engineering/time-synchronization/asynchronous-return-alignment/ ## D01-F04 — Data Quality https://docs.thefintechbuilder.com/market-data-engineering/data-quality/ - Missing-Bar Gap Classifier — `diagnoseGap(row)` — row-classify — contract — https://docs.thefintechbuilder.com/market-data-engineering/data-quality/missing-bar-gap-classifier/ - Feed-Latency Monitor — `validateClockProfile(profile)` — row-classify — contract — https://docs.thefintechbuilder.com/market-data-engineering/data-quality/feed-latency-monitor/ - Price-Source Consensus Check — `consensus(snapshot, policy)` — snapshot-evaluate — contract — https://docs.thefintechbuilder.com/market-data-engineering/data-quality/price-source-consensus-check/ - Schema-Drift Detector — `detectSchemaDrift(baseline, candidate, policy)` — row-classify — contract — https://docs.thefintechbuilder.com/market-data-engineering/data-quality/schema-drift-detector/ - Point-in-Time Availability Guard — `asOfSnapshot(records, knowledgeTime)` — snapshot-evaluate — contract — https://docs.thefintechbuilder.com/market-data-engineering/data-quality/point-in-time-availability-guard/ - Provider Adjustment-Basis Drift Detector — `detectAdjustmentBasisDrift(input)` — row-classify — contract — https://docs.thefintechbuilder.com/market-data-engineering/data-quality/provider-adjustment-basis-drift-detector/ ## D01-F05 — Order-Book Feed Engineering https://docs.thefintechbuilder.com/market-data-engineering/order-book-feed-engineering/ - Trade-and-Quote Event Normalization — `normalizeEvents(events)` — record-transform — contract — https://docs.thefintechbuilder.com/market-data-engineering/order-book-feed-engineering/trade-and-quote-event-normalization/ - Level-2 Snapshot-and-Delta Reconstruction — `reconstructL2(snapshot)` — record-transform — contract — https://docs.thefintechbuilder.com/market-data-engineering/order-book-feed-engineering/level-2-snapshot-and-delta-reconstruction/ - Level-3 Order-by-Order Reconstruction — `reconstructL3(snapshot_orders)` — record-transform — contract — https://docs.thefintechbuilder.com/market-data-engineering/order-book-feed-engineering/level-3-order-by-order-reconstruction/ - Sequence-Gap Detection and Recovery — `recoverSequenceStream(arrivals)` — record-transform — contract — https://docs.thefintechbuilder.com/market-data-engineering/order-book-feed-engineering/sequence-gap-detection-and-recovery/ - Price-Level Quantity Aggregation — `aggregatePriceLevels(orders)` — record-transform — contract — https://docs.thefintechbuilder.com/market-data-engineering/order-book-feed-engineering/price-level-quantity-aggregation/ - Snapshot/Incremental-Feed Reconciliation — `reconcileSnapshotIncrementals(snapshot)` — record-transform — contract — https://docs.thefintechbuilder.com/market-data-engineering/order-book-feed-engineering/snapshot-incremental-feed-reconciliation/ - Multi-Venue Best-Quote and Book Consolidation — `consolidateVenues(quotes)` — record-transform — contract — https://docs.thefintechbuilder.com/market-data-engineering/order-book-feed-engineering/multi-venue-best-quote-and-book-consolidation/