Quant Analytics: from scratch to pro · Quant foundations: returns, risk and clean data · Intermediate
Clean data: timestamps, time zones, DST and survivorship
Most errors in market analysis come from the data, not the maths. This lesson covers storing time in UTC, daylight saving rules in the US and Europe, bar labels, survivorship and delisting bias, point-in-time data and corporate actions.
In this lesson
- Store and compare timestamps in UTC and convert them with a time-zone database
- State the US and European daylight saving rules and find the weeks when the two differ
- Explain how survivorship and delisting bias inflate historical results
- Describe point-in-time data and adjust prices for splits
Read first: Returns: simple, log and compounded
A wrong number in the data goes through every later calculation unnoticed. Return, volatility and test statistics are all computed correctly from a bad input. Four sources of error come up again and again: time, time zones, who is in the sample, and the prices themselves.
Store time in UTC
UTC is a single global clock with no daylight saving. Store every timestamp in UTC, with the offset or zone kept as a separate field when you need to know local time. Convert to local time only when you display it, using a time-zone database (the IANA database ships with most languages), never by adding a fixed number of hours.
Why: local time is not one-to-one with real time. A feed stamped in New York time repeats an hour in autumn and skips one in spring.
Daylight saving time
Daylight saving time (DST) moves clocks forward one hour for part of the year. The rules differ by region and have changed over time.
- United States: since 2007, from the second Sunday of March to the first Sunday of November (Energy Policy Act of 2005, Public Law 109-58, section 110).
- European Union: summer time starts at 01:00 UTC on the last Sunday of March and ends at 01:00 UTC on the last Sunday of October (Directive 2000/84/EC). The United Kingdom follows the same last-Sunday rule.
The US and Europe change on different Sundays. In 2026:
| Starts | Ends | |
|---|---|---|
| United States | 8 March | 1 November |
| Europe and the UK | 29 March | 25 October |
For 21 days in spring (8 to 29 March) and 7 days in autumn (25 October to 1 November), the gap between New York and London is 4 hours instead of the usual 5. That is 28 days, or 7.67% of the year. The NYSE core session, 9:30 to 16:00 Eastern, is 14:30 to 21:00 UTC in winter and 13:30 to 20:00 UTC in summer. A fixed 14:30 UTC open is therefore wrong for about eight months of the year. Rules also change: before 2007 the US dates were different, so historical data needs the rules in force at the time. Proposals to end seasonal clock changes have been tabled in several places, so check the current law.
On the change days the day is 23 or 25 hours long, so a daily count of 24 hourly bars fails. Some feeds stamp bars in a "server time" zone that itself follows a DST rule; check what it is before merging.
Survivorship and delisting bias
Survivorship bias arises when the sample contains only things that still exist. Funds that closed, companies that went bankrupt and tickers that were removed do not appear in today's lists. The averages of what remains look better than what investors experienced. Elton, Gruber and Blake studied the effect for mutual funds in 1996. Shumway (1997) showed a related gap in stock data: returns on delisting were missing for most stocks delisted for negative reasons, and the missing returns were large.
Worked example: dropping the delisted stock
Ten stocks are held for a year. Nine return +10%. One is delisted after losing 60%.
- Including all ten: (9 x 10% - 60%) / 10 = 3.0%.
- Survivors only: 90% / 9 = 10.0%.
The bias is 7.0 points, all from leaving out one failure. To avoid it, use a database that keeps delisted securities and their final returns.
Point-in-time data
Point-in-time data records what was known on each date. It covers index members as they were then, accounting figures before later restatement, and securities that traded then. Today's version of history contains facts that were not available at the time, which makes past decisions look better informed than they were.
Corporate actions
Splits, dividends and mergers change the price without changing wealth. A 2-for-1 split takes a price from 100 to 51 in a day when the holding gained 2%. The unadjusted return is -49%; adjusting for the split gives 51 x 2 / 100 - 1 = +2%. Use adjusted prices for returns, and keep the raw prices for questions about what an order would have cost.
Common mistakes
- Storing local time with no zone, or assuming a fixed offset.
- Assuming London and New York are always five hours apart.
- Building a test universe from today's index members.
- Computing returns from unadjusted prices over a split.
- Dropping delisted names because the data vendor did not supply them.
In practice
Keep an immutable raw copy, apply documented adjustments in a second step, and test the clean data: no duplicate timestamps, no gaps of unexpected length, no returns beyond a sanity limit without a reason. Data on FinUties provides price series to practise these checks on; the data APIs are free after registration.
Worked numbers
Each result is recomputed from the formula shown.
| What | Formula | Result |
|---|---|---|
| days between US and EU spring changes in 2026 (8 March to 29 March) | 29 - 8 | 21 days |
| days between EU and US autumn changes in 2026 (25 October to 1 November) | (31 - 25) + 1 | 7 days |
| days a year when the offset differs | spring_gap + autumn_gap | 28 days |
| share of the year | diff_days / 365 | 7.67% |
| average return including the delisted stock | (9 * 10 - 60) / 10 | 3.0% |
| average return of survivors only | (9 * 10) / 9 | 10.0% |
| overstatement in percentage points | without_loser - with_loser | 7.0 points |
| unadjusted return across the split | 51 / 100 - 1 | -49% |
| adjusted return across the split | 51 * 2 / 100 - 1 | +2% |
Check yourself
What is the New York to London time difference normally, and when does it differ?
Normally 5 hours. It is 4 hours for about four weeks a year, when the US is on daylight time and Europe is not: from the second Sunday of March to the last Sunday of March, and from the last Sunday of October to the first Sunday of November. In 2026: 8 to 29 March and 25 October to 1 November, 21 + 7 = 28 days.
A feed stamps bars in New York local time. What goes wrong on the day the clocks go back?
The hour from 01:00 to 02:00 happens twice, so two different bars carry the same stamp. The day has 25 hours. On the spring day the hour from 02:00 to 03:00 never happens and the day has 23.
Ten stocks were held. Nine returned +10%. One was delisted after losing 60%. What is the average with and without the delisted one?
With it: (9 x 10% - 60%) / 10 = 3.0%. Without it: 10.0%. Dropping the loser overstates the result by 7.0 points.
A 2-for-1 split takes a price from 100 to 51 the next day, and the holding really gained 2%. What are the unadjusted and the correct returns?
Unadjusted: 51 / 100 - 1 = -49%. Adjusted: 51 x 2 / 100 - 1 = +2%. Unadjusted prices turn splits into false crashes.
What is point-in-time data?
Data as it was known on each date, including later-restated values, index membership and listings as they were then. Today's version of history uses facts that were not available.
Key terms
Checked facts
Every figure below carries how it was checked: Primary checked (read in the cited primary, official, academic or data source), Two sources agree, or Approximate (an order of magnitude only).
- Primary checked
From 2007 United States daylight saving time begins on the second Sunday of March and ends on the first Sunday of November, as set by section 110 of the Energy Policy Act of 2005 (Public Law 109-58).
- Primary checked
Under Directive 2000/84/EC, summer time in every EU Member State begins at 01:00 UTC on the last Sunday of March and ends at 01:00 UTC on the last Sunday of October.
- Primary checked
UK clocks go forward on the last Sunday in March and back on the last Sunday in October.
- Primary checked
In 2026 US daylight saving time runs from 8 March to 1 November, and UK and European summer time from 29 March to 25 October.
- Primary checked
The NYSE core trading session runs from 9:30 a.m. to 4:00 p.m. Eastern Time.
- Primary checked
Shumway (1997) found that correct delisting returns were missing from CRSP stock data for most stocks delisted for negative reasons since 1962, and that the omitted returns were large.
Sources
- Energy Policy Act of 2005, Public Law 109-58, section 110 (Daylight Saving). United States Congress, 2005. Accessed 9 Nov 2026
- Directive 2000/84/EC of the European Parliament and of the Council of 19 January 2001 on summer-time arrangements. Official Journal of the European Communities, L 31, 2 February 2001, 2001. Accessed 9 Nov 2026
- Impact of Extended Daylight Saving Time on National Energy Consumption (Report to Congress under Energy Policy Act of 2005, section 110). United States Department of Energy, 2008. Accessed 9 Nov 2026
- When do the clocks change?. GOV.UK (UK Government), 2026. Accessed 9 Nov 2026
- Daylight Saving Time Rules. National Institute of Standards and Technology (NIST), Time and Frequency Division, 2026. Accessed 9 Nov 2026
- Holidays and Trading Hours. New York Stock Exchange (Intercontinental Exchange), 2026. Accessed 9 Nov 2026
- Survivorship Bias and Mutual Fund Performance. The Review of Financial Studies 9(4), 1097-1120 (Edwin J. Elton, Martin J. Gruber, Christopher R. Blake), 1996. Accessed 9 Nov 2026
- The Delisting Bias in CRSP Data. The Journal of Finance 52(1), 327-340 (Tyler Shumway), 1997. Accessed 9 Nov 2026