-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Open
Labels
Description
Expected Behavior
The following algorithm runs without error
class SessionErrorAlgorithm(QCAlgorithm):
def initialize(self):
self.set_start_date(2021, 1, 7)
self._spy = self.add_equity("SPY", Resolution.DAILY)
self._spy.session.size = 35
self.set_warm_up(timedelta(60))
def on_data(self, data):
if self.is_warming_up:
return
bars = list(self._spy.session)[::-1]
for b in bars:
b.end_time
Actual Behavior
Runtime Error: The added or subtracted value results in an un-representable DateTime. (Parameter 't')
at on_data
b.end_time
in main.py: line 19 (Open Stack Trace)
The time of the problematic bar has a year of 9999 too
Potential Solution
N/A
Reproducing the Problem
Run the algorithm above.
System Information
QC Cloud
Checklist
- I have completely filled out this template
- I have confirmed that this issue exists on the current
masterbranch - I have confirmed that this is not a duplicate issue by searching issues
- I have provided detailed steps to reproduce the issue