Time Synchronization
5 algorithms in Market Data Engineering.
In this family#
-
Previous-Tick Interpolation contract
Samples a series onto a grid by carrying the last value known *at that moment* forward. The only interpolation that is safe on live data: it never uses a value that had not yet arrived.
previousTick(observations, requests, maxStalenessMs) -
Linear Quote Interpolation contract
Interpolates between the quotes either side of a target time. More accurate than carrying forward, and **not causal** — it uses a quote from after the target, so it belongs in research and never in a live path.
linearQuoteInterpolation(quotes, targets, maxGapMs) -
Refresh-Time Sampling contract
Builds a common clock for several instruments by advancing only when every one of them has refreshed. The standard remedy for the bias that non-synchronous trading introduces into correlations.
refreshTimeSample(observations, requiredInstruments, maxStalenessMs) -
Exchange-Calendar Alignment contract
Validates a trading-calendar bundle before anything is aligned to it: that sessions do not overlap, that closures are consistent with sessions, and that the licence terms permitting redistribution are present.
validateCalendar(bundle) -
Asynchronous Return Alignment contract
Compares two return intervals and reports exactly how they overlap. Correlating returns measured over intervals that only partly coincide is a quiet and common source of wrong numbers.
classifyIntervalPair(left, right)
What they share#
Every topic here is a record-transform</code> or <code>row-classify, so once you have
called one the rest follow the same shape. Import paths differ only in the final segment:
import { previousTick } from "fintech-algorithms/market-data-engineering/time-synchronization/previous-tick-interpolation";
import { linearQuoteInterpolation } from "fintech-algorithms/market-data-engineering/time-synchronization/linear-quote-interpolation";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.