Skip to content

18199

  • 18199
  • de116c0
  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
  • Choose a tag to compare

  • 18199
  • de116c0
  • Choose a tag to compare

  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
@Martin-Molinero Martin-Molinero tagged this 20 Oct 12:23
* Fix GetMarketHours when late open occurs after all daily segments (#9889)

Fixes #9889

- Initialize index in the late open loop to marketHoursSegments.Count so that if lateOpenTime falls after all segments of the day, TakeLast(0) returns no segments instead of falling back to the entire day's regular schedule
- Adds regression test GetMarketHoursWithLateOpenAfterAllSegmentsYieldsNoSegments in SecurityExchangeHoursTests.cs

* Add tests for multi-segment late open and early close with subsequent late open

* Fix GetMarketHours early close and late open boundaries

- An early close or late open exactly at a segment boundary no longer
  leaves a zero length segment
- An early close and late open at the same time close and reopen the
  market at once instead of dropping the rest of the day

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: abhi-byte62 <mrabhisheak@gmail.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Assets 2
Loading