Skip to content

fix(backtest): keep Tiingo bars with mixed timestamp precision - #2313

Open
marroxo wants to merge 1 commit into
HKUDS:mainfrom
marroxo:fix/tiingo-mixed-timestamps
Open

marroxo wants to merge 1 commit into
HKUDS:mainfrom
marroxo:fix/tiingo-mixed-timestamps

Conversation

@marroxo

@marroxo marroxo commented Nov 21, 2026

Copy link
Copy Markdown

A Tiingo response containing both 2024-01-02T00:00:00.000Z and 2024-01-03T00:00:00Z loses the second bar. Both timestamps pass the individual date check, but pandas infers a single format when the dates are parsed together.

Use mixed-format parsing for that conversion. The loader still returns UTC dates at midnight with the timezone removed.

The two-bar fixture returned one date before the fix and both dates afterward. All 33 Tiingo loader tests passed with sockets disabled. I used synthetic rows for the regression. The change is limited to date parsing and can be reverted on its own.

Parse each timestamp independently so a row without fractional seconds survives alongside one with fractional seconds. Keep UTC date normalization unchanged.

Signed-off-by: marroxo <129263224+marroxo@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant