Repository navigation
Conversation
…rkets that open after midnight UTC
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This reverts #1417. Its check treated a first candle that doesn't open on a UTC interval boundary as the sign of a partial batch. Markets that close break that assumption: a US stock's session never starts at 00:00 UTC, so the first daily batch was always dropped, even when every candle of that day had been seen. A strategy on daily bars lost a whole session on every start.
The new fixture holds Alpaca's hourly AMD bars for 2026-10-07 and 2026-10-08. They only cover the regular session, and batching the first day reproduces high, low and close of Alpaca's own daily bar for 2026-10-07. The test pins that the day is emitted. A second fixture holds the hourly BTC/USD bars for the same days, which trade around the clock. Batched into days they match Alpaca's daily bars exactly.
A batch that really is partial, because the stream started mid-session, is handled in the next PR by replaying the interval's earlier minutes during warm-up in
BatchedIndicator.