Skip to content

Conversation

@jhonabreul
Copy link
Collaborator

Description

Adjust end time properly for QuantBook.OptionHistory and QuantBook.FutureHistory to include the whole date when the given end time includes a time of day after midnight.

Related Issue

N/A

Motivation and Context

Calling QuantBook.OptionHistory() or QuantBook.FutureHistory() with a time range where the end time is not midnight but includes a time of day (e.g. 03/02/2025 15:00pm), must include option/future data for March 2nd, but was being limited to the end of day of the previous date.

Requires Documentation Change

N/A

How Has This Been Tested?

Unit tests

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Refactor (non-breaking change which improves implementation)
  • Performance (non-breaking change which improves performance. Please add associated performance test and results)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Non-functional change (xml comments/documentation/etc)

Checklist:

  • My code follows the code style of this project.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My branch follows the naming convention bug-<issue#>-<description> or feature-<issue#>-<description>

Properly calculate date range when passed range is not a whole date but a time of day
@jhonabreul jhonabreul merged commit 26ef023 into QuantConnect:master Apr 3, 2025
6 of 8 checks passed
@jhonabreul jhonabreul deleted the bug-qb-option-future-intraday-history branch April 3, 2025 20:46
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.

2 participants