Quantitative careers / Independent preparationOriginal books · Free worked examples

Research practice / 3 minute read

One local timestamp can represent two research observations

Resolve a fictional daylight-saving ambiguity before deciding whether a feature was available at a research decision time.

Quant Finance Playbook editorial · How the material is developed

A financial newspaper showing a historical stock chart
Illustrative photograph by Markus Spiske on Unsplash.
On this page

A local timestamp without an offset can be insufficient to decide whether a feature was available. Converting a guessed interpretation into UTC makes the guess explicit; it does not make it correct.

The Python zoneinfo documentation explains how fold distinguishes repeated local times during backward offset transitions. Use a time-zone database and a documented source convention rather than assuming that every local clock reading identifies one instant.

A fictional arrival log

Suppose a feature's arrival log contains only 2025-11-02 01:30 and says the clock uses America/New_York. Your research decision is at 06:00 UTC that day. In this historical transition, the local 01:30 occurs twice:

InterpretationOffsetCorresponding UTCRelative to 06:00 UTC
Earlier occurrenceUTC minus four hours05:30Thirty minutes before
Later occurrenceUTC minus five hours06:30Thirty minutes after

One interpretation could satisfy the stated arrival-before-decision condition; the other cannot. The bare local string does not tell you which observation you received. Assigning the earlier occurrence merely because it makes the feature eligible would introduce an unsupported assumption.

Inspect the two interpretations

from datetime import datetime, timezone
from zoneinfo import ZoneInfo

zone = ZoneInfo("America/New_York")
earlier = datetime(2025, 11, 2, 1, 30, tzinfo=zone, fold=0)
later = earlier.replace(fold=1)
print(earlier.astimezone(timezone.utc))
print(later.astimezone(timezone.utc))

With the applicable zone data, these print 05:30 UTC and 06:30 UTC. The code enumerates interpretations; it does not discover the missing fold in the original log. Retain the source string and seek its offset, UTC timestamp, sequence information or documented provider convention. If that cannot resolve the ambiguity, label eligibility unknown and apply a documented handling rule rather than silently choosing a favorable interpretation.

An event clock is not an availability clock

Now change the packet: 01:30 is the time an underlying event happened, while the feature reached your system at 06:05 UTC. Even a correctly interpreted event time before 06:00 would not establish availability at the decision. The supplied arrival time is after it.

Record both meanings instead of calling every time column timestamp. A useful data note includes the raw value, clock meaning, zone or offset, conversion rule, resolved instant and reason it qualifies for the stated decision. A UTC column can still describe the wrong event.

Keep the conclusion narrow

“The supplied local arrival value permits two instants on opposite sides of the decision. Eligibility cannot be established without additional source evidence.” That is a complete finding for the original packet; it is not proof that an entire backtest contains leakage.

The Python documentation also notes that Windows may need the first-party tzdata package when system IANA data is unavailable. Record the runtime and time-zone data used when reproducing the example. Continue with timestamp preparation resources for the resource decision, or the backtest-leakage checklist for broader feature-availability reasoning.