PyAlgoEngine 0.3.12.post3__tar.gz → 0.3.12.post4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {PyAlgoEngine-0.3.12.post3 → PyAlgoEngine-0.3.12.post4}/AlgoEngine/Engine/MarketEngine.py +7 -11
- {PyAlgoEngine-0.3.12.post3 → PyAlgoEngine-0.3.12.post4}/AlgoEngine/__init__.py +1 -1
- {PyAlgoEngine-0.3.12.post3 → PyAlgoEngine-0.3.12.post4}/PKG-INFO +1 -1
- {PyAlgoEngine-0.3.12.post3 → PyAlgoEngine-0.3.12.post4}/PyAlgoEngine.egg-info/PKG-INFO +1 -1
- {PyAlgoEngine-0.3.12.post3 → PyAlgoEngine-0.3.12.post4}/AlgoEngine/Engine/AlgoEngine.py +0 -0
- {PyAlgoEngine-0.3.12.post3 → PyAlgoEngine-0.3.12.post4}/AlgoEngine/Engine/EventEngine.py +0 -0
- {PyAlgoEngine-0.3.12.post3 → PyAlgoEngine-0.3.12.post4}/AlgoEngine/Engine/TradeEngine.py +0 -0
- {PyAlgoEngine-0.3.12.post3 → PyAlgoEngine-0.3.12.post4}/AlgoEngine/Engine/__init__.py +0 -0
- {PyAlgoEngine-0.3.12.post3 → PyAlgoEngine-0.3.12.post4}/AlgoEngine/Strategies/BackTest.py +0 -0
- {PyAlgoEngine-0.3.12.post3 → PyAlgoEngine-0.3.12.post4}/AlgoEngine/Strategies/_StrategyEngine.py +0 -0
- {PyAlgoEngine-0.3.12.post3 → PyAlgoEngine-0.3.12.post4}/AlgoEngine/Strategies/__init__.py +0 -0
- {PyAlgoEngine-0.3.12.post3 → PyAlgoEngine-0.3.12.post4}/LICENSE +0 -0
- {PyAlgoEngine-0.3.12.post3 → PyAlgoEngine-0.3.12.post4}/PyAlgoEngine.egg-info/SOURCES.txt +0 -0
- {PyAlgoEngine-0.3.12.post3 → PyAlgoEngine-0.3.12.post4}/PyAlgoEngine.egg-info/dependency_links.txt +0 -0
- {PyAlgoEngine-0.3.12.post3 → PyAlgoEngine-0.3.12.post4}/PyAlgoEngine.egg-info/requires.txt +0 -0
- {PyAlgoEngine-0.3.12.post3 → PyAlgoEngine-0.3.12.post4}/PyAlgoEngine.egg-info/top_level.txt +0 -0
- {PyAlgoEngine-0.3.12.post3 → PyAlgoEngine-0.3.12.post4}/README.md +0 -0
- {PyAlgoEngine-0.3.12.post3 → PyAlgoEngine-0.3.12.post4}/setup.cfg +0 -0
- {PyAlgoEngine-0.3.12.post3 → PyAlgoEngine-0.3.12.post4}/setup.py +0 -0
|
@@ -986,21 +986,17 @@ class ProgressiveReplay(Replay):
|
|
|
986
986
|
|
|
987
987
|
def reset(self):
|
|
988
988
|
if self.calendar is None:
|
|
989
|
-
|
|
990
|
-
self.replay_calendar.clear()
|
|
991
|
-
|
|
992
|
-
while md <= self.end_date:
|
|
993
|
-
self.replay_calendar.append(md)
|
|
994
|
-
md += datetime.timedelta(days=1)
|
|
995
|
-
|
|
996
|
-
elif callable(self.calendar):
|
|
997
|
-
self.replay_calendar = self.calendar(start_date=self.start_date, end_date=self.end_date)
|
|
989
|
+
self.replay_calendar = [self.start_date + datetime.timedelta(days=i) for i in range((self.end_date - self.start_date).days + 1)]
|
|
998
990
|
else:
|
|
999
991
|
self.replay_calendar = self.calendar
|
|
1000
992
|
|
|
1001
|
-
self.
|
|
993
|
+
self.task_progress = 0
|
|
994
|
+
self.date_progress = sum([1 for _ in self.replay_calendar if _ < self.start_date])
|
|
1002
995
|
self.progress.reset()
|
|
1003
996
|
|
|
997
|
+
if self.date_progress:
|
|
998
|
+
self.progress.done_tasks = self.date_progress / len(self.replay_calendar)
|
|
999
|
+
|
|
1004
1000
|
def next_trade_day(self):
|
|
1005
1001
|
if self.date_progress < len(self.replay_calendar):
|
|
1006
1002
|
market_date = self.replay_calendar[self.date_progress]
|
|
@@ -1026,7 +1022,7 @@ class ProgressiveReplay(Replay):
|
|
|
1026
1022
|
data = self.replay_task[self.task_progress]
|
|
1027
1023
|
self.task_progress += 1
|
|
1028
1024
|
else:
|
|
1029
|
-
if self.eod is not None and self.date_progress:
|
|
1025
|
+
if self.eod is not None and self.date_progress and self.replay_calendar[self.date_progress] > self.start_date:
|
|
1030
1026
|
self.eod(market_date=self.replay_calendar[self.date_progress - 1], replay=self)
|
|
1031
1027
|
|
|
1032
1028
|
self.replay_task.clear()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{PyAlgoEngine-0.3.12.post3 → PyAlgoEngine-0.3.12.post4}/AlgoEngine/Strategies/_StrategyEngine.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{PyAlgoEngine-0.3.12.post3 → PyAlgoEngine-0.3.12.post4}/PyAlgoEngine.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|