Learning objectives
- Distinguish fixed clock offset from changing drift.
- Audit cross-feed event ordering before calculating latency-sensitive features.
Prerequisites: Read timestamps and understand quote-based trade classification.
Mechanism and interpretation
Two feeds can timestamp the same market with different clocks. A fixed offset shifts all comparisons by a constant; drift changes that offset over time. Network delay adds another difference between event time and receipt time. Aligning feeds requires a documented clock model and quality checks, not merely sorting their displayed timestamps into one table.
Where known paired reference events exist, estimate offset at multiple times and examine its change. Applying a single morning correction to an entire day may become inaccurate if drift develops. Keep original timestamps, adjusted timestamps and the correction version. The corrected ordering remains an estimate unless the synchronization evidence is sufficiently precise for the decision horizon. Millisecond uncertainty can overwhelm a microsecond research claim.
Worked case · synthetic data
In a synthetic calibration, feed B timestamps a shared reference event 4 milliseconds later than feed A at 09:00 and 10 milliseconds later at 15:00. The offset changes 6 milliseconds across 6 hours, a linear drift estimate of 1 millisecond/hour. At 12:00 the interpolated offset is 7 milliseconds. Subtracting only the morning 4 would leave a 3-millisecond alignment error at noon.
Failure modes and context
Reference events may themselves traverse different processing paths. Clock jumps, daylight-saving conversions and timestamp precision can invalidate a linear model. Do not adjust timestamps to maximize a strategy's apparent predictive lead. Exchange timestamps and locally received timestamps answer different availability questions; keep the choice consistent with the backtest claim.
Practice assignment
A paired calibration shows B ahead of A by 2 milliseconds at 10:00 and 8 at 14:00. Under an expressly linear model, calculate the offset at 11:00 and 13:00. What is the residual at 13:00 if only 2 milliseconds is subtracted?
Worked answer
Drift is(8−2)/4=1.5 milliseconds/hour. Offset at 11:00 is 3.5 and at 13:00 is 6.5 milliseconds. Subtracting the fixed 2 leaves 4.5 milliseconds of residual misalignment at 13:00. Check additional anchors and uncertainty before relying on interpolation; the two points alone cannot prove that drift was linear between them.
Check your understanding
Question 1
What distinguishes drift from offset?
- Offset always equals zero
- Drift is executed volume
- Drift changes the offset over time
Reveal answer and reasoning
C. Drift changes the offset over time
A clock can have a constant mismatch or a mismatch that evolves.
Question 2
What is the practice drift estimate?
- 0.25 milliseconds/hour
- 1.5 milliseconds/hour
- 6 milliseconds/hour
Reveal answer and reasoning
B. 1.5 milliseconds/hour
The offset rises 6 milliseconds over 4 hours.
Question 3
Why retain original timestamps?
- Corrections should remain auditable and reversible
- They improve future returns
- They remove all network delay
Reveal answer and reasoning
A. Corrections should remain auditable and reversible
The original record is needed to review the alignment model and later revisions.
