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
Expected Behavior
The following algorithm runs without error
Actual Behavior
The
timeof the problematic bar has a year of 9999 tooPotential Solution
N/A
Reproducing the Problem
Run the algorithm above.
System Information
QC Cloud
Checklist
masterbranch