Skip to content

fix(backtest): preserve trade timestamps in CSV exports - #2316

Open
marroxo wants to merge 1 commit into
HKUDS:mainfrom
marroxo:fix/preserve-trade-timestamps
Open

marroxo wants to merge 1 commit into
HKUDS:mainfrom
marroxo:fix/preserve-trade-timestamps

Conversation

@marroxo

@marroxo marroxo commented Nov 21, 2026

Copy link
Copy Markdown

An entry at midnight and an exit at 00:10 both showed up as the same date in trades.csv. Reloading the trades lost the exit time and any UTC offset, so they could no longer be matched to the right equity bars.

Write full ISO timestamps when the bar index contains times or a timezone. Keep the date-only format for timezone-naive midnight bars.

Both new round-trip cases failed before the fix. Afterward, 188 tests passed across trade exports, validation, equity artifacts, rebalance execution, and UI services with sockets disabled.

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